- Timestamp:
- 2010-06-02T10:25:27+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/I18n.java
r3259 r3294 12 12 import java.util.Vector; 13 13 14 import javax.swing.JFileChooser; 15 import javax.swing.UIManager; 16 14 17 import org.openstreetmap.josm.Main; 15 18 … … 23 26 MODE_CS, MODE_AR, MODE_PL, MODE_RO, MODE_RU, MODE_SK, MODE_SL} 24 27 private static PluralMode pluralMode = PluralMode.MODE_NOTONE; /* english default */ 28 private static String[] fileChooserDialogStringKeys = new String[] { 29 "FileChooser.detailsViewActionLabelText", 30 "FileChooser.detailsViewButtonAccessibleName", 31 "FileChooser.detailsViewButtonToolTipText", 32 "FileChooser.fileAttrHeaderText", 33 "FileChooser.fileDateHeaderText", 34 "FileChooser.fileNameHeaderText", 35 "FileChooser.fileNameLabelText", 36 "FileChooser.fileSizeHeaderText", 37 "FileChooser.fileTypeHeaderText", 38 "FileChooser.filesOfTypeLabelText", 39 "FileChooser.homeFolderAccessibleName", 40 "FileChooser.homeFolderToolTipText", 41 "FileChooser.listViewActionLabelText", 42 "FileChooser.listViewButtonAccessibleName", 43 "FileChooser.listViewButtonToolTipText", 44 "FileChooser.lookInLabelText", 45 "FileChooser.newFolderAccessibleName", 46 "FileChooser.newFolderActionLabelText", 47 "FileChooser.newFolderToolTipText", 48 "FileChooser.refreshActionLabelText", 49 "FileChooser.saveInLabelText", 50 "FileChooser.upFolderAccessibleName", 51 "FileChooser.upFolderToolTipText", 52 "FileChooser.viewMenuLabelText"}; 25 53 private static HashMap<String, String> strings = null; 26 54 private static HashMap<String, String[]> pstrings = null; … … 349 377 l = new Locale(localeName); 350 378 } 351 if (load(localeName)) {379 if (load(localeName)) { 352 380 Locale.setDefault(l); 381 382 // localization for file chooser dialog 383 JFileChooser.setDefaultLocale(l); 384 for (String key : fileChooserDialogStringKeys) { 385 String us = UIManager.getString(key, Locale.US); 386 String loc = UIManager.getString(key, l); 387 // only provide custom translation if it is not already localized by Java 388 if (us.equals(loc)) { 389 UIManager.put(key, tr(us)); 390 } 391 } 353 392 } else { 354 393 if (!l.getLanguage().equals("en")) {
Note:
See TracChangeset
for help on using the changeset viewer.