Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Skosmos to a new translation component #1247

Open
joelit opened this issue Nov 11, 2021 · 1 comment
Open

Upgrade Skosmos to a new translation component #1247

joelit opened this issue Nov 11, 2021 · 1 comment
Assignees
Milestone

Comments

@joelit
Copy link
Contributor

joelit commented Nov 11, 2021

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
Copy link
Contributor Author

joelit commented Apr 26, 2023

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 joelit moved this to Done (verified in test.dev.finto.fi, set Milestone 3.0 for both issue & PR) in Skosmos 3.0 Backlog Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Proposed items for this sprint
Status: Done (verified in test.dev.finto.fi, set Milestone 3.0 for both issue & PR)
Development

No branches or pull requests

3 participants