Changeset 1059 in josm for trunk/src


Ignore:
Timestamp:
2008-10-29T22:20:08+01:00 (16 years ago)
Author:
mfloryan
Message:

Fixed #1683 - an exception when selected (or system default) locale was
not available in translations.

File:
1 edited

Legend:

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

    r1058 r1059  
    2121import java.util.Locale;
    2222import java.util.Map;
     23import java.util.MissingResourceException;
    2324
    2425import javax.swing.JFrame;
     
    179180        }
    180181       
    181         i18n = I18nFactory.getI18n(MainApplication.class);
     182        try {
     183            i18n = I18nFactory.getI18n(MainApplication.class);
     184        } catch (MissingResourceException ex) {
     185            System.out.println("Unable to find translation for the locale: " + Locale.getDefault().getDisplayName() + " reverting to English.");
     186        }
    182187               
    183188                SplashScreen splash = new SplashScreen(Main.pref.getBoolean("draw.splashscreen", true));
Note: See TracChangeset for help on using the changeset viewer.