-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Intl][Validator] Language::exists fail for es_419 #35513
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
Comments
Thanks, closing then :) |
@ro0NL, would you be so kind and tell me, what alternatives we have now for the language validator? We used it to validate user input; we have content in various languages and dialects, also es_419. I followed the related tickets, but there is no straightforward information. I assume, there is now no validator that can accept |
Tested, and:
returns |
This PR was submitted for the 4.3 branch but it was merged into the 4.4 branch instead (closes #35517). Discussion ---------- [Intl] Provide more locale translations | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #35513 (comment) | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> This enables more locale translations, available upstream, which are valid. In this case esp. locales with a numeric region code, eg. `es_419` This should return true in `Locales::exists()`, which is currently not the case. By providing the translation, it implicitly exists as well. cc @jkobus Commits ------- 27cc120 [Intl] Provide more locale translations
Symfony version(s) affected: 4.4
Description
Languages::exists('es_419')
is not working in intl 4.4 where the same code worked with 4.3.How to reproduce
\Symfony\Component\Intl\Tests\LanguagesTest::testExists
:$this->assertTrue(Languages::exists('es_419'));
phpunit --group intl-data --filter testExists
Repeat the same steps with 4.3 and the test will be green.
Possible Solution
I tried to dig in the code but with no luck so far.
Additional context
The language validator in symfony 4.4 will also fail due to this bug.
The text was updated successfully, but these errors were encountered: