Skosmos
Skosmos copied to clipboard
Upgrade Skosmos to a new translation component
This is an upgrade request for getting rid of the abandoned twig/extensions
package.
What steps will reproduce the problem?
- Currently we are using the
I18nExtension
for creating the translation strings from .mo files - The library this extension is part of is abandoned and sould not be used https://packagist.org/packages/twig/extensions
- The recommendation is to use the
trans
filter insymfony/twig-bridge
instead
What is the expected output? What do you see instead?
The new package has a different set-up for loading the translation files, as documented in https://symfony.com/doc/current/translation.html
Also the often used {% trans ID_STRING %}
syntax does not work with the extension in symfony/twig-bridge
- It shoud be refactored to
{{ ID_STRING | trans }}
or{% trans %}ID_STRING{% endtrans %}
- All three are valid syntaxes in the current
I18nExtension
set-up
The symfony/translation (and symfony/twig-bridge) are up to date and maintained packages, but we have to use 6.0.x in order to keep PHP 8.0.2 compability.