Phpunuhi Versions Save

PHPUnuhi - The easy composable framework to validate and manage translations

1.10.0

1 year ago

Added

  • Add new placeholders %locale%, %locale_lc% and %locale_uc% in file name paths. This allows to reuse the name of the locale in multiple spots within the path.
  • Added new protect node in sets. This helps to avoid that static placeholder strings like e.g. %firstname%, ... or even static terms get accidentally translated by translation services. (thx @hhoechtl for this idea)

1.9.0

1 year ago

Added

  • Add brand new YAML storage format (thx @matthiashamacher)
  • Add new argument source=xxx to translate command. This defines what locale should be used as base language for translations.
  • Add new option --empty to export command. This only exports translation entries that are not yet 100% translated.

Changed

  • Improved error outputs when loading configuration files without existing translation-sets. There will now be a better error message for this.
  • Add special keyword dev to composer to show this is a dev-tool and ask if --dev should be used to install it. (thx @xabbuh)

1.8.1

1 year ago

Fixed

  • Fix bug where duplicateContent rule was automatically validated if an empty tag was existing without a duplicateContent rule.
  • Fix broken HTML import due to wrong GroupId recognition

1.8.0

1 year ago

Added

  • Add new duplicateContent rule to avoid the same translation values within a single locale.

Changed

  • Refactoring RuleValidators by moving them into a separate folder and scope

1.7.0

1 year ago

Added

  • Add new number case-style validator.
  • Add new keyLength rule. Validate a maximum length of your keys.
  • Add new disallowedTexts rule. Provide a list of texts that must not appear in any of your translations.

Fixed

  • Fix problem with locale filenames that have whitespaces before or after the filename. Trim() has been added ;)

1.6.0

1 year ago

Added

  • Add new rules to Translation-Sets. The first rule is nestingDepth that allows you to validate against a maximum number of levels within a nested storage.

Fixed

  • Fixed problem /usr/bin/php: bad interpreter: No such file or directory when running on a MAC.

1.5.0

1 year ago

Added

  • Add new level for case-style validations. This helps to set specific styles on some levels within a multi-hierarchy translation format, such as JSON or PHP.

Changed

  • Switched from doctrine/dbal to plain PDO to allow a wider range of integrations without a dependency to a specific dbal version.

Fixed

  • Fixed wrong header output of version number in CLI commands

1.4.0

1 year ago

Added

  • Add new case-styles for translations. This allows you to validate against translation keys. Select from a wide range of styles like CamelCase, PascalCase, KebabCase and more.
  • Add new JUnit reporter for the validation command. This creates a JUnit XML file that can be used in further steps.

Changed

  • Improved output of the validation command. Errors are now shown in a more compact and meaningful way.
  • The translate command now shows a warning if auto-translation is not possible because no existing translation has been found as base-value.

Fixed

  • Fixed wrong "created" count on fix:structure. It showed 0 created if the last translation-set didn't get any new translations.

1.3.0

1 year ago

Added

  • Add support for database snippets in Shopware 6 storage using the entity name snippet.
  • The Shopware 6 storage format does now support "fix:structure" for snippet entities. Missing snippets will now be automatically generated with empty values.
  • Add warning output that the Shopware 6 storage format currently doesn't allow to insert new entity translation rows.

Fixed

  • Fixed problems with broken "Umlaute" in Shopware 6 entities storage
  • Fix problem with wrong translation coverage. A set with 0/0 was displayed as 0% coverage, but it's actually 100%.
  • Fix problem with "fix:structure" when creating new snippets for translations-sets with groups. It accidentally used the full ID instead of the correct key name for the "key" identifier.
  • Fix crash when parsing invalid json files.

1.2.0

1 year ago

Added

  • Add new list:translations command to see all IDs of Translation-Sets
  • Add new filters with allow and exclude lists. This also supports wildards with '*'
  • Add new groups of translations. This is required for a 3rd dimension. E.g. translations of products where every product has multiple rows with properties and different languages (columns).
  • Add option to inject PHP server variables that can be used in different areas.
  • Add Dbal/Connection to be used in MySQL driven storage formats.
  • Add new Shopware 6 Storage format with full support of entities.

Changed

  • Changed the technical usage of the translation key to an ID. The ID is the unique identifier within a locale, and the key the plain name of the translation which can exist multiple times in a locale.
  • Removed nodes in locale. Please use instead.
  • is now required as wrapper for locales. This helps to make the configuration cleaner.
  • Storage formats do now have to be inside a <format> tag instead of configuring it a attribute in a Translation-Set. Also the format is now a custom XML node to allow a better XSD experience.

Fixed

  • DeepL does not support formality options for all languages. This has been fixed by only applying the option for allowed languages.