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 2077759 - [ALL LANG][RHSM Cockpit Client] Unlocalized windows title name 'Subscriptions'.
Summary: [ALL LANG][RHSM Cockpit Client] Unlocalized windows title name 'Subscriptions'.
Keywords:
Status: CLOSED ERRATA
Alias: None
Deadline: 2023-03-28
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: subscription-manager-cockpit
Version: 9.0
Hardware: x86_64
OS: All
medium
medium
Target Milestone: rc
: 9.2
Assignee: Pino Toscano
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-04-22 07:20 UTC by Lijun Li
Modified: 2023-05-09 10:39 UTC (History)
9 users (show)

Fixed In Version: subscription-manager-cockpit-5-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 08:24:42 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager-cockpit pull 41 0 None Merged 2077759: invoke cockpit.translate() after document loading 2023-01-06 12:52:36 UTC
Red Hat Issue Tracker RHELPLAN-119651 0 None None None 2022-04-22 07:34:32 UTC
Red Hat Product Errata RHBA-2023:2555 0 None None None 2023-05-09 08:24:44 UTC

Description Lijun Li 2022-04-22 07:20:45 UTC
Description of problem:
[ALL LANG][RHSM Cockpit Client] Unlocalized windows title name 'Subscriptions'.

Version-Release number of selected component (if applicable):
rhsm with latest RHEL9.0 build

How reproducible:
100%


Steps to Reproduce:
1. Open RHSM Cockpit Client via click Applications - System Tools - Red Hat Subscription Manager on the top menu bar from desktop.
2. Check the Cockpit Clent - Subscriptions windows title name.


Actual results:
[ALL LANG][RHSM Cockpit Client] Unlocalized windows title name 'Subscriptions'.

Expected results:
It should be localized.

Additional info:
Please see the attached screen-shot.

Comment 3 Pino Toscano 2022-07-08 12:11:40 UTC
Hello Lijun Li,

there should be a new version of the cockpit plugin available in 9.1 nightlies, subscription-manager-cockpit-2-1.el9.
Would it be possible for you to check whether the issue is still reproducible in this new version?

Thanks in advance!

Comment 5 Jan Stavel 2022-07-19 11:40:02 UTC
I see an unlocalized window title still.

    PACKAGES TESTED:

    subscription-manager-1.29.29+2.g765ad6609-1.git.0.b845bc0.x86_64

    subscription-manager-cockpit-2^4.gc674aee-1.el9.noarch

    subscription-manager-rhsm-certificates-20220623-1.el9.noarch

    package subscription-manager-initial-setup-addon is not installed
    package dnf-plugin-subscription-manager is not installed

    python3-cloud-what-1.29.29+2.g765ad6609-1.git.0.b845bc0.x86_64

    python3-subscription-manager-rhsm-1.29.29+2.g765ad6609-1.git.0.b845bc0.x86_64


    package python3-syspurpose is not installed
    package rhsm-gtk is not installed
    rhsm-icons-2-1.el9.noarch
    package subscription-manager-migration is not installed
    package subscription-manager-migration-data is not installed
    package subscription-manager-plugin-ostree is not installed

Comment 6 Martin Pitt 2022-07-20 06:26:28 UTC
The window title is coming from the <title> HTMl attribute, in this case https://github.com/candlepin/subscription-manager-cockpit/blob/main/src/index.html#L22

The title is translated in both Japanese and Chinese:
https://github.com/candlepin/subscription-manager-cockpit/blob/main/po/ja.po#L431
https://github.com/candlepin/subscription-manager-cockpit/blob/main/po/zh_CN.po#L423

However sub-man-cockpit is missing a call to cockpit.translate(), see https://cockpit-project.org/guide/latest/cockpit-locale.html#cockpit-translate

Example: https://github.com/cockpit-project/cockpit/blob/main/pkg/sosreport/index.jsx#L541

Indeed starter-kit is missing that, I'll send a PR with a test.

Comment 7 Martin Pitt 2022-07-20 14:14:47 UTC
Pino: I tested that in starter-kit, c-{podman,machines}, and the window title is properly translated, at least in the browser (I didn't check in c-desktop, as that doesn't work on my machine and I don't have a graphical VM handy.) I sent https://github.com/cockpit-project/starter-kit/pull/596 to ensure it stays working, but TBH I can't currently say *why* it works (sorry, this would take some time, and I have about 5 other things to do right now.. please prod me again if you need details).

One difference in https://github.com/candlepin/subscription-manager-cockpit/blob/main/src/index.html compared to starter-kit and friends is that it loads the js scripts at the *end* of <body>, whereas every other cockpit project loads them in <head>. So I suggest: (1) try with cockpit.translate() -- at worst it's harmless, and (2) try to move the script order to see if that makes a difference.

Comment 8 Matej Marušák 2022-07-21 07:32:57 UTC
I can reproduce this on my local rhel machine. I also tested different pages like Accounts or Podman and neither has the title translated when using cockpit-desktop.

Adding cockpit.translate() actually fixes this behavior. Accounts and Podman also miss this call. However Terminal or Sosreport have this call but do NOT have translated titles.

Comment 9 Matej Marušák 2022-07-21 07:46:10 UTC
Update, Terminal works, I am using french to test this and the translation of Terminal is Terminal. When I updated the translation then it was used. Still looking what is the issue with sosreport as it has translation and is not equal.

Comment 10 Jan Stavel 2022-10-06 17:50:56 UTC
I have verified that a title 'Subscriptions' is displayed in translated version.
image attached.

    subscription-manager-cockpit-4^11.g9a71113-1.el9_1.noarch
    python3-subscription-manager-rhsm-1.29.30-1.el9.x86_64
    rhsm-icons-4^11.g9a71113-1.el9_1.noarch

Comment 15 Zdenek Petracek 2023-02-13 13:46:28 UTC
I have verified, that "Subscription" tab is translated to a set language. Adding attachment with more info.

[root@localhost ~]# subscription-manager version
服务器类型:红帽订阅管理(Red Hat Subscription Management)
订阅管理服务器:4.2.12-1
订阅管理规则:5.43
subscription-manager: 1.29.32-1.el9


[root@localhost ~]# rpm -qa | grep cockpit
cockpit-bridge-284-1.el9.x86_64
cockpit-system-284-1.el9.noarch
subscription-manager-cockpit-5-1.el9.noarch
cockpit-storaged-284-1.el9.noarch
cockpit-packagekit-284-1.el9.noarch
cockpit-ws-284-1.el9.x86_64
cockpit-284-1.el9.x86_64
cockpit-podman-62-1.el9.noarch

Comment 18 errata-xmlrpc 2023-05-09 08:24:42 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-cockpit 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-2023:2555


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