- Timestamp:
- 2018-07-08T01:29:16+02:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/I18n.java
r13790 r14013 90 90 /** Map (english/locale) of plural strings **/ 91 91 private static volatile Map<String, String[]> pstrings; 92 private static Locale originalLocale = Locale.getDefault(); 92 93 private static Map<String, PluralMode> languages = new HashMap<>(); 93 94 static { … … 635 636 return new HashMap<>(pstrings); 636 637 } 638 639 /** 640 * Returns the original default locale found when the JVM started. 641 * Used to guess real language/country of current user disregarding language chosen in JOSM preferences. 642 * @return the original default locale found when the JVM started 643 * @since 14013 644 */ 645 public static Locale getOriginalLocale() { 646 return originalLocale; 647 } 637 648 } -
trunk/src/org/openstreetmap/josm/tools/KeyboardUtils.java
r14012 r14013 160 160 */ 161 161 public static List<Character> getCharactersForKey(char row, int column, Locale l) { 162 if (l == null) { 163 l = I18n.getOriginalLocale(); 164 } 162 165 if ('E' == row && 0 == column) { 163 166 List<Character> result = new ArrayList<>(); … … 258 261 result.add('*'); 259 262 break; 263 default: 264 // Do nothing 260 265 } 261 266 … … 286 291 result.add('º'); // https://en.wikipedia.org/wiki/Ordinal_indicator 287 292 break; 293 default: 294 // Do nothing 288 295 } 289 296 … … 348 355 addThaiCharacters(map); 349 356 break; 357 default: 358 // Do nothing 350 359 } 351 360 -
trunk/src/org/openstreetmap/josm/tools/Shortcut.java
r14012 r14013 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.awt.Toolkit;7 6 import java.awt.event.KeyEvent; 8 7 import java.util.ArrayList;
Note:
See TracChangeset
for help on using the changeset viewer.