Bug 818210

Summary: translatable strings broken up, causing translation to sound wrong
Product: [Retired] Subscription Asset Manager Reporter: Tom McKay <tomckay>
Component: katelloAssignee: Tom McKay <tomckay>
Status: CLOSED WONTFIX QA Contact: SAM QE List <sam-qe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.0.0CC: bkearney, cpelland, cwelton, hpeters, mmccune, noriko, tomckay
Target Milestone: rcKeywords: Triaged
Target Release: 1.X   
Hardware: Unspecified   
OS: Unspecified   
URL: https://breakout.usersys.redhat.com/headpin/organizations
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 796972 Environment:
Last Closed: 2017-06-26 20:40:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 796972, 834324    
Bug Blocks:    
Attachments:
Description Flags
translable modified string does not appear none

Description Tom McKay 2012-05-02 13:19:50 UTC
+++ This bug was initially created as a clone of Bug #796972 +++

Description of problem:
In SAM gui (see URL provided) some translations look wrong due to the translatable strings being broken up, translated individually, and put back together.

- Example: the strings "+New" and "User" appear as individually translatable strings for the localization team, however, on the GUI they are combined to show the string "+ New User". That works in English, but does not work in many other languages where word order, declination etc has to be adjusted.
- Example: "showing 1 of 1 results ( 1 total organisations )" The localized version in de-DE sounds completely wrong, likely the words had to be translated individually here too.


Version-Release number of selected component (if applicable):
Looking at:
https://breakout.usersys.redhat.com/headpin/organizations
https://translate.zanata.org/zanata/project/view/katello Version 1.0


How reproducible:
always

Steps to Reproduce:
1. open SAM gui 
2. go to tab "organizations" for example
3. 
  
Actual results:
translation sounds wrong

Expected results:
translation okay


Additional info:

--- Additional comment from hpeters on 2012-03-20 19:45:07 EDT ---

Same report from our Russian translator:

"Example: Viewing (1 out of 1) results (1 Total Users).

It contains severals different strings like: "Viewing" , "(1 out of 1)",
"results", (Number), "Total", "Users".

Translated words put together in the same order do not make sense. Add required
use of grammartical cases and plural form, and it just doesn't look right.

--- Additional comment from tomckay on 2012-04-30 16:03:25 EDT ---


To be clear, would the following string be better?

    Viewing (%s out of %s) results (%s Total %s)

Is there a way to get a note to the translators so that everyone understands what each %s is, or will it be obvious?

--- Additional comment from tomckay on 2012-04-30 16:46:41 EDT ---

  Branch: refs/heads/master
  Home:   https://github.com/Katello/katello
  Commit: 5056da560fa8971ce02db55f27def108461e735e
      https://github.com/Katello/katello/commit/5056da560fa8971ce02db55f27def108461e735e
  Author: Tom McKay <thomasmckay>
  Date:   2012-04-30 (Mon, 30 Apr 2012)


Note to translators:

"Viewing <span id=\"current_items_count\">0</span> of <span id=\"total_results_count\">0</span><span> results (<span id=\"total_items_count\">0</span> Total %s)</span>"

is the string to translate. The <span id=....>0</span> must remain intact but may be repositioned. Hopefully the names of the spans will help everyone determine how best to order them in context of the specific language.

--- Additional comment from hpeters on 2012-04-30 18:23:05 EDT ---

(In reply to comment #2)

> To be clear, would the following string be better?
> 
>     Viewing (%s out of %s) results (%s Total %s)

This would be much better, yes.

 
> Is there a way to get a note to the translators so that everyone understands
> what each %s is, or will it be obvious?

Sometimes these variables are obivious, but sometimes they can be ambigous or on occasion just impossible to guess. So generally any additional information for the translators about what the variables stand for would be of great help.

There is still a problem though:
If I'm not mistaken, the last %s here can stand for several different terms e.g. Systems, Organisations, etc: Viewing (1 out of 5) results (5 Total Systems). Some languages might have to translate "Total" in different ways depending on the word that follows. 

I described the same problem in my OP, when using "+New" together with different words that follow. "+New" needs to be translated differently depending on the word that follows.

--- Additional comment from noriko on 2012-04-30 23:15:44 EDT ---

> > To be clear, would the following string be better?
> > 
> >     Viewing (%s out of %s) results (%s Total %s)
> 
> This would be much better, yes.
> 
I agree, it is much better than translating the words separately. 
This might be separate issue, but please note that using multiple variables in a sentence can make some Asian languages translation harder to preserve the order of the variables. "%s out of %s" is typical example. 

While, with the below, it can be repositioned (changed the order) when translating, so it seems better for me. It is certainly helpful if a name of 'span' is determined. It is still not sure the difference of 'total results count' and 'total items count'. 
"Viewing <span id=\"current_items_count\">0</span> of <span
id=\"total_results_count\">0</span><span> results (<span
id=\"total_items_count\">0</span> Total %s)</span>"

--- Additional comment from tomckay on 2012-05-01 08:11:25 EDT ---

"Viewing <span id=\"current_items_count\">0</span> of <span
id=\"total_results_count\">0</span><span> results (<span
id=\"total_items_count\">0</span> Total %s)</span>"

DO NOT TRANSLATE <span id=\"*_count\">0</span> as this is HTML syntax. I will change the code to remove this items to avoid confusion.

Comment 1 Tom McKay 2012-05-02 13:20:36 UTC
  Branch: refs/heads/master
  Home:   https://github.com/Katello/katello
  Commit: 67820f45f96cde46661c053bbb9413280c577112
      https://github.com/Katello/katello/commit/67820f45f96cde46661c053bbb9413280c577112
  Author: Tom McKay <thomasmckay>
  Date:   2012-05-01 (Tue, 01 May 2012)

Comment 2 Tom McKay 2012-05-02 13:23:13 UTC
  Branch: refs/heads/master
  Home:   https://github.com/Katello/katello
  Commit: 67820f45f96cde46661c053bbb9413280c577112
      https://github.com/Katello/katello/commit/67820f45f96cde46661c053bbb9413280c577112
  Author: Tom McKay <thomasmckay>
  Date:   2012-05-01 (Tue, 01 May 2012)

Two changes:

"+ New Something" instead of "+ New %s" to allow translation as a unit.

Removed HTML from total string to avoid any chance of confusion. It is now: "Viewing %s of %s results (%s Total %s)"

Comment 3 Tom McKay 2012-05-10 12:38:13 UTC
Notes for testing: To confirm these strings are, or will be, translated, look in locale/app.pot for strings like "+ New System" and "Viewing %s of %s results (%s Total %s)"

Note, though, that these strings won't be there until BZ 818276 is complete.

Comment 4 Tazim Kolhar 2012-05-14 07:15:03 UTC
Created attachment 584264 [details]
translable modified string does not appear

VERIFIED with the build :

[root@dhcp201-195 ~]# rpm -qa | grep katello
katello-cli-headpin-0.2.0-1.el6_2.noarch
katello-selinux-0.2.4-1.el6_2.noarch
katello-common-0.3.1-1.el6_2.noarch
katello-headpin-0.2.6-4.el6_2.noarch
katello-glue-candlepin-0.3.1-1.el6_2.noarch
katello-cli-common-0.3.2-3.el6_2.noarch
katello-headpin-all-0.2.6-4.el6_2.noarch
katello-configure-0.3.3-2.el6_2.noarch
katello-certs-tools-1.1.5-1.el6_2.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch


BZ 818276 is closed .
still these strings are not visible

Comment 5 Bryan Kearney 2017-06-26 20:40:06 UTC
The release of Satellite 5.8 we are deprecating the support of Subscription Asset Manager. The release notes for 5.8 can be found at https://access.redhat.com/documentation/en-us/red_hat_satellite/5.8/pdf/release_notes/Red_Hat_Satellite-5.8-Release_Notes-en-US.pdf.

I am therefore closing out this bug as WONTFIX. If you believe this to be an error, please feel free tor each out to either Rich Jerrido or Bryan Kearney. Thank you!