Modify

Opened 9 months ago

Closed 9 months ago

Last modified 9 months ago

#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 GerdP)

What steps will reproduce the problem?

  1. Open preferences - Display Settings -> Look and Feel
  2. 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)

lang.PNG (85.5 KB) - added by GerdP 9 months ago.
17506.patch (1021 bytes) - added by GerdP 9 months ago.

Download all attachments as: .zip

Change History (6)

Changed 9 months ago by GerdP

Attachment: lang.PNG added

Changed 9 months ago by GerdP

Attachment: 17506.patch added

comment:1 Changed 9 months ago by GerdP

Description: modified (diff)

The attached patch sorts the displayed languages depending on the current locale.
This makes it easier to find the wanted language.

comment:2 Changed 9 months ago by GerdP

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:3 Changed 9 months ago by GerdP

Resolution: fixed
Status: newclosed

In 14929/josm:

fix #17506: Display languages in alphabetical order

comment:4 Changed 9 months ago by Klumbumbus

Milestone: 19.03

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.