Bug 467892

Summary: Energy page: Percentage symbols can be localized to become different symbols, but not appear in different locations
Product: [Applications] kinfocenter Reporter: Emir SARI <emir_sari>
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: kde, me, nate, sitter
Priority: NOR    
Version First Reported In: 5.27.4   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Emir SARI 2023-03-28 18:46:32 UTC
In:
package/contents/ui/main.qml:51
package/contents/ui/main.qml:52
package/contents/ui/main.qml:248

(taken from Lokalize)

there are uses of standalone percentage signs, which cause unformattable percentage values for some locales. They should use the unified percentage-placeholder format for placing the percentage sign in front of the value.
Comment 1 Emir SARI 2023-03-31 22:25:04 UTC
So, these are the strings in KInfoCenter:

{label: i18n("Current charge:"), value: "chargePercent", unit: i18n("%"), precision: 0},
{label: i18n("Health"), value: "capacity", unit: i18n("%"), precision: 0},

Is this within a special structure? Why it has to be labeled like this instead of a standard `Label {}`? Where do "chargePercent" and "capacity" keys come from?

yunits: root.historyType == HistoryModel.RateType ? i18nc("Shorthand for Watts","W") : i18nc("literal percent sign", "%")
Is this string displayed anywhere in the UI?
Comment 2 Emir SARI 2023-11-25 21:05:02 UTC
This has been fixed a while ago.