Skip to content

Commit 9a10a22

Browse files
author
Federico Fissore
committed
Renamed resouces boundles he and id to iw and in respectively
Removed try catch around i18n.init
1 parent 8028cc3 commit 9a10a22

File tree

3 files changed

+21
-25
lines changed

3 files changed

+21
-25
lines changed

app/src/processing/app/I18n.java

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -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) {

app/src/processing/app/i18n/Resources_id.properties renamed to app/src/processing/app/i18n/Resources_in.properties

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Indonesian translations for the Arduino IDE.
2-
# Copyright (C) 2012
3-
# This file is distributed under the same license as the Arduino IDE package.
4-
# Rininta Andari <mail@rininta-andari.de>, 2012.
5-
#
1+
# Indonesian translations for the Arduino IDE.
2+
# Copyright (C) 2012
3+
# This file is distributed under the same license as the Arduino IDE package.
4+
# Rininta Andari <mail@rininta-andari.de>, 2012.
5+
#
66
!=Project-Id-Version\: Arduino IDE 1.5\nReport-Msgid-Bugs-To\: \nPOT-Creation-Date\: 2012-03-29 10\:24-0400\nPO-Revision-Date\: 2013-09-10 10\:35+0000\nLast-Translator\: cmaglie <c.maglie@arduino.cc>\nLanguage-Team\: Indonesian (http\://www.transifex.com/projects/p/arduino-ide-15/language/id/)\nMIME-Version\: 1.0\nContent-Type\: text/plain; charset\=UTF-8\nContent-Transfer-Encoding\: 8bit\nLanguage\: id\nPlural-Forms\: nplurals\=1; plural\=0;\n
77

88
#: Preferences.java:358 Preferences.java:374
File renamed without changes.

0 commit comments

Comments
 (0)