Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1141236

Summary: Wrong translate string in message when activation key doesn't exist
Product: [Retired] Katello Reporter: Pavel Studeník <pstudeni>
Component: Localization and InternationalizationAssignee: Devan Goodwin <dgoodwin>
Status: CLOSED EOL QA Contact: Katello QA List <katello-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.0CC: dgoodwin
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 19:03:37 UTC Type: Bug
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:    
Bug Blocks: 1121117    

Description Pavel Studeník 2014-09-12 13:49:40 UTC
Description of problem:
I try to register system to satellite and used activation key, but this key doesn't exist on server. I assumed some error message, but I got error (RHEL6). On RHEL5 I got other translation.

>> LC_ALL=cs_CZ subscription-manager register --org="Default_Organization" --activationkey="activationkey12"
క్రియాశీల కీ 'activationkey12' కనుగొనలేక పోయింది

... correct ...
>> LC_ALL=de_DE subscription-manager register --org="Default_Organization" --activationkey="activationkey12"
Aktivierungsschlüssel "activationkey12" konnte nicht gefunden werden

>> LC_ALL=pt_BR subscription-manager register --org="Default_Organization" --activationkey="activationkey12"
Não foi possível encontrar chave de ativação "activationkey12"


On RHEL7 application failed too with following message:
subscription-manager-1.10.14-7.el7.x86_64
redhat-release-server-7.0-1.el7.x86_64


>> LC_ALL=cs_CZ subscription-manager register --org="Default_Organization" --activationkey="activationkey12"
or
>> LC_ALL=fr_FR subscription-manager register --org="Default_Organization" --activationkey="activationkey12"
'utf8' codec can't decode byte 0xfd in position 10: invalid start byte


Version-Release number of selected component (if applicable):
subscription-manager-1.11.3-10.el5
redhat-release-5Server-5.11.0.2

How reproducible:
always

Actual results:
క్రియాశీల కీ 'activationkey12' కనుగొనలేక పోయింద

Expected results:
correct string

Comment 1 Bryan Kearney 2014-09-29 17:27:20 UTC
Acking 7.1

Comment 2 Devan Goodwin 2014-11-14 20:04:59 UTC
Forgive me if any of this is inaccurate but I believe this is incorrect specification of the locale, and not something you would see with normal usage.

[root@rhel7 ~]# LC_ALL=fr_FR subscription-manager register --org="admin" --activationkey="activationkey12"                                                                                            
'utf8' codec can't decode byte 0xa0 in position 25: invalid start byte


[root@rhel7 ~]# LC_ALL=fr_FR.utf8 subscription-manager register --org="admin" --activationkey="activationkey12"                                                                                       
Clé dactivation « {0} » introuvable pour lorganisation « admin ».


Additionally cs_CZ.utf8 is not one of the locales we translate. If used it should fallback to English like this:

[root@rhel7 ~]# LC_ALL=cs_CZ.utf8 subscription-manager register --org="admin" --activationkey="activationkey12"

Activation key 'activationkey12' not found for organization 'admin'.

Not sure what caused the incorrect translation in original report but it looks to have been corrected in latest code. Moving to MODIFIED so QE can have a look and see if they agree.

Comment 4 John Sefler 2014-11-24 21:21:58 UTC
Testing with subscription-manager version against the hosted stage candlepin server...
[root@jsefler-os7 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 0.9.26.4-1
subscription management rules: 5.11
subscription-manager: 1.13.9-1.el7
python-rhsm: 1.13.8-1.el7

------------------------------------------
[root@jsefler-os7 ~]# LANG=cs_CZ.utf-8 subscription-manager register --org="7299203" --activationkey="activationkey12" --force
Activation key 'activationkey12' not found for organization '7299203'.

NOTE: LANG=cs_CZ is not translated in https://translate.zanata.org/zanata/iteration/view/candlepin/master and therefore the response falls back to the key itself.  This is working as designed.


------------------------------------------
[root@jsefler-os7 ~]# LANG=de_DE.utf-8 subscription-manager register --org="7299203" --activationkey="activationkey12" --force
Aktivierungsschlüssel 'activationkey12' konnte nicht für Organisation '7299203' gefunden werden.

VERIFIED: This is the expected response for LANG=de_DE


------------------------------------------
[root@jsefler-os7 ~]# LANG=pt_BR.utf-8 subscription-manager register --org="7299203" --activationkey="activationkey12" --force
Chave de ativaçao "activationkey12" não encontrada para organização "7299203".

VERIFIED: This is the expected response for LANG=pt_BR


------------------------------------------
[root@jsefler-os7 ~]# LANG=fr_FR.utf-8 subscription-manager register --org="7299203" --activationkey="activationkey12" --force
Clé dactivation « {0} » introuvable pour lorganisation « 7299203 ».

FAILURE: The single quotes in the following translation are clearly causing a failure here.  This needs to be fixed in https://translate.zanata.org/zanata/webtrans/Application.seam?project=candlepin&iteration=master&localeId=fr&locale=en#doc:keys;search:not%20found%20for%20org   I'll work on a fix for this with alikins.
Clé d'activation « {0} » introuvable pour l'organisation « {1} ».

------------------------------------------


Finally, notice that none of these translated values match the translated values coming back from the Katello server used in the testing of comment 0.  In my opinion, the bad cs_CZ translation must be owned by the Katello translation files.  Moving this bug to a different product/component.