Bug 452944

Summary: Locale setting for percentage sign has to be indicated explicitly
Product: [Plasma] Plasma SDK Reporter: Emir SARI <emir_sari>
Component: GeneralAssignee: Plasma Bugs List <plasma-bugs-null>
Status: REPORTED ---    
Severity: normal CC: antonis.tsiapaliokas
Priority: NOR    
Version First Reported In: master   
Target Milestone: ---   
Platform: Other   
OS: All   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

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.