Skip to content

Releases: boxblinkracer/phpunuhi

1.23.0

15 Nov 18:10
Compare
Choose a tag to compare

Added

  • Add new resx storage format to support Windows applications.
  • Add new strings storage format to support Mac applications.
  • Add new Docker Image for PHPUnuhi to run it in a container without installing in your project
  • Add new version specific XSD files in the schema folder for upcoming releases
  • Add new services command to see all available default and custom services
  • Include new error hints for missing and empty keys, particularly when the base language may also lack the same translation. In such cases, this could be an expected behavior.
  • Add base locale indicator in terminal output of errors (next to the locale name).

Changed

  • Changed Interface of storage formats. A new function saveTranslation(Translation $translation, Locale $locale) is now required that allows to save a single translation in a specific locale.
  • The translate command will now use the new single-translation save function of storage formats. This means your translations will be updated directly during a long running translation process. Also if that fails, the processed translations will still be saved.

Fixed

  • Fixed problem where directories for reports couldn't be created if multiple subdirectories were missing.

1.22.0

11 Nov 20:01
Compare
Choose a tag to compare

[1.22.0]

Added

  • Add new SpellCheckers with support for Aspell and OpenAI. This allows to check misspelled words and automatically fix them.
  • Add new Shopware 6 Storage option to support config XML files of Shopware plugins and apps. You can now validate config.xml, manifest.xml and more.
  • Add new usage summary when using Open AI. It shows the number of requests as well as the estimated costs. (approximate values, not guaranteed).
  • Add new similarity validation for translations. This allows to validate if translation keys are similar to each other.
  • Add new command list:translation-keys. The old list:translations command will now show all translations and the new one will show the keys only.
  • Allow DeepL / translator configuration with env variables (thx @Ocarthon)
  • Enable DeepL tag splitting on HTML input to also translate HTML fragments (thx @Ocarthon)
  • Support referencing Shopware snippets by their snippet set name (thx @Ocarthon)
  • TranslatorInterfaces do now have a fixSpelling option. A new command "fix:spelling" has been introduced to let services fix misspelled translations.

Changed

  • Improve performance with lots of snippets and sets by adding lazy loading of snippets (thx @Ocarthon)
  • Massive performance improvement by using indexed array for translations and reduce amount of loops (thx @Ocarthon)
  • HTML Exports are now saved into separate files for each translation-set (thx @Ocarthon)
  • Load dotenv files from current working directory (thx @Ocarthon)
  • Use mb collation for database collection (MySQL utf8 is not actually utf8) (thx @Ocarthon)
  • Insert shopware translation, if no corresponding row exists (thx @Ocarthon)

Fixed

  • Check all locales to determine the translation keys. Sometimes this did not happen and therefore not all keys have been detected (thx @Ocarthon)
  • Fix problem with translate command and force flag (thx @Ocarthon)
  • Fix problem where the error CLI output also showed successful test results and not just errors.
  • Fix problem with googleweb translator where a "." was not correctly kept after translation into a German word.
  • Fix problem where the JSON storage format cleared all translations when a JSON was not valid and any kind of write-command was used like fix-structure.

1.21.0

03 Jun 19:00
Compare
Choose a tag to compare

[1.21.0]

Added

  • Added new option to specify the base locale within a Translation-Set. This will be used for different features where it's necessary to know the base language.
  • Translation services will now use the new base locale as preferred source language for translations, if defined.

Fixed

  • Fixed binary detection to also support "Umlaute". These were accidentally detected as binary strings, but they are not (thx @mjosef89).
  • Fix bug where the coverage of a missing locale was accidentally 100%
  • Fix bug where it was not possible to only use import-config files without a Translation-Set inside the main configuration file. This is now possible.

1.20.0

18 May 07:26
Compare
Choose a tag to compare

Added

  • Add new json exchange format. This allows to import and export translations in JSON format.
  • Upgrade OpenAI integration to allow the use of the latest gpt-4.0 models.
  • Add new option to provide a custom model for OpenAI translations that you want to use.

Changed

  • removed deprecated utf8_decode function. mb_convert_encoding is now being used.

Fixed

  • Fixed exception with isBinary method in Shopware 6 storage format when NULL was being passed on from the database entry.

1.19.0

13 May 21:06
Compare
Choose a tag to compare

Added

  • Add new bootstrap loading option to make it easier to load register custom storages and more. Load all your vendors, and register whatever you need in that file.
  • Add new placeholder %locale_un% for XML configuration to change - to _ underscore. (fr-CH to fr_CH) (thx @TumTum)

Fixed

  • Fixed target locale feature of the DeepL integration. DeepL actually only needs the first part of a given locale. (thx @TumTum)

1.18.0

23 Feb 18:27
Compare
Choose a tag to compare

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.

1.17.0

27 Jan 10:28
Compare
Choose a tag to compare

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.

1.16.0

21 Jan 22:38
Compare
Choose a tag to compare

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.

1.15.0

01 Jan 21:38
Compare
Choose a tag to compare

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.

1.14.0

17 Dec 10:35
Compare
Choose a tag to compare

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