This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 886718

Summary: [ru_RU] Creating Organization: error message substitutes strings result in broken grammar
Product: Red Hat Satellite 6 Reporter: Yulia <ypoyarko>
Component: Content ManagementAssignee: Miroslav Suchý <msuchy>
Status: CLOSED UPSTREAM QA Contact: SAM QE List <sam-qe-list>
Severity: medium Docs Contact:
Priority: medium    
Version: NightlyCC: eng-l10n-bugs, hpeters, lijli, msuchy, r.landmann
Target Milestone: UnspecifiedKeywords: i18n, Translation, Triaged
Target Release: 6.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-19 14:14:13 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Yulia 2012-12-12 20:05:19 EST
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


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.
Hit Save.
  
Actual results:
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.


Expected results:

Suggestion: replace %s with word "Organization" in source paragraph, or use the name of the organization as a replacement

Additional info:
Comment 1 Tom McKay 2012-12-18 09:24:19 EST
Mass move of i18n to CFSE where they are present as well
Comment 3 Miroslav Suchý 2013-02-12 07:04:48 EST
Please suggest better wording for source string, which can be translatable to Russian.
Otherwise, I'm affraid, this will be closed as WONTFIX.
Comment 4 Yulia 2013-02-12 19:23:30 EST
May be: 

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,
Yulia
Comment 5 Miroslav Suchý 2013-02-13 03:45:56 EST
*** Bug 886744 has been marked as a duplicate of this bug. ***
Comment 6 Miroslav Suchý 2013-02-13 03:49:44 EST
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.
Comment 7 Hedda Peters 2013-02-13 18:16:45 EST
Hi Miroslav,
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.
Comment 8 Miroslav Suchý 2013-02-14 09:24:36 EST
The 2) is maybe grammatically correct but ugly as hell. So I went the 1) way. Even if that result in ugly code.

https://github.com/Katello/katello/pull/1594
Comment 9 Mike McCune 2013-09-19 14:14:13 EDT
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.