Changeset 8227 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2015-04-18T23:35:57+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/I18n.java
r8207 r8227 1 // License: GPL. For details, see LICENSE file.2 1 package org.openstreetmap.josm.tools; 3 2 … … 349 348 350 349 private static URL getTranslationFile(String lang) { 351 return Main.class.getResource("/data/"+lang+".lang"); 350 return Main.class.getResource("/data/"+lang.replace("@","-")+".lang"); 352 351 } 353 352 -
trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java
r8207 r8227 48 48 return null; 49 49 } 50 } else if(type == LocaleType.DEFAULTNOTENGLISH && "en".equals(code)) 50 } else if(type == LocaleType.DEFAULTNOTENGLISH && "en".equals(code)) { 51 51 return null; 52 } else if(code.matches(".+@.+")) { 53 return code.substring(0,1).toUpperCase() + code.substring(1,2) 54 + "-" + code.substring(3,4).toUpperCase() + code.substring(4) + ":"; 55 } 52 56 return code.substring(0,1).toUpperCase() + code.substring(1) + ":"; 53 57 } … … 109 113 */ 110 114 public static Locale getLocale(String localeName) { 111 if ("ca@valencia".equals(localeName) || "ca__valencia".equals(localeName)) {115 if ("ca@valencia".equals(localeName)) { 112 116 return new Locale("ca", "", "valencia"); 113 117 } … … 152 156 */ 153 157 public static String getLanguageCodeXML() { 154 return getJOSMLocaleCode()+"."; 158 String code = getJOSMLocaleCode(); 159 code = code.replace("@", "-"); 160 return code+"."; 155 161 } 156 162 … … 162 168 */ 163 169 public static String getLanguageCodeManifest() { 164 return getJOSMLocaleCode()+"_"; 170 String code = getJOSMLocaleCode(); 171 code = code.replace("@", "-"); 172 return code+"_"; 165 173 } 166 174 }
Note:
See TracChangeset
for help on using the changeset viewer.