mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-17 06:52:18 +01:00
Renamed resouces boundles he and id to iw and in respectively
Removed try catch around i18n.init
This commit is contained in:
parent
8028cc38e7
commit
9a10a22bc3
@ -31,27 +31,23 @@ public class I18n {
|
||||
static String PROMPT_BROWSE;
|
||||
|
||||
static protected void init(String language) throws MissingResourceException {
|
||||
// there might be a null pointer exception ... most likely will never happen but the jvm gets mad
|
||||
try {
|
||||
String[] languageParts = language.split("_");
|
||||
Locale locale = Locale.getDefault();
|
||||
// both language and country
|
||||
if (languageParts.length == 2) {
|
||||
locale = new Locale(languageParts[0], languageParts[1]);
|
||||
// just language
|
||||
} else if (languageParts.length == 1 && !"".equals(languageParts[0])) {
|
||||
locale = new Locale(languageParts[0]);
|
||||
}
|
||||
// there might be a null pointer exception ... most likely will never happen but the jvm gets mad
|
||||
Locale.setDefault(locale);
|
||||
i18n = ResourceBundle.getBundle("processing.app.i18n.Resources", Locale.getDefault());
|
||||
PROMPT_YES = _("Yes");
|
||||
PROMPT_NO = _("No");
|
||||
PROMPT_CANCEL = _("Cancel");
|
||||
PROMPT_OK = _("OK");
|
||||
PROMPT_BROWSE = _("Browse");
|
||||
} catch (java.lang.NullPointerException e) {
|
||||
String[] languageParts = language.split("_");
|
||||
Locale locale = Locale.getDefault();
|
||||
// both language and country
|
||||
if (languageParts.length == 2) {
|
||||
locale = new Locale(languageParts[0], languageParts[1]);
|
||||
// just language
|
||||
} else if (languageParts.length == 1 && !"".equals(languageParts[0])) {
|
||||
locale = new Locale(languageParts[0]);
|
||||
}
|
||||
// there might be a null pointer exception ... most likely will never happen but the jvm gets mad
|
||||
Locale.setDefault(locale);
|
||||
i18n = ResourceBundle.getBundle("processing.app.i18n.Resources", Locale.getDefault());
|
||||
PROMPT_YES = _("Yes");
|
||||
PROMPT_NO = _("No");
|
||||
PROMPT_CANCEL = _("Cancel");
|
||||
PROMPT_OK = _("OK");
|
||||
PROMPT_BROWSE = _("Browse");
|
||||
}
|
||||
|
||||
public static String _(String s) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
# Indonesian translations for the Arduino IDE.
|
||||
# Copyright (C) 2012
|
||||
# This file is distributed under the same license as the Arduino IDE package.
|
||||
# Rininta Andari <mail@rininta-andari.de>, 2012.
|
||||
#
|
||||
# Indonesian translations for the Arduino IDE.
|
||||
# Copyright (C) 2012
|
||||
# This file is distributed under the same license as the Arduino IDE package.
|
||||
# Rininta Andari <mail@rininta-andari.de>, 2012.
|
||||
#
|
||||
!=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
|
||||
|
||||
#: Preferences.java:358 Preferences.java:374
|
Loading…
x
Reference in New Issue
Block a user