Bug 395392 - Dolphin doesn’t use locale settings for displaying the number of files
Summary: Dolphin doesn’t use locale settings for displaying the number of files
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 18.04.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-14 20:08 UTC by Karl Ove Hufthammer
Modified: 2019-10-26 11:29 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Example showing wrong formatting for numbers but correct formatting for file sizes (107.59 KB, image/png)
2018-06-14 20:09 UTC, Karl Ove Hufthammer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Ove Hufthammer 2018-06-14 20:08:09 UTC
Dolphin doesn’t use the locale ‘number formatting’ settings for displaying the number of files in a folder. For example, for a folder containing 1009 files, it *should* show

  1,009 items

for an ‘en-US’ locale (which uses a comma as the thousands separator) and

  1 009 items

for a locale that uses a space as a thousands separator (e.g. the Norwegian Nynorsk (nn_NO) locale).

Instead, it just shows

  1009 items

Note that for file *sizes*, the correct formatting *is* used, e.g. ‘1,009 B’ for a 1009-byte file.

I’ll attach a screenshot and a reproducible example.
Comment 1 Karl Ove Hufthammer 2018-06-14 20:09:51 UTC
Created attachment 113326 [details]
Example showing wrong formatting for numbers but correct formatting for file sizes

Here’s some simple shell commands to reproduce the folder shown in the screenshot (run it from an empty folder):

printf '=%.0s' {1..1009} > myfile.txt
mkdir myfolder
cd myfolder
seq 1 1009 | xargs touch
dolphin ..
Comment 2 Christoph Feck 2018-06-14 23:07:26 UTC
Hm, https://cgit.kde.org/dolphin.git/tree/src/kitemviews/kfileitemlistwidget.cpp#n74 says it uses i18ncp, which _should_ respect the locale. Could be an ki18n issue.
Comment 3 Karl Ove Hufthammer 2019-10-26 11:29:05 UTC
This bug seems to be fixed by this commit to ki18n:
https://phabricator.kde.org/R249:b0dbb285bd2119fe980a714f7d01ec140f2b8138