Changeset 1163 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2008-12-22T23:20:11+01:00 (16 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r1146 r1163 19 19 import java.util.LinkedList; 20 20 import java.util.List; 21 import java.util.Locale; 21 22 import java.util.Map; 22 23 import java.util.SortedMap; … … 523 524 } 524 525 526 static public String getLanguageCodeU() 527 { 528 String languageCode = Locale.getDefault().getLanguage(); 529 return languageCode.substring(0,1).toUpperCase() + languageCode.substring(1) + ":"; 530 } 531 static public String getLanguageCode() 532 { 533 return Locale.getDefault().getLanguage() + ":"; 534 } 525 535 } -
trunk/src/org/openstreetmap/josm/actions/HelpAction.java
r962 r1163 46 46 } 47 47 48 private String languageCode = tr("En:");48 private String languageCode = Main.getLanguageCodeU(); 49 49 private JFrame helpBrowser = new JFrame(tr("JOSM Online Help")); 50 50 private String baseurl = Main.pref.get("help.baseurl", "http://josm.openstreetmap.de"); -
trunk/src/org/openstreetmap/josm/gui/GettingStarted.java
r1138 r1163 68 68 Matcher matcher = versionPattern.matcher(motdcontent); 69 69 matcher.reset(); 70 String languageCode = Main.getLanguageCodeU(); 70 71 while (matcher.find()) { 71 72 int targetVersion = Integer.parseInt(matcher.group(4)); … … 94 95 start = matcher.end(); 95 96 if (included) { 96 // translators: set this to a suitable language code to97 // be able to provide translations in the Wiki.98 String languageCode = tr("En:");99 97 String url = matcher.group(1) + languageCode + matcher.group(2); 100 98 try { -
trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java
r824 r1163 1 1 // License: GPL. Copyright 2007 by Immanuel Scholz and others 2 2 package org.openstreetmap.josm.tools; 3 4 import static org.openstreetmap.josm.tools.I18n.tr;5 3 6 4 import java.io.Reader; … … 23 21 import org.xml.sax.helpers.DefaultHandler; 24 22 23 import org.openstreetmap.josm.Main; 24 25 25 /** 26 26 * An helper class that reads from a XML stream into specific objects. … … 30 30 public class XmlObjectParser implements Iterable<Object> { 31 31 32 public static final String lang = tr("En:").toLowerCase();32 public static final String lang = Main.getLanguageCode(); 33 33 public static class Uniform<T> implements Iterable<T>{ 34 34 private Iterator<Object> iterator;
Note:
See TracChangeset
for help on using the changeset viewer.