Bug 467892 - Energy page: Percentage symbols can be localized to become different symbols, but not appear in different locations
Summary: Energy page: Percentage symbols can be localized to become different symbols,...
Status: RESOLVED FIXED
Alias: None
Product: kinfocenter
Classification: Applications
Component: general (show other bugs)
Version: 5.27.4
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-28 18:46 UTC by Emir SARI
Modified: 2023-11-25 21:05 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.