Changeset 1755 in josm


Ignore:
Timestamp:
2009-07-09T10:53:33+02:00 (12 years ago)
Author:
stoecker
Message:

fixed build error due to slippy map change, i18n update, added pt_BR

Location:
trunk
Files:
1 added
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/Main.java

    r1750 r1755  
    472472    }
    473473
    474     static public String getLanguageCodeU()
    475     {
    476         String languageCode = getLanguageCode();
    477         if(languageCode.equals("en"))
    478             return "";
    479         return languageCode.substring(0,1).toUpperCase() + languageCode.substring(1) + ":";
    480     }
    481     static public String getLanguageCode()
    482     {
    483         String full = Locale.getDefault().toString();
    484         if (full.equals("iw_IL"))
    485             return "he";
    486         /* list of non-single codes supported by josm */
    487         else if (full.equals("en_GB"))
    488             return full;
    489         return Locale.getDefault().getLanguage();
    490     }
    491 
    492474    static public void saveGuiGeometry() {
    493475        // save the current window geometry
  • trunk/src/org/openstreetmap/josm/actions/AboutAction.java

    r1598 r1755  
    3131import org.openstreetmap.josm.tools.GBC;
    3232import org.openstreetmap.josm.tools.ImageProvider;
     33import org.openstreetmap.josm.tools.LanguageInfo;
    3334import org.openstreetmap.josm.tools.UrlLabel;
    3435import org.openstreetmap.josm.tools.Shortcut;
     
    9192    static public void setUserAgent() {
    9293        Properties sysProp = System.getProperties();
    93         sysProp.put("http.agent", "JOSM/1.5 ("+(version.equals(tr("UNKNOWN"))?"UNKNOWN":version)+" "+Main.getLanguageCode()+")");
     94        sysProp.put("http.agent", "JOSM/1.5 ("+(version.equals(tr("UNKNOWN"))?"UNKNOWN":version)+" "+LanguageInfo.getLanguageCode()+")");
    9495        System.setProperties(sysProp);
    9596    }
  • trunk/src/org/openstreetmap/josm/actions/HelpAction.java

    r1676 r1755  
    3232import org.openstreetmap.josm.Main;
    3333import org.openstreetmap.josm.tools.ImageProvider;
     34import org.openstreetmap.josm.tools.LanguageInfo;
    3435import org.openstreetmap.josm.tools.OpenBrowser;
    3536import org.openstreetmap.josm.tools.WikiReader;
     
    4647    }
    4748
    48     private String languageCode = Main.getLanguageCodeU();
     49    private String languageCode = LanguageInfo.getLanguageCodeWiki();
    4950    private JFrame helpBrowser = new JFrame(tr("JOSM Online Help"));
    5051    private String baseurl = Main.pref.get("help.baseurl", "http://josm.openstreetmap.de");
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java

    r1728 r1755  
    4040import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
    4141import org.openstreetmap.josm.tools.ImageProvider;
     42import org.openstreetmap.josm.tools.LanguageInfo;
    4243
    4344public class MapPaintVisitor extends SimplePaintVisitor {
     
    12761277        leftHandTraffic = Main.pref.getBoolean("mappaint.lefthandtraffic",false);
    12771278        orderFont = new Font(Main.pref.get("mappaint.font","Helvetica"), Font.PLAIN, Main.pref.getInteger("mappaint.fontsize", 8));
    1278         String[] names = {"name:"+Main.getLanguageCode(), "name", "int_name", "ref", "operator", "brand","addr:housenumber"};
     1279        String[] names = {"name:"+LanguageInfo.getLanguageCode(), "name", "int_name", "ref", "operator", "brand","addr:housenumber"};
    12791280        regionalNameOrder = Main.pref.getCollection("mappaint.nameOrder", Arrays.asList(names));
    12801281        minEN = nc.getEastNorth(0,nc.getHeight()-1);
  • trunk/src/org/openstreetmap/josm/gui/GettingStarted.java

    r1746 r1755  
    2626import org.openstreetmap.josm.Main;
    2727import org.openstreetmap.josm.io.CacheCustomContent;
     28import org.openstreetmap.josm.tools.LanguageInfo;
    2829import org.openstreetmap.josm.tools.OpenBrowser;
    2930import org.openstreetmap.josm.tools.WikiReader;
     
    6162
    6263        final private int myVersion = AboutAction.getVersionNumber();
    63         final private String myLang = Main.getLanguageCodeU();
     64        final private String myLang = LanguageInfo.getLanguageCodeWiki();
    6465
    6566        /**
  • trunk/src/org/openstreetmap/josm/gui/download/SlippyMapChooser.java

    r1687 r1755  
    259259
    260260    public void toggleMapSource(int mapSource) {
    261         this.tileCache = new MemoryTileCache();
     261        this.tileController.setTileCache(new MemoryTileCache());
    262262        if (mapSource == SourceButton.MAPNIK) {
    263263            this.setTileSource(sources[0]);
  • trunk/src/org/openstreetmap/josm/gui/preferences/StyleSources.java

    r1747 r1755  
    3232import org.openstreetmap.josm.io.MirroredInputStream;
    3333import org.openstreetmap.josm.tools.GBC;
     34import org.openstreetmap.josm.tools.LanguageInfo;
    3435
    3536public class StyleSources extends JPanel {
     
    282283    {
    283284        ((DefaultListModel)sourcesDefaults.getModel()).removeAllElements();
    284         String lang = Main.getLanguageCode()+"_";
     285        String lang = LanguageInfo.getLanguageCodeManifest();
    285286        try
    286287        {
  • trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java

    r1647 r1755  
    2121
    2222import org.openstreetmap.josm.Main;
     23import org.openstreetmap.josm.tools.LanguageInfo;
    2324
    2425/**
     
    9091    private void scanManifest(Manifest manifest)
    9192    {
    92         String lang = Main.getLanguageCode()+"_";
     93        String lang = LanguageInfo.getLanguageCodeManifest();
    9394        Attributes attr = manifest.getMainAttributes();
    9495        className = attr.getValue("Plugin-Class");
  • trunk/src/org/openstreetmap/josm/tools/WikiReader.java

    r1512 r1755  
    88
    99import org.openstreetmap.josm.Main;
     10import org.openstreetmap.josm.tools.LanguageInfo;
    1011
    1112/**
     
    4344
    4445    public String readLang(String text) {
    45         String languageCode = Main.getLanguageCodeU();
     46        String languageCode = LanguageInfo.getLanguageCodeWiki();
    4647        String url = baseurl + "/wiki/"+languageCode+text;
    4748        String res = "";
  • trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java

    r1440 r1755  
    2121import org.xml.sax.helpers.DefaultHandler;
    2222
    23 import org.openstreetmap.josm.Main;
     23import org.openstreetmap.josm.tools.LanguageInfo;
    2424
    2525/**
     
    3030public class XmlObjectParser implements Iterable<Object> {
    3131
    32     public static final String lang = Main.getLanguageCode()+".";
     32    public static final String lang = LanguageInfo.getLanguageCodeXML();
    3333    public static class Uniform<T> implements Iterable<T>{
    3434        private Iterator<Object> iterator;
Note: See TracChangeset for help on using the changeset viewer.