| Summary: | Unit Converter should localize display of large numbers | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] frameworks-kunitconversion | Reporter: | Philip Murray <philipihmurray> |
| Component: | general | Assignee: | John Layt <jlayt> |
| Status: | RESOLVED FIXED | ||
| Severity: | wishlist | CC: | eridanired123, kde, kdelibs-bugs-null, nate |
| Priority: | NOR | Keywords: | usability |
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | https://commits.kde.org/ki18n/b0dbb285bd2119fe980a714f7d01ec140f2b8138 | Version Fixed/Implemented In: | 5.62 |
| Sentry Crash Report: | |||
|
Description
Philip Murray
2019-06-23 14:03:27 UTC
That may work on the USA, but the rest of the world mostly use comma on the line [,] to separate from decimal units so the notation may become messy if not handled with care; below a copy pasta from ISO 8601 E norm: "If a decimal fraction is included, lower order components (if any) shall be omitted and the decimal fraction shall be divided from the integer part by the decimal sign specified in ISO 31-0: i.e. the comma [,] or full stop [.]. Of these, the comma is the preferred sign." But there are also some weird notations on certain countries (e.g. México), where while using the SI they use full stop [.] to separate decimal units (like USA). Therefore, it is recommended to just use space [ ] to separate groups of 3 numbers for better readability on a numeric notation and never use comma [,] or full stop [.] as these are reserved for decimal units. For example, one million (1000000) may be written as 1 000 000 for better readability. Just don't forget about differences due to regional formats, some may find comma separation to be misleading. It's better to make this input field honor regional settings. I now have 5.16.1 and as far as I understand this enhancement has come from KRunner, so I want to note that Krunner has no such separation as well. Making it display as per the regional norm sounds sensible. Using spaces sound decent too. UK uses commas for thousands and full stops for decimals, hence my wish for it. Right, this needs to respect regional settings for sure. You might want to revisit a patch I tried to do a while back: https://git.reviewboard.kde.org/r/127800/ Thanks Kai. Your patch works perfectly. I've re-submitted it as https://phabricator.kde.org/D22069. Let's see if we can get it in. Git commit b0dbb285bd2119fe980a714f7d01ec140f2b8138 by Nate Graham. Committed on 03/09/2019 at 18:08. Pushed by ngraham into branch 'master'. Localize long number strings Summary: Localize long number strings so that they get the proper locale-specific separator. This is based on @broulik's old patch from https://git.reviewboard.kde.org/r/127800 FIXED-IN: 5.62 Test Plan: Unit tests pass. With US English locale, before: {F6930198} With US English locale, after: {F6930199} Reviewers: #localization, #frameworks, broulik, aacid Reviewed By: #localization, aacid Subscribers: aacid, huftis, safaalfulaij, mikeroyal, aspotashev, ilic, kde-frameworks-devel, broulik Tags: #frameworks Differential Revision: https://phabricator.kde.org/D22069 M +4 -1 autotests/klocalizedstringtest.cpp M +7 -7 src/klocalizedstring.cpp https://commits.kde.org/ki18n/b0dbb285bd2119fe980a714f7d01ec140f2b8138 |