-
Notifications
You must be signed in to change notification settings - Fork 356
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
Multiple i18n strings are nearly identical #2800
Comments
@ohadlevy: some of this is covered in: http://manageiq.org/docs/guides/i18n note: any unification here is good on one side, on the other it may break the QE automation |
thanks, I didn't see that - regardless the issues still present :)
…On Thu, Nov 23, 2017 at 9:33 AM, Martin Povolny ***@***.***> wrote:
@ohadlevy <https://github.com/ohadlevy>: some of this is covered in:
http://manageiq.org/docs/guides/i18n
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2800 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABOxyDr3IQ9nzdNbsUnpROMEo1QHDtTks5s5R--gaJpZM4QnfPw>
.
|
I don't quite understand what problem this report points to. |
the point is that you can reduce the number of different strings - this simply adds burden on translators often leaving the application in semi translated state - where in fact, the same strings are already translated.
are identical strings, and in fact, already covered by
and
|
In fact, we're deliberately moving away from
and replacing them with
when possible. I get constantly asked by our translators what's I'm all for unification and simplifying things when it's possible. Though what you're describing above |
I think that cleanup is on the way. But the result should be:
Rather than:
It's more strings but, as @mzazrivec wrote, generally it gives more flexibility to the translators. |
Especially these should go:
|
👍 also the inconsistency with and without a dot ? |
@ohadlevy : Fixed that. Thx! |
This issue has been automatically marked as stale because it has not been updated for at least 6 months. If you can still reproduce this issue on the current release or on Thank you for all your contributions! |
@martinpovolny is this still a valid issue? If yes, lease remove the stale label. If not can you close. |
Closing issue. If you feel the issue needs to remain open, please either reopen or let me know and it will be reopened. |
@miq-bot remove_label stale |
This issue has been automatically marked as stale because it has not been updated for at least 6 months. If you can still reproduce this issue on the current release or on Thank you for all your contributions! |
for example:
I believe many of these can be extracted with a parameter, e.g. use:
_("String with param: %s") % param
or with multiple parameters:
_("Params: %{a} and %{b}") % {:a => foo, :b => bar}
Further, to use plural form use n_("One", "Two", number) - note this function always accepts three parameters as the base language is usually English but translators are able to define as many plural forms as they need.
Plural forms are usually used with one parameter, do not forget to add trailing parameter to it:
n_("%s minute", "%s minutes", @param) % @param
Note that gettext does not extract from interpolation - this will not work:
"blah #{_('key')} blah"
The text was updated successfully, but these errors were encountered: