Bug 1663384 - [ALL LANG][RHSM CLI] Unlocalized message in register module.
Summary: [ALL LANG][RHSM CLI] Unlocalized message in register module.
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: subscription-manager
Version: 8.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: 8.1
Assignee: candlepin-bugs
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On: 1678438 1682763
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-04 07:05 UTC by Lijun Li
Modified: 2020-02-10 10:11 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1678438 (view as bug list)
Environment:
Last Closed:
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)

Description Lijun Li 2019-01-04 07:05:39 UTC
Description of problem:
[ALL LANG][RHSM CLI] Unlocalized message in register module.

Version-Release number of selected component (if applicable):
subscription-manager-1.23.8-11.el8.x86_64.rpm

How reproducible:
100%

Steps to Reproduce:
1. Install latest rhel8 workstation build.
2. Run rhsm cli from terminal.

Actual results:
# subscription-manager register --username=stage_test_12 --password=redhat --org=test
正在注册到:subscription.rhsm.stage.redhat.com:443/subscription
HTTP error (400 - Bad Request): Organization test does not exist.
^^^^Unlocalized message.

Expected results:
It should be localized.

Additional info:

Comment 1 Kevin Howell 2019-01-21 15:34:38 UTC
Is this possibly fixed?

Comment 2 Chris Snyder 2019-01-21 19:18:13 UTC
The output for me using the latest built subscription-manager is as follows: (with LANG=ja_JP.utf-8)

登録中: subscription.rhsm.stage.redhat.com:443/subscription
HTTP error (400 - Bad Request): 組織 test は存在しません。


Lijun Li,

When I try this against the latest subscription-manager available for RHEL8 (subscription-manager-1.23.8-14.el8) I am unable to reproduce this failure exactly.

I believe this to be fixed. Can you confirm?

If you agree that it appears fixed, please close this bug as current release.

Thank you!

Comment 3 John Sefler 2019-01-30 18:32:10 UTC
[root@kvm-01-guest04 ~]# for L in en_US de_DE es_ES fr_FR it_IT ja_JP ko_KR pt_BR ru_RU zh_CN zh_TW; do echo ""; echo "# LANG=$L.UTF-8 subscription-manager register --username=stage_test_12 --password=redhat --org=test"; LANG=$L.UTF-8 subscription-manager register --username=stage_test_12 --password=redhat --org=test; done;

# LANG=en_US.UTF-8 subscription-manager register --username=stage_test_12 --password=redhat --org=test
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
HTTP error (400 - Bad Request): Organization test does not exist.

# LANG=de_DE.UTF-8 subscription-manager register --username=stage_test_12 --password=redhat --org=test
You are attempting to use a locale that is not installed.
Registrieren bei: subscription.rhsm.stage.redhat.com:443/subscription
HTTP error (400 - Bad Request): Organisation test existiert nicht.

# LANG=es_ES.UTF-8 subscription-manager register --username=stage_test_12 --password=redhat --org=test
You are attempting to use a locale that is not installed.
Registrándose a: subscription.rhsm.stage.redhat.com:443/subscription
HTTP error (400 - Bad Request): No existe la organización test.

# LANG=fr_FR.UTF-8 subscription-manager register --username=stage_test_12 --password=redhat --org=test
You are attempting to use a locale that is not installed.
Enregistrement sur : subscription.rhsm.stage.redhat.com:443/subscription
HTTP error (400 - Bad Request): L'organisation test n'existe pas.

# LANG=it_IT.UTF-8 subscription-manager register --username=stage_test_12 --password=redhat --org=test
You are attempting to use a locale that is not installed.
Registrazione con: subscription.rhsm.stage.redhat.com:443/subscription
HTTP error (400 - Bad Request): L'organizzazione test non esiste.

# LANG=ja_JP.UTF-8 subscription-manager register --username=stage_test_12 --password=redhat --org=test
You are attempting to use a locale that is not installed.
登録中: subscription.rhsm.stage.redhat.com:443/subscription
HTTP error (400 - Bad Request): 組織 test は存在しません。

# LANG=ko_KR.UTF-8 subscription-manager register --username=stage_test_12 --password=redhat --org=test
You are attempting to use a locale that is not installed.
등록 대상: subscription.rhsm.stage.redhat.com:443/subscription
HTTP error (400 - Bad Request): 조직 test이 존재하지 않습니다.

# LANG=pt_BR.UTF-8 subscription-manager register --username=stage_test_12 --password=redhat --org=test
You are attempting to use a locale that is not installed.
Registrando em: subscription.rhsm.stage.redhat.com:443/subscription
HTTP error (400 - Bad Request): Organization test does not exist.

# LANG=ru_RU.UTF-8 subscription-manager register --username=stage_test_12 --password=redhat --org=test
You are attempting to use a locale that is not installed.
Регистрация на subscription.rhsm.stage.redhat.com:443/subscription
HTTP error (400 - Bad Request): Организация test не существует.

# LANG=zh_CN.UTF-8 subscription-manager register --username=stage_test_12 --password=redhat --org=test
You are attempting to use a locale that is not installed.
正在注册到:subscription.rhsm.stage.redhat.com:443/subscription
HTTP error (400 - Bad Request): Organization test does not exist.

# LANG=zh_TW.UTF-8 subscription-manager register --username=stage_test_12 --password=redhat --org=test
You are attempting to use a locale that is not installed.
正在向 subscription.rhsm.stage.redhat.com:443/subscription 註冊
HTTP error (400 - Bad Request): Organization test does not exist.
[root@kvm-01-guest04 ~]# 



To csnyder,
There are two problems here...
1. The string "Organization {0} does not exist." is actually a Candlepin string which is translated in https://vendors.zanata.redhat.com/project/view/candlepin?dswid=7160 .  Once the translation for the Candlepin project in Zanata are complete, then they need to be pulled into a Candlepin build for Hosted and Satellite.  From the results above, you see that some langs are translated and some are not.

2. The HTTP error strings are not marked for translation in the subscription-manager src/rhsm/connection.py
[jsefler@jseflerP50 subscription-manager]$ grep -R "HTTP error (" 
src/rhsm/connection.py:        return "HTTP error (%s - %s): %s" % (self.code, error_title, self.msg)
src/rhsm/connection.py:        return "HTTP error (%s - %s)" % (self.code, error_title)

Comment 6 Lijun Li 2019-07-01 04:01:48 UTC
This is also reproduced on latest rhel7.7 snapshot build.

Comment 9 Lijun Li 2019-10-15 06:32:32 UTC
Reproduced on latest rhel8.1 build.
# subscription-manager register --username=stage_test_12 --password=redhat --org=test --force
取消注册:subscription.rhsm.stage.redhat.com:443/subscription
UUID 为 7b084e02-8226-436a-bc0e-cba50b56eb71 的系统已经被取消注册
已删除所有本地数据
正在注册到:subscription.rhsm.stage.redhat.com:443/subscription
HTTP error (400 - Bad Request): Organization test does not exist.


Note You need to log in before you can comment on or make changes to this bug.