Changeset 4719 in josm
- Timestamp:
- 2011-12-27T14:28:04+01:00 (13 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r4718 r4719 42 42 import javax.swing.UIManager; 43 43 44 import org.jdesktop.swinghelper.debug.CheckThreadViolationRepaintManager;45 44 import org.openstreetmap.gui.jmapviewer.FeatureAdapter; 46 45 import org.openstreetmap.josm.actions.JosmAction; -
trunk/src/org/openstreetmap/josm/tools/I18n.java
r4670 r4719 308 308 } 309 309 310 private static URL getTranslationFile(String lang) { 311 return Main.class.getResource("/data/"+lang+".lang"); 312 } 313 310 314 /** 311 315 * Get a list of all available JOSM Translations. … … 314 318 public static final Locale[] getAvailableTranslations() { 315 319 Collection<Locale> v = new ArrayList<Locale>(languages.size()); 316 if( Main.class.getResource("/data/en.lang") != null)320 if(getTranslationFile("en") != null) 317 321 { 318 322 for (String loc : languages.keySet()) { 319 if( Main.class.getResource("/data/"+loc+".lang") != null) {323 if(getTranslationFile(loc) != null) { 320 324 v.add(LanguageInfo.getLocale(loc)); 321 325 } … … 448 452 return true; 449 453 } 450 URL en = Main.class.getResource("/data/en.lang");454 URL en = getTranslationFile("en"); 451 455 if(en == null) 452 456 return false; 453 URL tr = Main.class.getResource("/data/"+l+".lang");457 URL tr = getTranslationFile(l); 454 458 if(tr == null || !languages.containsKey(l)) 455 459 { … … 458 462 l = l.substring(0, i); 459 463 } 460 tr = Main.class.getResource("/data/"+l+".lang");464 tr = getTranslationFile(l); 461 465 if(tr == null || !languages.containsKey(l)) 462 466 return false;
Note:
See TracChangeset
for help on using the changeset viewer.