-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Security] Missing lt translations #41097
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
Conversation
63abfa1
to
97e24f6
Compare
I think pluralization could work in this form:
|
@norkunas it would work if I modify translation file to support ICU message format (https://symfony.com/doc/current/translation/message_format.html), but I'm not sure if its a good way as other files are not using icu format.. Maybe @Nyholm could elaborate how to solve this issue..? |
I looked in https://github.com/symfony/symfony/blob/5.x/src/Symfony/Component/Validator/Resources/translations/validators.lt.xlf#L27 so I thought it is supported :) |
Hm.. Somehow I thought that this approach is deprecated and no longer works, but looks like it still works, but you have to pass |
Yes, please sent the PR on 5.2, we should probably keep |
97e24f6
to
f2dedd8
Compare
Opened a separate PR to add |
…temptsAuthenticationException (rmikalkenas) This PR was merged into the 5.2 branch. Discussion ---------- [Security] Translation count argument for TooManyLoginAttemptsAuthenticationException | Q | A | ------------- | --- | Branch? | 5.2 | Bug fix? | no | New feature? | no | Deprecations? | no | License | MIT Added `%count%` argument to leverage translator's pluralization functionality as discussed in #41097 Commits ------- 2bf0b48 Provide count argument for TooManyLoginAttemptsAuthenticationException to be able to translate in plural way
…temptsAuthenticationException (rmikalkenas) This PR was merged into the 5.2 branch. Discussion ---------- [Security] Translation count argument for TooManyLoginAttemptsAuthenticationException | Q | A | ------------- | --- | Branch? | 5.2 | Bug fix? | no | New feature? | no | Deprecations? | no | License | MIT Added `%count%` argument to leverage translator's pluralization functionality as discussed in symfony/symfony#41097 Commits ------- 2bf0b485f9 Provide count argument for TooManyLoginAttemptsAuthenticationException to be able to translate in plural way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for fixing this and for making that other PR too.
Just one small question/suggestion.
@@ -70,6 +70,14 @@ | |||
<source>Invalid or expired login link.</source> | |||
<target>Netinkama arba pasibaigusio galiojimo laiko prisijungimo nuoroda.</target> | |||
</trans-unit> | |||
<trans-unit id="19"> | |||
<source>Too many failed login attempts, please try again in %minutes% minute.</source> | |||
<target>Per daug nepavykusių prisijungimo bandymų, pabandykite dar kartą po %minutes% minutės.</target> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it make sense, You can write "one minute" here instead.
Ie (google translate) "vieną minutę".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it make sense, You can write "one minute" here instead.
Ie (google translate) "vieną minutę".
actually "po 1 minutės" or "po vienos minutės" :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you prefer "1 minute" over "one minute" then I'm happy with this PR as it is.
=)
Awesome! Thank you |
For minute/minutes translation I decided to use "min." abbreviation, because in lithuanian language the plural translation might not always match the word case.
For example:
1 minute -> 1 minutė
2 minutes -> 2 minutės
...
10 minutes -> 10 minučių
...
21 minutes -> 21 minutė
22 minutes -> 22 minutės
...
30 minutes -> 30 minučių
and so on...