Changeset 15475 in josm
- Timestamp:
- 2019-10-26T00:20:52+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java
r15395 r15475 2 2 package org.openstreetmap.josm.tools; 3 3 4 import java.util.Collection;5 4 import java.util.LinkedList; 5 import java.util.List; 6 6 import java.util.Locale; 7 7 … … 179 179 */ 180 180 public static String getDisplayName(Locale locale) { 181 String currentCountry = Locale.getDefault().getCountry(); 182 String localeCountry = locale.getCountry(); 183 // Don't display locale country if country has been forced to current country at JOSM startup 184 if (currentCountry.equals(localeCountry) && !I18n.hasCode(getLanguageCodes(locale).get(0))) { 185 return new Locale(locale.getLanguage(), "", locale.getVariant()).getDisplayName(); 186 } 181 187 return locale.getDisplayName(); 182 188 } … … 263 269 * @since 8283 264 270 */ 265 public static Collection<String> getLanguageCodes(Locale l) {266 Collection<String> list = new LinkedList<>();271 public static List<String> getLanguageCodes(Locale l) { 272 List<String> list = new LinkedList<>(); 267 273 if (l == null) 268 274 l = Locale.getDefault();
Note:
See TracChangeset
for help on using the changeset viewer.