-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Login throttling: error message is not translated #40863
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
Variables should be extracted to getMessageData IIUC edit: no my bad, actual variable values arent included, the translations are missing: symfony/src/Symfony/Component/Security/Core/Resources/tran 8000 slations/security.en.xlf Lines 65 to 67 in bb1e1e5
|
Thanks for the report. PR welcome. |
I think this is not just about a missing translation. The problem is that a message key is generated that makes assumptions on pluralizations. Instead, we should use a message key like this one: symfony/src/Symfony/Component/Validator/Constraints/Choice.php Lines 43 to 44 in be384cf
|
Contrary to the Validator component, we do not require the Translation component to be registered and enabled in Security. So the translation keys must be human readable without message formatter. |
Thanks for the explanation, @wouterj. In that case it's really just about adding the translations. |
Maybe we can't translate these messages then. They would only be correct for languages with same pluralization rules as English, right? |
The translator does not care about the content of the key to decide whether it should apply pluralization or no. |
Note that we will have issues with languages where plural is more complex. |
…hrottling (jmsche) This PR was merged into the 4.4 branch. Discussion ---------- [Security] Add missing French translations for logging throttling | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Fix #40863 (at least for French) | License | MIT | Doc PR | N/A Note: this PR replaces #40889 as somehow force-push closed the other PR. Also this one targets 4.4 branch directly :) Commits ------- b64efd2 [Security] Add missing French translations for logging throttling
It is also problem in Czech (discovered it when working on #41040) |
- closes symfony#41040 - The translations are not perfect for some %minutes% values as the pluralization is more complicated in Czech than in English. - See: symfony#40863 (comment)
- closes symfony#41040 - The translations are not perfect for some %minutes% values as the pluralization is more complicated in Czech than in English. - See: symfony#40863 (comment)
This PR was submitted for the 5.x branch but it was merged into the 4.4 branch instead. Discussion ---------- [Security] Update Czech translations | Q | A | ------------- | --- | Branch? | 5.x for features | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? |no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | Fix #41040 | License | MIT Closes #41040 The translations are not perfect for some %minutes% values as the pluralization is more complicated in Czech than in English. (See: #40863 (comment)) Commits ------- 076310c [Security] Update Czech translations
- closes #41040 - The translations are not perfect for some %minutes% values as the pluralization is more complicated in Czech than in English. - See: symfony/symfony#40863 (comment)
- closes #41040 - The translations are not perfect for some %minutes% values as the pluralization is more complicated in Czech than in English. - See: symfony/symfony#40863 (comment)
Symfony version(s) affected: 5.3.0@beta1
Description
When logging in with
fr
locale, I'm getting the following error message:While I'm expecting a translated error message.
How to reproduce
Add rate limiter to security.yaml & login using a different locale than
en
.Possible Solution
Add translations in security translation files.
Additional context
I think the error message comes from here: https://github.com/symfony/symfony/blob/v5.3.0-BETA1/src/Symfony/Component/Security/Core/Exception/TooManyLoginAttemptsAuthenticationException.php#L44
The "later" part seems already translated, so I think messages handling "minute" & "minutes" should be added.
The text was updated successfully, but these errors were encountered: