Bug 1663402
| Summary: | [ALL LANG][RHSM CLI] Unlocalized message in role module. | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Lijun Li <lijli> | |
| Component: | subscription-manager | Assignee: | Pino Toscano <ptoscano> | |
| Status: | CLOSED ERRATA | QA Contact: | Red Hat subscription-manager QE Team <rhsm-qe> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | medium | |||
| Version: | 8.0 | CC: | jhnidek, jsefler, khowell, lmiksik, qe-i18n-bugs, redakkan, wpoteat | |
| Target Milestone: | rc | Keywords: | Reopened, Translation, Triaged | |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
|
| Hardware: | x86_64 | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | subscription-manager-1.28.16-1.el8 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1805619 (view as bug list) | Environment: | ||
| Last Closed: | 2021-11-09 19:37:12 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: | 1682763 | |||
| Bug Blocks: | 1805619 | |||
This is also on latest rhel7.7 snapshot build. Reproduced on latest rhel8.1 build.
# subscription-manager role -h
使用:subscription-manager role [选项]
Modify system purpose role
选项:
-h, --help 显示此帮助信息并退出
--proxy=PROXY_URL 代理服务器 URL 的格式为 proxy_hostname:proxy_port
--proxyuser=PROXY_USER
使用基本验证的 HTTP 代理服务器的用户
--proxypassword=PROXY_PASSWORD
使用基本验证的 HTTP 代理服务器的密码
--noproxy=NO_PROXY 跳过 HTTP 代理的主机后缀
--set=SET Set role of system purpose
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Unlocalized message.
--unset Unset role of system purpose
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Unlocalized message.
# subscription-manager role --set "RHEL Server"
role set to "RHEL Server".
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Unlocalized message.
# subscription-manager role
Current Role: RHEL Server
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Unlocalized message.
# subscription-manager role --unset
role unset.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Unlocalized message.
# subscription-manager role -h
使用:subscription-manager role [选项]
Modify system purpose role
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Unlocalized message.
选项:
-h, --help 显示此帮助信息并退出
--proxy=PROXY_URL 代理服务器 URL 的格式为 proxy_hostname:proxy_port
--proxyuser=PROXY_USER
使用基本验证的 HTTP 代理服务器的用户
--proxypassword=PROXY_PASSWORD
使用基本验证的 HTTP 代理服务器的密码
--noproxy=NO_PROXY 跳过 HTTP 代理的主机后缀
--set=SET Set role of system purpose
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Unlocalized message.
--unset Unset role of system purpose
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Unlocalized message.
# subscription-manager role --set "RHEL Server"
role set to "RHEL Server".
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Unlocalized message.
# subscription-manager role
Current Role: RHEL Server
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Unlocalized message.
# subscription-manager role --unset
role unset.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Unlocalized message.
Testing with version....
[root@hpe-dl380pgen8-02-vm-15 ~]# rpm -q subscription-manager
subscription-manager-1.27.13-1.el8.x86_64
[root@hpe-dl380pgen8-02-vm-15 ~]# rpm -q subscription-manager --changelog | grep 1663402
- 1663116: 1663390: 1663402: 1663408: Update translations (wpoteat)
[root@hpe-dl380pgen8-02-vm-15 ~]#
[root@hpe-dl380pgen8-02-vm-15 ~]# LANG=zh_CN.utf-8 subscription-manager role -h
使用:subscription-manager role [选项]
修改系统目的角色 <====== PASSED
选项:
-h, --help 显示此帮助信息并退出
--proxy=PROXY_URL 代理服务器 URL 的格式为 proxy_hostname:proxy_port
--proxyuser=PROXY_USER
使用基本验证的 HTTP 代理服务器的用户
--proxypassword=PROXY_PASSWORD
使用基本验证的 HTTP 代理服务器的密码
--noproxy=NO_PROXY 跳过 HTTP 代理的主机后缀
--username=USERNAME 在服务器中进行验证时使用的用户名
--password=PASSWORD 在服务器中进行验证时使用的密码
--token=TOKEN 在服务器中进行验证时使用的令牌
--org=ORG_KEY 指定机构
--set=SET set role of system purpose <====== FAILEDQA - CHANGED STRING (Set => set)
--unset unset role of system purpose <====== FAILEDQA - CHANGED STRING (Unset => unset)
--show how this system's current role <====== FAILEDQA - NEW UNTRANSLATED STRING
--list list all role available <====== FAILEDQA - NEW UNTRANSLATED STRING
[root@hpe-dl380pgen8-02-vm-15 ~]# LANG=zh_CN.utf-8 subscription-manager role --set "RHEL Server"
Warning: Provided value "RHEL Server" is not included in the list of valid values <====== FAILEDQA - NEW UNTRANSLATED STRING
- Red Hat Enterprise Linux Workstation
- Red Hat Enterprise Linux Server
- Red Hat Enterprise Linux Compute Node
role 设置为 "RHEL Server"。 <====== PASSED
[root@hpe-dl380pgen8-02-vm-15 ~]# LANG=zh_CN.utf-8 subscription-manager role
Current Role: RHEL Server <====== FAILEDQA - UNTRANSLATED STRING "Current {name}: {val}" ???
[root@hpe-dl380pgen8-02-vm-15 ~]# LANG=zh_CN.utf-8 subscription-manager role --unset
role 取消设置。 <====== PASSED
Moving back to NEW/FailedQA
(In reply to John Sefler from comment #7) > [root@hpe-dl380pgen8-02-vm-15 ~]# LANG=zh_CN.utf-8 subscription-manager role > Current Role: RHEL Server <====== FAILEDQA - UNTRANSLATED STRING "Current {name}: {val}" ??? This appears to be working as expected - don't know why it failed for me the first time.... [root@hpe-dl380pgen8-02-vm-15 ~]# LANG=zh_CN.utf-8 subscription-manager role Role 未设置。 <====== PASSED Also note the typo in the msgstr...
[root@hpe-dl380pgen8-02-vm-15 ~]# subscription-manager role -h | grep "this system's current"
--show how this system's current role
^^^
FAILEDQA - EXPECTED "show"
Reproduced on latest rhel8.3 build.
[root@localhost ~]# subscription-manager role -h
使用:8 role [选项]
修改系统目的角色
选项:
-h, --help 显示此帮助信息并退出
--proxy=PROXY_URL 代理服务器 URL 的格式为 proxy_hostname:proxy_port
--proxyuser=PROXY_USER
使用基本验证的 HTTP 代理服务器的用户
--proxypassword=PROXY_PASSWORD
使用基本验证的 HTTP 代理服务器的密码
--noproxy=NO_PROXY 跳过 HTTP 代理的主机后缀
--username=USERNAME 在服务器中进行验证时使用的用户名
--password=PASSWORD 在服务器中进行验证时使用的密码
--token=TOKEN 在服务器中进行验证时使用的令牌
--org=ORG_KEY 指定机构
--set=SET set role of system purpose <====== FAILEDQA
--unset unset role of system purpose <====== FAILEDQA
--show how this system's current role <====== FAILEDQA & Typo how->show
--list list all role available <====== FAILEDQA
[root@localhost ~]# subscription-manager role --set=test
Warning: Provided value "test" is not included in the list of valid values <====== FAILEDQA
- Red Hat Enterprise Linux Server
role 设置为 "test"。
[root@localhost ~]# subscription-manager role --show
Current Role: Red Hat Enterprise Linux Server <====== FAILEDQA
[root@localhost ~]# subscription-manager role --list
+-------------------------------------------+
Available role <====== FAILEDQA
+-------------------------------------------+
- Red Hat Enterprise Linux Server
[root@localhost ~]# subscription-manager role
Current Role: Red Hat Enterprise Linux Server <====== FAILEDQA
[root@localhost ~]# rpm -q subscription-manager
subscription-manager-1.27.15-1.el8.x86_64
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened. Re-testing with subscription-manager targeted for RHEL8.4...
[root@hpe-dl380pgen8-02-vm-2 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.4 Beta (Ootpa)
[root@hpe-dl380pgen8-02-vm-2 ~]# rpm -q subscription-manager
subscription-manager-1.28.13-2.el8.x86_64
[root@hpe-dl380pgen8-02-vm-2 ~]# rpm -q subscription-manager --changelog | grep 1899677
- 1899677: Extract of strings for translations (#2399) (wpoteat)
[root@hpe-dl380pgen8-02-vm-2 ~]#
[root@hpe-dl380pgen8-02-vm-2 ~]#
[root@hpe-dl380pgen8-02-vm-2 ~]# LANG=zh_CN.utf-8 subscription-manager role -h
使用:subscription-manager role [选项]
修改系统目的角色
选项:
-h, --help 显示此帮助信息并退出
--proxy=PROXY_URL 代理服务器 URL 的格式为 proxy_hostname:proxy_port
--proxyuser=PROXY_USER
使用基本验证的 HTTP 代理服务器的用户
--proxypassword=PROXY_PASSWORD
使用基本验证的 HTTP 代理服务器的密码
--noproxy=NO_PROXY 跳过 HTTP 代理的主机后缀
--username=USERNAME 在服务器中进行验证时使用的用户名
--password=PASSWORD 在服务器中进行验证时使用的密码
--token=TOKEN 在服务器中进行验证时使用的令牌
--org=ORG_KEY 指定机构
--set=SET 设置系统目的 role
--unset 取消设置系统目的 role
--show 显示本系统目前的 role
--list 列出所有可用的 role
[root@hpe-dl380pgen8-02-vm-2 ~]#
[root@hpe-dl380pgen8-02-vm-2 ~]# LANG=zh_CN.utf-8 subscription-manager role --set "RHEL Server"
警告:所提供的值 "RHEL Server" 没有包括在有效值列表中
- Red Hat Enterprise Linux Workstation
- SP Server
- Red Hat Enterprise Linux Server
- Red Hat Enterprise Linux Compute Node
role 设置为 "RHEL Server"。
[root@hpe-dl380pgen8-02-vm-2 ~]#
[root@hpe-dl380pgen8-02-vm-2 ~]# LANG=zh_CN.utf-8 subscription-manager role
Current Role: RHEL Server <============ FAILED QA
[root@hpe-dl380pgen8-02-vm-2 ~]#
[root@hpe-dl380pgen8-02-vm-2 ~]# LANG=zh_CN.utf-8 subscription-manager role --unset
role 取消设置。
[root@hpe-dl380pgen8-02-vm-2 ~]#
[root@hpe-dl380pgen8-02-vm-2 ~]# LANG=zh_CN.utf-8 subscription-manager role --list
+-------------------------------------------+
可用 role
+-------------------------------------------+
- Red Hat Enterprise Linux Workstation
- SP Server
- Red Hat Enterprise Linux Server
- Red Hat Enterprise Linux Compute Node
[root@hpe-dl380pgen8-02-vm-2 ~]# msgunfmt --no-wrap /usr/share/locale/zh_CN/LC_MESSAGES/rhsm.mo | grep -A1 "Current "
msgid "Current service level: %s"
msgstr "当前服务等级:%s"
--
msgid "Current {name}: {val}"
msgstr "当前 {name}: {val}" <========== EXPECTED THIS TRANSLATION TO BE USED
--
msgid "Installed Product Current Status:"
msgstr "已安装的产品的当前状态:"
(In reply to John Sefler from comment #18) > [root@hpe-dl380pgen8-02-vm-2 ~]# LANG=zh_CN.utf-8 subscription-manager role > Current Role: RHEL Server <============ FAILED QA > [root@hpe-dl380pgen8-02-vm-2 ~]# msgunfmt --no-wrap > msgid "Current {name}: {val}" > msgstr "当前 {name}: {val}" <========== EXPECTED THIS TRANSLATION TO BE USED Indeed, I can confirm this. The string is properly extracted and translated in some languages, however it is not translated properly at runtime due to a logic error: print(_("Current {name}: {val}".format(name=self.name.capitalize(), val=values))) (i.e. format() is applied on the English string, rather than the translated string.) Thanks for testing, I'm reopening this bug and fixing this for 8.5. Pre-verification comments:
[root@ibm-x3650m4-01-vm-14 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.2.11-1
subscription management rules: 5.41
subscription-manager: 1.28.16-1.el8
[root@ibm-x3650m4-01-vm-14 ~]# LANG=zh_CN.utf-8 subscription-manager role -h
使用:subscription-manager role [选项]
修改系统目的角色
选项:
-h, --help 显示此帮助信息并退出
--proxy=PROXY_URL 代理服务器 URL 的格式为 proxy_hostname:proxy_port
--proxyuser=PROXY_USER
使用基本验证的 HTTP 代理服务器的用户
--proxypassword=PROXY_PASSWORD
使用基本验证的 HTTP 代理服务器的密码
--noproxy=NO_PROXY 跳过 HTTP 代理的主机后缀
--username=USERNAME 在服务器中进行验证时使用的用户名
--password=PASSWORD 在服务器中进行验证时使用的密码
--token=TOKEN 在服务器中进行验证时使用的令牌
--org=ORG_KEY 指定机构
--set=SET 设置系统目的 role
--unset 取消设置系统目的 role
--show 显示本系统目前的 role
--list 列出所有可用的 role
[root@ibm-x3650m4-01-vm-14 ~]# LANG=zh_CN.utf-8 subscription-manager role --set "SP Server"
role 设置为 "SP Server"。
root@ibm-x3650m4-01-vm-14 ~]# LANG=zh_CN.utf-8 subscription-manager role
当前 Role: SP Server
[root@ibm-x3650m4-01-vm-14 ~]# LANG=zh_CN.utf-8 subscription-manager role --unset
role 取消设置。
[root@ibm-x3650m4-01-vm-14 ~]# subscription-manager role -h | grep "this system's current"
--show show this system's current role
The following failing case of unlocalised warning message is tracked by the bug https://bugzilla.redhat.com/show_bug.cgi?id=1956764
[root@ibm-x3650m4-01-vm-14 ~]# LANG=zh_CN.utf-8 subscription-manager role --set "RHEL Server"
Warning: Provided value "RHEL Server" is not included in the list of valid values
- SP Starter
- SP Server
role 设置为 "RHEL Server"。
Verification comments:
[root@kvm-02-guest25 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.2.11-1
subscription management rules: 5.41
subscription-manager: 1.28.16-1.el8
root@kvm-02-guest25 ~]# LANG=zh_CN.utf-8 subscription-manager role -h
使用:subscription-manager role [选项]
修改系统目的角色
选项:
-h, --help 显示此帮助信息并退出
--proxy=PROXY_URL 代理服务器 URL 的格式为 proxy_hostname:proxy_port
--proxyuser=PROXY_USER
使用基本验证的 HTTP 代理服务器的用户
--proxypassword=PROXY_PASSWORD
使用基本验证的 HTTP 代理服务器的密码
--noproxy=NO_PROXY 跳过 HTTP 代理的主机后缀
--username=USERNAME 在服务器中进行验证时使用的用户名
--password=PASSWORD 在服务器中进行验证时使用的密码
--token=TOKEN 在服务器中进行验证时使用的令牌
--org=ORG_KEY 指定机构
--set=SET 设置系统目的 role
--unset 取消设置系统目的 role
--show 显示本系统目前的 role
--list 列出所有可用的 role
[root@kvm-02-guest25 ~]# LANG=zh_CN.utf-8 subscription-manager role --set "SP Server"
role 设置为 "SP Server"。
[root@kvm-02-guest25 ~]# LANG=zh_CN.utf-8 subscription-manager role
当前 Role: SP Server
[root@kvm-02-guest25 ~]# LANG=zh_CN.utf-8 subscription-manager role --unset
role 取消设置。
The following failing case of unlocalised warning message is tracked by the bug https://bugzilla.redhat.com/show_bug.cgi?id=1956764
[root@kvm-02-guest25 ~]# LANG=zh_CN.utf-8 subscription-manager role --set "RHEL Server"
Warning: Provided value "RHEL Server" is not included in the list of valid values
- SP Starter
- SP Server
role 设置为 "RHEL Server"。
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (subscription-manager bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:4390 |
Description of problem: Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: # subscription-manager role -h 使用:subscription-manager role [选项] 修改系统目的角色 选项: -h, --help 显示此帮助信息并退出 --proxy=PROXY_URL 代理服务器 URL 的格式为 proxy_hostname:proxy_port --proxyuser=PROXY_USER 使用基本验证的 HTTP 代理服务器的用户 --proxypassword=PROXY_PASSWORD 使用基本验证的 HTTP 代理服务器的密码 --noproxy=NO_PROXY 跳过 HTTP 代理的主机后缀 --set=SET Set role of system purpose --unset Unset role of system purpose ^^^^^^^^^^^^^^^^^Unlocalized message. # subscription-manager role --set "RHEL Server" role set to "RHEL Server". ^^^^^^^^^^^^^^^Unlocalized message. # subscription-manager role Role not set. ^^^^^^Unlocalized message. Expected results: It should be localized. Additional info: