Skosmos icon indicating copy to clipboard operation
Skosmos copied to clipboard

Upgrade Skosmos to a new translation component

Open joelit opened this issue 3 years ago • 1 comments

This is an upgrade request for getting rid of the abandoned twig/extensions package.

What steps will reproduce the problem?

  1. Currently we are using the I18nExtension for creating the translation strings from .mo files
  2. The library this extension is part of is abandoned and sould not be used https://packagist.org/packages/twig/extensions
  3. The recommendation is to use the trans filter in symfony/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

joelit avatar Nov 11 '21 07:11 joelit

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.

joelit avatar Apr 26 '23 08:04 joelit