Bug 452944 - Locale setting for percentage sign has to be indicated explicitly
Summary: Locale setting for percentage sign has to be indicated explicitly
Status: REPORTED
Alias: None
Product: Plasma SDK
Classification: Plasma
Component: General (other bugs)
Version First Reported In: master
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-24 10:53 UTC by Emir SARI
Modified: 2022-05-02 17:45 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented 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 2022-04-24 10:53:26 UTC
SUMMARY

Localised percentage sign is explicitly inserted in translations. It should be inserted automatically using the locale settings. In some languages (including Turkish) percent sign precedes the number, thus, during translations it confuses gettext and ugly workarounds are needed to circumvent this. 

STEPS TO REPRODUCE
1. Open a Turkish .po(t) file, let's say the one that shows battery percentages 
2. Change 100% with %100 or %1% with %%1 (or %%100, or %%1, or %%%1 respectively)

OBSERVED RESULT
1. Either a fatal error during message check or incomprehensible strings inside the software

EXPECTED RESULT
1. Turkish string should be displayed as %100 or %1, %5, %10 etc.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE neon
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION

To fix this, I need to use a space with no width between the number and the sign. Some previous translators have used a regular space between the sign and the number, which is quite ugly.