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

Script is needed to check all message identifiers automatically #2

Open
weierophinney opened this issue Dec 31, 2019 · 4 comments
Open

Comments

@weierophinney
Copy link
Member

Problem

The translation files contain two main problems:

  • missing message identifiers
    • for a single message of a validator class
    • for all messages of a validator class (e.g. Zend\Validator\GpsPoint)
  • outdated message identifiers

Suggestion

Create a script to extract all messages from validator and captcha classes and check all message identifiers in the translation files.

Any help is welcome and appreciated!


Originally posted by @froschdesign at zendframework/zend-i18n-resources#43

@Slamdunk
Copy link
Contributor

I think the issue is a bit more wide: provide a way to collect messages handled by Laminas Translator. Reported in that repo: laminas/laminas-i18n#20

@froschdesign
Copy link
Member

@Slamdunk
This issue report is related to the pre-translated messages of the validator classes. This means to extract the messages templates of the related classes.
The script for these messages is only for internal use.

See: https://github.com/laminas/laminas-validator/blob/649bbd4c4f0ba73645a59a473dbb93c473a4ea16/src/NotEmpty.php#L66-L69

@Slamdunk
Copy link
Contributor

I would argue that the issue is still not internal only.

If I create a custom validator, I'd write a class with an identical structure of the Laminas' ones.

So I end up with the same issue of Laminas of collecting that $messageTemplates variable from my class in order to translate it in all the languages I need.

@froschdesign
Copy link
Member

I'm sorry for the misunderstand. The script which I mean is for internal use of this component. How to fetch the text messages is not the topic of this component. The script will use a method which can also be used for other purposes.

@froschdesign froschdesign removed this from the 2.7.0 milestone Apr 15, 2021
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

3 participants