@@ -31,27 +31,23 @@ public class I18n {
3131 static String PROMPT_BROWSE ;
3232
3333 static protected void init (String language ) throws MissingResourceException {
34- // there might be a null pointer exception ... most likely will never happen but the jvm gets mad
35- try {
36- String [] languageParts = language .split ("_" );
37- Locale locale = Locale .getDefault ();
38- // both language and country
39- if (languageParts .length == 2 ) {
40- locale = new Locale (languageParts [0 ], languageParts [1 ]);
41- // just language
42- } else if (languageParts .length == 1 && !"" .equals (languageParts [0 ])) {
43- locale = new Locale (languageParts [0 ]);
44- }
45- // there might be a null pointer exception ... most likely will never happen but the jvm gets mad
46- Locale .setDefault (locale );
47- i18n = ResourceBundle .getBundle ("processing.app.i18n.Resources" , Locale .getDefault ());
48- PROMPT_YES = _ ("Yes" );
49- PROMPT_NO = _ ("No" );
50- PROMPT_CANCEL = _ ("Cancel" );
51- PROMPT_OK = _ ("OK" );
52- PROMPT_BROWSE = _ ("Browse" );
53- } catch (java .lang .NullPointerException e ) {
34+ String [] languageParts = language .split ("_" );
35+ Locale locale = Locale .getDefault ();
36+ // both language and country
37+ if (languageParts .length == 2 ) {
38+ locale = new Locale (languageParts [0 ], languageParts [1 ]);
39+ // just language
40+ } else if (languageParts .length == 1 && !"" .equals (languageParts [0 ])) {
41+ locale = new Locale (languageParts [0 ]);
5442 }
43+ // there might be a null pointer exception ... most likely will never happen but the jvm gets mad
44+ Locale .setDefault (locale );
45+ i18n = ResourceBundle .getBundle ("processing.app.i18n.Resources" , Locale .getDefault ());
46+ PROMPT_YES = _ ("Yes" );
47+ PROMPT_NO = _ ("No" );
48+ PROMPT_CANCEL = _ ("Cancel" );
49+ PROMPT_OK = _ ("OK" );
50+ PROMPT_BROWSE = _ ("Browse" );
5551 }
5652
5753 public static String _(String s ) {
0 commit comments