Bug 1956764

Summary: [ALL LANG][RHSM CLI] Unlocalized message in role/usage/addon/sla module.
Product: Red Hat Enterprise Linux 8 Reporter: Shwetha Kallesh <skallesh>
Component: subscription-managerAssignee: Pino Toscano <ptoscano>
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.5CC: jsefler, jwboyer, redakkan
Target Milestone: betaKeywords: Translation, Triaged
Target Release: 8.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.28.17-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-09 19:37:58 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: 1944093    
Bug Blocks:    

Description Shwetha Kallesh 2021-05-04 11:31:23 UTC
Description of problem:
[ALL LANG][RHSM CLI] Unlocalized message in role/usage/addon/sla module.

Version-Release number of selected component (if applicable):
[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


How reproducible:


Steps to Reproduce:
[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"。

[root@ibm-x3650m4-01-vm-14 ~]# LANG=zh_CN.utf-8 subscription-manager service-level --set "RHEL Server"
Warning: Provided value "RHEL Server" is not included in the list of valid values
 - Super
 - Full-Service
 - Premium
 - Standard
 - None
service_level_agreement 设置为 "RHEL Server"。

[root@ibm-x3650m4-01-vm-14 ~]# LANG=zh_CN.utf-8 subscription-manager usage --set "RHEL Server"
Warning: Provided value "RHEL Server" is not included in the list of valid values
 - Production
 - Development
usage 设置为 "RHEL Server"。

[root@ibm-x3650m4-01-vm-14 ~]# LANG=zh_CN.utf-8 subscription-manager addons --add=test
Warning: Provided value "test" is not included in the list of valid values       ------------> FAILED , warning message is not translated
 - ADDON1
 - ADDON3
 - ADDON2
addons 已更新。





Actual results:

The message "Warning: Provided value "XXXXXX" is not included in the list of valid values" is unlocalised

Expected results:
warning message "Warning: Provided value "RHEL Server" is not included in the list of valid values" should be translated

Additional info:

Comment 1 Pino Toscano 2021-05-04 11:36:21 UTC
To be more precise: the string itself is properly marked for translation (loading it at runtime).
The problem is that I forgot to update the translation catalogs before the release of 1.28.16, so the string is not found in any translation (even if you see it, it is a plural string now).

Comment 2 Shwetha Kallesh 2021-06-02 10:00:51 UTC
 awaiting translations to pre-verify the bug 

[root@kvm-01-guest13 ~]# 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
 - Red Hat Enterprise Linux Workstation
 - SP Server
 - Red Hat Enterprise Linux Server
 - Red Hat Enterprise Linux Compute Node
role 设置为 "RHEL Server"。
[root@kvm-01-guest13 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.2.18-1
subscription management rules: 5.41
subscription-manager: 1.28.16-1.git.20.3f88366.el8

Comment 3 John Sefler 2021-07-15 14:54:09 UTC
Pre-verification...

[root@kvm-04-guest12 ~]# rpm -q subscription-manager
subscription-manager-1.28.19-1.el8.x86_64
[root@kvm-04-guest12 ~]# 
[root@kvm-04-guest12 ~]# rpm -q subscription-manager --changelog | grep 1956764
- 1956764: New extraction for translatable strings (ptoscano)
[root@kvm-04-guest12 ~]# 
[root@kvm-04-guest12 ~]# msgunfmt /usr/share/locale/it/LC_MESSAGES/rhsm.mo --no-wrap | grep "is not included" -A4
msgid "Warning: Provided value {vals} is not included in the list of valid values"
msgid_plural "Warning: Provided values {vals} are not included in the list of valid values"
msgstr[0] "Avviso: il valore fornito {vals} non è incluso nella lista dei valori validi"
msgstr[1] "Avviso: i valori forniti {vals} non sono inclusi nella lista dei valori validi"

[root@kvm-04-guest12 ~]# 
[root@kvm-04-guest12 ~]# subscription-manager register
Registering to: subscription.rhsm.redhat.com:443/subscription
Username: rhelentqe
Password: 
The system has been registered with ID: 11173e64-3f1d-430e-84d0-b54b6aaa9b48
The registered system name is: kvm-04-guest12.hv2.lab.eng.bos.redhat.com
[root@kvm-04-guest12 ~]# 
[root@kvm-04-guest12 ~]# LANG=it_IT.utf-8 subscription-manager role --set "RHEL Server"
Avviso: il valore fornito "RHEL Server" non è incluso nella lista dei valori validi
 - Red Hat Enterprise Linux Workstation
 - Red Hat Enterprise Linux Server
 - Red Hat Enterprise Linux Compute Node
"role" impostato a "RHEL Server".
[root@kvm-04-guest12 ~]# 


PRE-VERIFIED: The msgid "Warning: Provided value {vals} is not included in the list of valid values" has been marked and extracted for translations along with a corresponding  msgid_plural.  Moreover, this build also contains translations for Italian.  Translations for other supported languages will be provided by bug 1944093.

Comment 6 Rehana 2021-07-16 12:42:52 UTC
Verifying on :
=============
subscription management server: 3.2.19-1
subscription management rules: 5.41
subscription-manager: 1.28.19-1.el8

# rpm -q subscription-manager --changelog | grep 1956764
- 1956764: New extraction for translatable strings (ptoscano)

# msgunfmt /usr/share/locale/it/LC_MESSAGES/rhsm.mo --no-wrap | grep "is not included" -A4
msgid "Warning: Provided value {vals} is not included in the list of valid values"
msgid_plural "Warning: Provided values {vals} are not included in the list of valid values"
msgstr[0] "Avviso: il valore fornito {vals} non è incluso nella lista dei valori validi"
msgstr[1] "Avviso: i valori forniti {vals} non sono inclusi nella lista dei valori validi"

On registered system 

# LANG=it_IT.utf-8 subscription-manager role --set "RHEL Server"
Avviso: il valore fornito "RHEL Server" non è incluso nella lista dei valori validi
 - Red Hat Enterprise Linux Workstation
 - Red Hat Enterprise Linux Server
 - Red Hat Enterprise Linux Compute Node
"role" impostato a "RHEL Server".

On unregistered system:
# LANG=it_IT.utf-8 subscription-manager usage --set="QA" --username=***** --password=****
\Avviso: il valore fornito "QA" non è incluso nella lista dei valori validi
 - Development/Test
 - Production
"usage" impostato a "QA".

Based on the above observation, moving the bug as Verified!!

Comment 8 errata-xmlrpc 2021-11-09 19:37:58 UTC
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