RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1812140 - [ALL LANG][RHSM CLI] incomplete localized messages in syspurpose module.
Summary: [ALL LANG][RHSM CLI] incomplete localized messages in syspurpose module.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: subscription-manager
Version: 8.2
Hardware: Unspecified
OS: Unspecified
high
low
Target Milestone: rc
: ---
Assignee: candlepin-bugs
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-10 15:38 UTC by John Sefler
Modified: 2021-08-12 15:18 UTC (History)
3 users (show)

Fixed In Version: subscription-manager-1.28.13-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-08-12 15:18:39 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description John Sefler 2020-03-10 15:38:50 UTC
Description of problem:
While verifying localization fixes for Bug 1663432, it appears that an incomplete list of msgids have been extracted for translation.  Use this bug to extract more syspurpose strings to Zanata for translation and verification. 


Version-Release number of selected component (if applicable):
[root@kvm-06-guest32 ~]# rpm -q python3-syspurpose
python3-syspurpose-1.26.13-1.el8.x86_64
[root@kvm-06-guest32 ~]# rpm -qa | grep glibc-langpack-ja
glibc-langpack-ja-2.28-101.el8.x86_64


How reproducible:


Steps to Reproduce:
[root@kvm-06-guest32 ~]# ALL_LANGS="en_US de_DE es_ES fr_FR it_IT ja_JP ko_KR pt_BR ru_RU zh_CN zh_TW"
[root@kvm-06-guest32 ~]# ALL_LANGS="ja_JP"
[root@kvm-06-guest32 ~]# for L in $ALL_LANGS; do echo ""; echo "# LANG=$L.UTF-8 syspurpose --help"; LANG=$L.UTF-8 syspurpose  --help; done;

# LANG=ja_JP.UTF-8 syspurpose --help
usage: syspurpose [-h]
                  {set,unset,add,remove,set-role,unset-role,add-addons,remove-addons,unset-addons,set-sla,unset-sla,set-usage,unset-usage,show}
                  ...

System Syspurpose Management Tool

positional arguments:
  {set,unset,add,remove,set-role,unset-role,add-addons,remove-addons,unset-addons,set-sla,unset-sla,set-usage,unset-usage,show}
                        sub-command help
    set                 指定プロパティーの値を設定
    unset               指定プロパティーの値を無効化 (削除)
    add                 指定プロパティーに値を追加
    remove              指定プロパティーから値を削除
    set-role            Set the system role to the system syspurpose
    unset-role          Clear set role
    add-addons          Add addons to the system syspurpose
    remove-addons       Remove addons from the system syspurpose
    unset-addons        Clear set addons
    set-sla             システム SLA を設定
    unset-sla           SLA の設定を削除
    set-usage           システムの使用方法を設定します
    unset-usage         Clear set usage
    show                現行システムの syspurpose を表示します

optional arguments:
  -h, --help            show this help message and exit
[root@kvm-06-guest32 ~]# 

Actual results:
Although some msgid strings are clearly translated, many are not.  The following msgids are not yet translated...
   "System Syspurpose Management Tool"
   "Set the system role to the system syspurpose"
   "Clear set role"
   "Add addons to the system syspurpose"
   "Remove addons from the system syspurpose"
   "Clear set addons"
   "show this help message and exit"


Expected results:
Another way to test for the translated string is to search through the syspurpose.mo files like this...
[root@kvm-06-guest32 ~]# msgunfmt --no-wrap /usr/share/locale/ja/LC_MESSAGES/syspurpose.mo | grep -A1 "Clear"
msgid "Clear set sla"
msgstr "SLA の設定を削除"

Expected to find more translations for msgids "Clear set role", "Clear set addons", "Clear set usage"



Additional Info:

Here are examples of even more untranslated strings....

[root@kvm-06-guest32 ~]# LANG=ja_JP.UTF-8 syspurpose set-role "Red Hat Enterprise Linux Server"
role set to "Red Hat Enterprise Linux Server".
^^^^^^^^^^^
[root@kvm-06-guest32 ~]# LANG=ja_JP.UTF-8 syspurpose unset-role
role unset.
^^^^^^^^^^^
[root@kvm-06-guest32 ~]# LANG=ja_JP.UTF-8 syspurpose add-addons "E4S"
Added E4S to addons.
^^^^^     ^^
addons updated.
       ^^^^^^^
[root@kvm-06-guest32 ~]# LANG=ja_JP.UTF-8 syspurpose unset-addons
addons unset.
       ^^^^^
[root@kvm-06-guest32 ~]# LANG=ja_JP.UTF-8 syspurpose set-sla "Premium"
service_level_agreement set to "Premium".
                        ^^^^^^
[root@kvm-06-guest32 ~]# LANG=ja_JP.UTF-8 syspurpose unset-sla
service_level_agreement unset.
                        ^^^^^

Comment 3 Lijun Li 2020-09-07 09:48:50 UTC
Reproduced on latest rhel8.3 build.

[root@localhost ~]# syspurpose -h
usage: syspurpose [-h]
                  {set,unset,add,remove,set-role,unset-role,add-addons,remove-addons,unset-addons,set-sla,unset-sla,set-usage,unset-usage,show}
                  ...

System Syspurpose Management Tool

positional arguments:
  {set,unset,add,remove,set-role,unset-role,add-addons,remove-addons,unset-addons,set-sla,unset-sla,set-usage,unset-usage,show}
                        sub-command help
    set                 为给定属性设置值
    unset               为给定属性取消设置(清除设置)
    add                 为给定属性添加值
    remove              从给定属性中删除值
    set-role            将系统角色设置为系统 syspurpose
    unset-role          取消设置角色
    add-addons          将 addons 添加到系统 syspurpose
    remove-addons       将 addons 从系统 syspurpose 中删除
    unset-addons        取消设置 addons
    set-sla             设置系统的 SLA
    unset-sla           取消设置 SLA
    set-usage           设置系统 usage
    unset-usage         取消设置 usage
    show                显示当前系统的 syspurpose

optional arguments:
  -h, --help            show this help message and exit
[root@localhost ~]# syspurpose set test
usage: syspurpose set [-h] property value
syspurpose set: error: the following arguments are required: value
[root@localhost ~]# syspurpose set test
usage: syspurpose set [-h] property value
syspurpose set: error: the following arguments are required: value
[root@localhost ~]# syspurpose set "test"
usage: syspurpose set [-h] property value
syspurpose set: error: the following arguments are required: value
[root@localhost ~]# syspurpose set 1
usage: syspurpose set [-h] property value
syspurpose set: error: the following arguments are required: value
[root@localhost ~]# syspurpose set -h
usage: syspurpose set [-h] property value

positional arguments:
  property    要设置/更新的属性名称
  value       要设置的值

optional arguments:
  -h, --help  show this help message and exit
[root@localhost ~]# syspurpose set value 1
Warning: Provided key "value" is not included in the list of valid keys:
 - addons
 - usage
 - role
 - service_level_agreement
value 设置为 "1"。
[root@localhost ~]# syspurpose set property test
Warning: Provided key "property" is not included in the list of valid keys:
 - addons
 - usage
 - role
 - service_level_agreement
property 设置为 "test"。
[root@localhost ~]# syspurpose unset
usage: syspurpose unset [-h] property
syspurpose unset: error: the following arguments are required: property
[root@localhost ~]# syspurpose unset -h
usage: syspurpose unset [-h] property

positional arguments:
  property    要设置/更新的属性名称

optional arguments:
  -h, --help  show this help message and exit

Comment 5 John Sefler 2021-02-19 00:13:13 UTC
Note: The work on Bug 1899677 fixed many of the issues reported in this bug for LANGs [ja_JP fr_FR ko_KR zh_CN]...

[root@rhsm-auto8-gate-rhel ~]# rpm -q subscription-manager
subscription-manager-1.28.13-1.el8.x86_64

[root@rhsm-auto8-gate-rhel ~]# ALL_LANGS="en_US de_DE es_ES fr_FR it_IT ja_JP ko_KR pt_BR ru_RU zh_CN zh_TW"
[root@rhsm-auto8-gate-rhel ~]# ALL_LANGS="ja_JP fr_FR ko_KR zh_CN"
[root@rhsm-auto8-gate-rhel ~]# for L in $ALL_LANGS; do echo ""; echo "# LANG=$L.UTF-8 syspurpose --help"; LANG=$L.UTF-8 syspurpose  --help; done;

# LANG=ja_JP.UTF-8 syspurpose --help
usage: syspurpose [-h]
                  {set,unset,add,remove,set-role,unset-role,add-addons,remove-addons,unset-addons,set-sla,unset-sla,set-usage,unset-usage,show}
                  ...

System Syspurpose Management Tool

positional arguments:
  {set,unset,add,remove,set-role,unset-role,add-addons,remove-addons,unset-addons,set-sla,unset-sla,set-usage,unset-usage,show}
                        sub-command help
    set                 指定プロパティーの値を設定
    unset               指定プロパティーの値を無効化 (削除)
    add                 指定プロパティーに値を追加
    remove              指定プロパティーから値を削除
    set-role            システムロールをシステム syspurpose に設定
    unset-role          ロールの設定を削除
    add-addons          システム syspurpose にアドオンを追加
    remove-addons       システム syspurpose からアドオンを削除
    unset-addons        アドオンの設定を削除
    set-sla             システム SLA を設定
    unset-sla           SLA の設定を削除
    set-usage           システムの使用方法を設定します
    unset-usage         使用方法の設定を削除
    show                現行システムの syspurpose を表示します

optional arguments:
  -h, --help            show this help message and exit

# LANG=fr_FR.UTF-8 syspurpose --help
usage: syspurpose [-h]
                  {set,unset,add,remove,set-role,unset-role,add-addons,remove-addons,unset-addons,set-sla,unset-sla,set-usage,unset-usage,show}
                  ...

System Syspurpose Management Tool

positional arguments:
  {set,unset,add,remove,set-role,unset-role,add-addons,remove-addons,unset-addons,set-sla,unset-sla,set-usage,unset-usage,show}
                        sub-command help
    set                 Définit la valeur pour la propriété donnée
    unset               Supprime la valeur d'une propriété donnée
    add                 Ajoute la ou les valeur(s) pour une propriété donnée
    remove              Supprimer la ou les valeur(s) de la propriété donnée
    set-role            Définir le rôle du système en fonction du syspurpose
    unset-role          Supprimer le rôle défini
    add-addons          Ajout d'extensions au syspurpose système
    remove-addons       Ajout d'extensions en provenance du syspurpose système
    unset-addons        Supprimer les extensions définies
    set-sla             Définir sla système
    unset-sla           Supprimer sla défini
    set-usage           Définir utilisation système
    unset-usage         Supprimer utilisation définie
    show                Afficher syspurpose du système actuel

optional arguments:
  -h, --help            show this help message and exit

# LANG=ko_KR.UTF-8 syspurpose --help
usage: syspurpose [-h]
                  {set,unset,add,remove,set-role,unset-role,add-addons,remove-addons,unset-addons,set-sla,unset-sla,set-usage,unset-usage,show}
                  ...

System Syspurpose Management Tool

positional arguments:
  {set,unset,add,remove,set-role,unset-role,add-addons,remove-addons,unset-addons,set-sla,unset-sla,set-usage,unset-usage,show}
                        sub-command help
    set                 주어진 속성에 대한 값 설정
    unset               주어진 속성에 대한 설정 취소 (설정 지우기)
    add                 주어진 속성에 대한 값 추가
    remove              주어진 속성에서 값을 제거합니다
    set-role            시스템 역할을 시스템 syspurpose로 설정
    unset-role          역할 설정 삭제
    add-addons          시스템 syspurpose에 애드온 추가
    remove-addons       시스템 syspurpose에서 애드온 제거
    unset-addons        애드온 설정 삭제
    set-sla             시스템의 SLA 설정
    unset-sla           SLA 설정 해제
    set-usage           시스템의 사용 방법 설정
    unset-usage         사용 방법 설정 삭제
    show                현재 시스템의 syspurpose 표시

optional arguments:
  -h, --help            show this help message and exit

# LANG=zh_CN.UTF-8 syspurpose --help
usage: syspurpose [-h]
                  {set,unset,add,remove,set-role,unset-role,add-addons,remove-addons,unset-addons,set-sla,unset-sla,set-usage,unset-usage,show}
                  ...

System Syspurpose Management Tool

positional arguments:
  {set,unset,add,remove,set-role,unset-role,add-addons,remove-addons,unset-addons,set-sla,unset-sla,set-usage,unset-usage,show}
                        sub-command help
    set                 为给定属性设置值
    unset               为给定属性取消设置(清除设置)
    add                 为给定属性添加值
    remove              从给定属性中删除值
    set-role            将系统角色设置为系统 syspurpose
    unset-role          取消设置角色
    add-addons          将 addons 添加到系统 syspurpose
    remove-addons       将 addons 从系统 syspurpose 中删除
    unset-addons        取消设置 addons
    set-sla             设置系统的 SLA
    unset-sla           取消设置 SLA
    set-usage           设置系统的使用
    unset-usage         取消设置 usage
    show                显示当前系统的 syspurpose

optional arguments:
  -h, --help            show this help message and exit
[root@rhsm-auto8-gate-rhel ~]# 
[root@rhsm-auto8-gate-rhel ~]# 
[root@rhsm-auto8-gate-rhel ~]# 
[root@rhsm-auto8-gate-rhel ~]# 
[root@rhsm-auto8-gate-rhel ~]# LANG=ja_JP.UTF-8 syspurpose set-role "Red Hat Enterprise Linux Server"
role を "Red Hat Enterprise Linux Server" に設定しました。
[root@rhsm-auto8-gate-rhel ~]# 
[root@rhsm-auto8-gate-rhel ~]# LANG=ja_JP.UTF-8 syspurpose unset-role
role の設定を解除しました。
[root@rhsm-auto8-gate-rhel ~]# 
[root@rhsm-auto8-gate-rhel ~]# LANG=ja_JP.UTF-8 syspurpose add-addons "E4S"
E4S を addons に追加しました。
addons を更新しました。
[root@rhsm-auto8-gate-rhel ~]# 
[root@rhsm-auto8-gate-rhel ~]# LANG=ja_JP.UTF-8 syspurpose unset-addons
addons の設定を解除しました。
[root@rhsm-auto8-gate-rhel ~]# 
[root@rhsm-auto8-gate-rhel ~]# LANG=ja_JP.UTF-8 syspurpose set-sla "Premium"
service_level_agreement を "Premium" に設定しました。
[root@rhsm-auto8-gate-rhel ~]# 
[root@rhsm-auto8-gate-rhel ~]# LANG=ja_JP.UTF-8 syspurpose unset-sla
service_level_agreement の設定を解除しました。


VERIFIED: Fixed by Bug 1899677

Comment 6 John Sefler 2021-02-19 00:17:12 UTC
(In reply to Lijun Li from comment #3)

> optional arguments:
>   -h, --help            show this help message and exit
> [root@localhost ~]# syspurpose set test
> usage: syspurpose set [-h] property value
> syspurpose set: error: the following arguments are required: value
> [root@localhost ~]# syspurpose set test
> usage: syspurpose set [-h] property value
> syspurpose set: error: the following arguments are required: value
> [root@localhost ~]# syspurpose set "test"
> usage: syspurpose set [-h] property value
> syspurpose set: error: the following arguments are required: value
> [root@localhost ~]# syspurpose set 1
> usage: syspurpose set [-h] property value
> syspurpose set: error: the following arguments are required: value
> [root@localhost ~]# syspurpose set -h
> usage: syspurpose set [-h] property value


I think these untranslated strings are owned by python and not by subscription-manager.


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