Releases: cooperaj/better-twig-i18n
tlhIngan Hol Dajatlh'a'
Spreek je Nederlands
This release has changed the way translation key extractions work such that all internal whitespace of more than 2 characters (inlcuding carriage returns and new lines) is stripped from the key.
For example you may have a key thats extracted from a template that looks like:
This is my long key, due to template formatting\n
it may be split on multiple lines with lots of\n
odd spaces, due to template indentation.
Consequently your extracted POT files would also have keys that look like that. This is a big problem when you go to change the indentation of a template (perhaps because of a new condtional) as it would break all existing keys, and disassociate them from their completed translations.
This release would now make your key look like:
This is my long key, due to template formatting it may be split on multiple lines with lots of odd spaces, due to template indentation.
It follows HTML rules such that a sequence of multiple whitespace characters are collapsed to a single whitespace.
As you might expect this could be breaking change for you. Please upgrade and test with caution.
Please look at the README.md for more information about upgrading.
Ви розмовляєте українською
This release targets PHP 8.1. Test coverage was improved alongside psalm analysis being set to and passing level 1. Code was re-factored in places to simplify code path and remove unused usages.
Parli italiano
- Added the ability to extract from PHP files
Ydych chi'n siarad Cymraeg
- Testing improvements
- Tidy up for v1 release
Hablas español
- Fix an issue on Alpine linux where the php gettext extension fails to respect the locale setting.
Sprechen sie Deutsch
- Can now set the intended locale after the creation of the Translator.
Initial Release
Fully functioning Twig template syntax and extraction capabilities.
TODO
Tests - any would be nice.
Think about abstracting the Gettext library away from the end user.
Provide framework specific files for Laminas/Mezzio.