Changeset 8207 in josm for trunk/src/org/openstreetmap/josm


Ignore:
Timestamp:
2015-04-18T00:27:22+02:00 (9 years ago)
Author:
simon04
Message:

fix #11148 - Add Valencian language to josm (ca@valencia)

Location:
trunk/src/org/openstreetmap/josm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/display/LanguagePreference.java

    r7509 r8207  
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     5import static org.openstreetmap.josm.tools.I18n.trc;
    56
    67import java.awt.Component;
     
    118119                int index, boolean isSelected, boolean cellHasFocus) {
    119120            return dispatch.getListCellRendererComponent(list,
    120                     l == null ? tr("Default (Auto determined)") : l.getDisplayName(l),
    121                             index, isSelected, cellHasFocus);
     121                    l == null
     122                            ? tr("Default (Auto determined)")
     123                            : "ca__valencia".equals(l.toString())
     124                            ? trc("language", "Valencian")
     125                            : l.getDisplayName(l),
     126                    index, isSelected, cellHasFocus);
    122127        }
    123128    }
  • trunk/src/org/openstreetmap/josm/tools/I18n.java

    r8160 r8207  
    400400        languages.put("bg", PluralMode.MODE_NOTONE);
    401401        languages.put("ca", PluralMode.MODE_NOTONE);
     402        languages.put("ca@valencia", PluralMode.MODE_NOTONE);
    402403        languages.put("cs", PluralMode.MODE_CS);
    403404        languages.put("da", PluralMode.MODE_NOTONE);
  • trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java

    r8091 r8207  
    9191        else if ("in".equals(full))
    9292            return "id";
     93        else if ("ca__valencia".equals(full))
     94            return "ca@valencia";
    9395        else if (I18n.hasCode(full)) // catch all non-single codes
    9496            return full;
     
    107109     */
    108110    public static Locale getLocale(String localeName) {
     111        if ("ca@valencia".equals(localeName) || "ca__valencia".equals(localeName)) {
     112            return new Locale("ca", "", "valencia");
     113        }
    109114        if ("he".equals(localeName)) {
    110115            localeName = "iw_IL";
Note: See TracChangeset for help on using the changeset viewer.