Red Hat Bugzilla – Bug 886718
[ru_RU] Creating Organization: error message substitutes strings result in broken grammar
Last modified: 2016-06-05 19:36:50 EDT
Description of problem:
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Move cursor over the Administer menu at the top right corner and click on Manage Organizations OR Click Manage Organizations from the bottom of the organization menu list left tab next to Dashboard tab. (Perform the organization search: Type/Click on Filter... field from the organization list)
Click the + New Organization button.
Enter the name of the new organization in the Name field.
Leave Label EMPTY.
Error message appears based on a following zanata string:
A label was not provided during %s creation; therefore, a label of '%s' was automatically assigned. If you would like a different label, please delete the %s and recreate it with the desired label.
%s is replaced with word "Organization" in this particular example (not the actual name of the organization). The grammar case of nouns in Russian will be different. Therefore resulting paragraph 's grammar is incorrect.
Suggestion: replace %s with word "Organization" in source paragraph, or use the name of the organization as a replacement
Mass move of i18n to CFSE where they are present as well
Please suggest better wording for source string, which can be translatable to Russian.
Otherwise, I'm affraid, this will be closed as WONTFIX.
A label was not provided during organization creation; therefore, a label of '%s' was automatically assigned. If you would like a different label, please delete the organization and recreate it with the desired label.
That way the word "organization" is included into source paragraph instead replacing %s. That will allow translators adjust the grammar accordingly.
Thanks for looking into this,
*** Bug 886744 has been marked as a duplicate of this bug. ***
I will copy https://bugzilla.redhat.com/show_bug.cgi?id=886744#c5 here:
The code is:
label_assigned_text = _("A label was not provided during %s creation; therefore, a label of '%s' was " +
"automatically assigned. If you would like a different label, please delete the " +
"%s and recreate it with the desired label.") % [object_type, label, object_type]
so first and third parametr is the same.
Object_type can be e.g. repository, environment, organization, product etc.
Hardcoding first %s is not possible (or will lead to duplication of strings).
I would say that having both object_type and label in message is MUST item. And if necessary I would prefer less gramatical correct translations, but with both values as it gives admin necessary information.
If you came with translation which preserve all variable, that would be great.
I discussed this issue with Yulia and we can see two possible solutions:
1) Hardcoding the first and third variables (object_type) and having duplicate strings accordingly. From a translators point of view I'd much rather translate 10 strings correct than 1 string knowingly incorrect.
2) Re-writing the string something like this:
"No label was provided. Object type: %s. A label of '%s' was automatically assigned. If you would like a different label, delete the object (object type: %s) and recreate it with the desired label."
Sounds not as polished, but is possible to be translated correctly for any object type.
BTW, this issue has been reported for de-DE and ru-RU, but I suspect more languages might be affected - all those that use different grammatical genders for nouns. Worth trying to find a solution for.
The 2) is maybe grammatically correct but ugly as hell. So I went the 1) way. Even if that result in ugly code.
These bugs have been resolved in upstream projects for a period of months so I'm mass-closing them as CLOSED:UPSTREAM. If this is a mistake feel free to re-open.