Modify ↓
#17506 closed enhancement (fixed)
[Patch] Display languages in alphabetical order
Reported by: | GerdP | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 19.03 |
Component: | Core | Version: | |
Keywords: | template_report | Cc: |
Description (last modified by )
What steps will reproduce the problem?
- Open preferences - Display Settings -> Look and Feel
- Click on button for "Language"
What is the expected result?
Languages are displayed in sorted order
What happens instead?
Languages are sorted by the locale:
ast, be, bg, ca, ca__valencia, cs, da, de, el, en, en_AU, en_CA, en_GB, es, et, fi, fr, gl, hu, in, it, ja, km, ko, lt, nb, nl, pl, pt, pt_BR, ru, sk, sv, uk, vi, zh_CN, zh_TW]
Please provide any additional information below. Attach a screenshot if possible.
Build-Date:2019-03-22 07:28:53 Revision:14915 Is-Local-Build:true Identification: JOSM/1.5 (14915 SVN en) Windows 10 64-Bit OS Build number: Windows 10 Home 1803 (17134) Memory Usage: 855 MB / 1753 MB (429 MB allocated, but free) Java version: 1.8.0_191-b12, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Screen: \Display0 1920x1080 Maximum Screen Size: 1920x1080 VM arguments: [-agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:65465, -ea, -Dfile.encoding=UTF-8] Program arguments: [--debug] Plugins: + OpeningHoursEditor (34867) + apache-commons (34506) + buildings_tools (34904) + continuosDownload (82) + download_along (34869) + ejml (34389) + geotools (34513) + jaxb (34678) + jts (34524) + o5m (34867) + opendata (34911) + pbf (34867) + poly (34867) + reltoolbox (34867) + reverter (34930) + undelete (34919) + utilsplugin2 (34915) Last errors/warnings: - W: No configuration settings found. Using hardcoded default values for all pools. - E: Handled by bug report queue: java.lang.ClassCastException: javax.swing.UIManager$LookAndFeelInfo cannot be cast to java.lang.Comparable - E: Handled by bug report queue: java.lang.NullPointerException - E: Handled by bug report queue: java.lang.ClassCastException: java.util.Locale cannot be cast to java.lang.Comparable - E: Handled by bug report queue: java.lang.ClassCastException: java.util.Locale cannot be cast to java.lang.String
Attachments (2)
Change History (6)
by , 6 years ago
by , 6 years ago
Attachment: | 17506.patch added |
---|
comment:1 by , 6 years ago
Description: | modified (diff) |
---|
comment:2 by , 6 years ago
Another approach might be to change the code in I18n.getAvailableTranslations()
:
instead of
Arrays.sort(l, Comparator.comparing(Locale::toString));
we could use
Arrays.sort(l, Comparator.comparing(Locale::getDisplayLanguage));
comment:4 by , 6 years ago
Milestone: | → 19.03 |
---|
Note:
See TracTickets
for help on using tickets.
The attached patch sorts the displayed languages depending on the current locale.
This makes it easier to find the wanted language.