Bug 1947367 - Missing Compliance/SyspurposeCompliance translations
Summary: Missing Compliance/SyspurposeCompliance translations
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 3.2
Hardware: Unspecified
OS: Unspecified
high
low
Target Milestone: ---
: 3.1
Assignee: candlepin-bugs
QA Contact:
URL:
Whiteboard:
Depends On: 1947354 1947368
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-08 10:14 UTC by Nikos Moumoulidis
Modified: 2021-06-23 09:10 UTC (History)
4 users (show)

Fixed In Version: candlepin-3.1.29-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1947354
Environment:
Last Closed: 2021-06-23 09:10:24 UTC
Embargoed:


Attachments (Terms of Use)

Description Nikos Moumoulidis 2021-04-08 10:14:05 UTC
+++ This bug was initially created as a clone of Bug #1947354 +++

Description of problem:
As described in comment 1663388#c10, there are missing translations from candlepin. More specifically:
1 "Not supported by a valid subscription."
2 "The requested usage preference "Test" is not provided by a currently consumed subscription."
3 "The requested add-on "test" is not provided by a currently consumed subscription."
4 "The service level preference "Unavailable" is not provided by a currently consumed subscription."

Version-Release number of selected component (if applicable):
- Probably most candlepin versions, but surely anything after 3.0
- A subman version available in RHEL 8.4, e.g. 1.28.3

How reproducible:
100%

Steps to Reproduce:
1. Add at least one installed product cert in your local machine
1. Set some syspurpose preference values locally (usage, role, addon, sla)
2. Run the status command with a language, e.g. "LANG=zh_CN.UTF-8 subscription-manager status" against Candlepin

Actual results:
+-------------------------------------------+
   系统状态详情
+-------------------------------------------+
总体状态:无效                    <================= TRANSLATED

Red Hat Enterprise Linux for Real Time:
- Not supported by a valid subscription.    <======= NOT TRANSLATED

Red Hat Enterprise Linux for x86_64:
- Not supported by a valid subscription.    <======= NOT TRANSLATED

系统目的状态:不匹配               <================= TRANSLATED
- The requested usage preference "Test" is not provided by a currently consumed subscription.      <======= NOT TRANSLATED
- The requested add-on "test" is not provided by a currently consumed subscription.                <======= NOT TRANSLATED
- The service level preference "Unavailable" is not provided by a currently consumed subscription. <======= NOT TRANSLATED

Expected results:
Expected all of the strings noted above to be translated

Additional info:

Notes for dev who will pick this up:
- The syspurpose related strings such as "The service level preference "whatever" is not provided by a currently consumed subscription" are not translated because we try to translate them at runtime (by using this method https://github.com/candlepin/candlepin/blob/419f9e66e0f970241c4106274e83859c365783be/server/src/main/java/org/candlepin/policy/SystemPurposeComplianceStatus.java#L268) but this won't work unless we have them marked as translated at compile time. Please see StatusReasonMessageGenerator.java as an example on how to do this.

- The "Not supported by a valid subscription." string is a different case. It seems to be marked as translatable, and it is extracted normally, but still does not get translated. We need more investigation here.


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