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

Add way to collect messages #20

Open
Slamdunk opened this issue Mar 16, 2020 · 1 comment
Open

Add way to collect messages #20

Slamdunk opened this issue Mar 16, 2020 · 1 comment

Comments

@Slamdunk
Copy link
Contributor

Feature Request

Q A
New Feature yes
RFC no
BC Break no

Summary

Hi, Yii2 framework has an extension (yii2-translate-manager) to help gathering all the messages that need a translation.

The extension also provides a complete set of tools to help manage the I18n topic: all of them could easily be written as a laminas-i18n addon/extension too, but the ability of allowing a standard way to gather the messages to be translated I think should rely in this very package.

How to achieve this?

  1. A static analyzer addon (PHPStan/Psalm)? Elegant but a bit cumbersome, also requires perfect typing
  2. A conventional global function to inspect with a regex/tokenizer? Simple and easy, but not elegant

Any idea?

@Koen1999
Copy link

Maybe useful for inspiration, so leaving this here. In our project we use the following helper script: https://github.com/GEWIS/gewisweb/blob/master/translate-helper

But I think this corresponds to what you call the not elegant solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants