Phpunuhi Versions Save

PHPUnuhi - The easy composable framework to validate and manage translations

v1.18.0

2 months ago

Added

  • Add new option to ignore some keys from case style validation. Sometimes you are bound to the platform you are using for some keys.
  • Add new table layout for all errors on CLI. This makes it easier to read and understand the errors.

Changed

  • Validators will now show a new table layout for all errors. This makes it easier to read and understand the errors.

Fixed

  • Positive test results from mess validations where missing in reports.
  • Case Style validation always showed up in reports even though not configured.

v1.17.0

3 months ago

Breaking Changes

  • Add breaking changes for duplicateContent rule. This rule must now be configured per locale. Please see README for more. (idea by @matthiashamacher)

Added

  • Add new MJML scanner that allows to scan MJML files for translations. (idea by @wannevancamp)
  • Add new validate:structure command to only validate against the structure.
  • Add new rule emptyContent that allows you to provide a list of keys that can stay empty, either in all or specific languages. (idea by @wannevancamp)

Changed

  • The duplicateContent rule does now ignore empty values. Empty values are not considered anymore.

Fixed

  • Fixed problem with relative locale filenames in combination with the basePath attribute in the <locales> node. This led to wrong absolute filenames and therefore invalid filenames when loading.
  • Add missing none case style to XSD file.

v1.16.0

3 months ago

Added

  • Add new scanner bundles that allow to scan files for occurrences of translations. With this you can figure out what translations are not used in your templates.
  • Add new validate:mess command to find keys without any translation. This means that these translations might not be used at all and can be removed.
  • Add new fix:mess command to remove keys without any translation. This means that these translations might not be used at all and can be removed.
  • Add new configurations for a minimum coverage. These can be set for a TranslationSet, or all sets or across all locales. (see README for more).
  • Add new none CaseStyle validator. This helps to explicitly disable case style validation on a specific level while other levels are still validated against configured styles.
  • It's now possible to use the %locale% placeholder also in the basePath attribute of the locales node in the XML configuration.

Changed

  • Due to the new mess command the old validate function is now deprecated and should be replaced with the new validate:all command.

v1.15.0

4 months ago

Changed

  • Updated to OpenAI model gpt-3.5-turbo-instruct because the old model gpt-3.5-turbo will be shut down.
  • The validation of a configuration does now throw an error if no Translation-Sets are defined.

Fixed

  • Fixed bug where the DuplicateContentRule validation didn't work for single-hierarchy storages like INI, ...
  • If an empty config value was provided, it did not correctly use the default phpunuhi.xml file.

Removed

  • Removed fake translator service. This was accidentally existed inside the code and factory, but was only meant for unit tests.

v1.14.0

5 months ago

Added

  • Added new attribute basePath in <locales> tag. This allows you to use the placeholder %base_path% in filenames of your locales.
  • Added option to import additional configuration files into the root configuration file using the <import> tag. This allows to have decentralized configuration files that can be imported into the main configuration file.

Fixed

  • Fix broken indent settings for JSON and YAML storages (thx @matthiashamacher)

v1.13.0

8 months ago

Added

  • Add storage format option eol-last to all file based formats. This will automatically add a new line at the end of the file. (thx @JoshuaBehrens)
  • Add new line number data to errors and reports of file based storage formats. (thx @matthiashamacher )

Fixed

  • Fix broken sort attribute detection in storage format. Sometimes a FALSE got recognized as TRUE.

v1.12.0

9 months ago

Added

  • Added new JSON reporter that creates a JSON file with all validation errors.
  • Add option to register *custom translator services by using the TranslatorFactory register command.
  • Add option to register *custom exchange formats by using the ExchangeFactory register command.

Changed

  • Translator Services are now in charge of handling protection markers, because for some services the automatic encryption of markers would lead to problems.

Fixed

  • Fixed problem when using OpenAI to translate values in combination with protection markers. This should now work.

v1.11.0

10 months ago

Added

  • Add option to register *custom storages by using the StorageFactory register command.
  • Add first support for PO files. This covers the msgid and msgstr values.
  • Add new word count statistic to the status command.
  • Add better error output on OpenAI translation errors, like "Quota exceeded" and more.
  • Add new migration command, to migrate from Storage A to Storage B.

Changed

  • Improved OpenAI creativity by using a new temperature value. This allows to control the creativity of the AI.
  • Improved *StorageInterface definition for more future proven implementations.

Fixed

  • Fixed problem with [[punt]] placeholder when using googleweb for translations. These placeholders are now correctly converted into "."

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)