Bug 395392

Summary: Dolphin doesn’t use locale settings for displaying the number of files
Product: [Applications] dolphin Reporter: Karl Ove Hufthammer <karl>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: bugseforuns, elvis.angelaccio, nate
Priority: NOR    
Version: 18.04.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Example showing wrong formatting for numbers but correct formatting for file sizes

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