Bug 473636 - Percent values are not localisable
Summary: Percent values are not localisable
Status: ASSIGNED
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
Depends on: 473710
Blocks:
  Show dependency treegraph
 
Reported: 2023-08-22 13:46 UTC by Emir SARI
Modified: 2023-08-28 23:10 UTC (History)
1 user (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-08-22 13:46:02 UTC
Being an image viewer, Gwenview employs a quite a bit of number of percent values throughout the application. However, the i18n of these values are problematic, and does not allow modification for all use cases.

For instance, Turkish and some other languages use a percent format of %100, in which the sign precedes the number. In Gwenview, the implementations mostly use QLocale().percent(), which looks like nothing more than a percent sign itself, and does not allow any locale-specific modification. Since Gwenview uses the suffix-route to add the percent sign, there is no way to prepend the sign to the number.

Places I've encountered the percent uses:
1. Bottom bar zoom slider. I wanted to fix this, but the implementation is not trivial for me to understand it just yet, and I'm not comfortable touching it either. Recently, Okular and Cantor had a similar issue fixed about the percentage representation, it might be useful for reference.
2. Application title bar. I couldn't find the place that this is set, but it's probably the same value as the combo box.
3. Various spin boxes. Unfortunately, Qt does not allow localising this, but Lukas Sommer had this neat implementation[1] for Perceptual Color. It should be fairly easy to adopt to Gwenview.

It would be great to have this fixed, since Gwenview is distributed with most distributions, and fairly widely used. Looks really out-of place when compared with the rest of the system.

[1] https://invent.kde.org/libraries/perceptualcolor/-/issues/1#note_654836
Comment 1 Bug Janitor Service 2023-08-28 23:10:24 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/gwenview/-/merge_requests/220