Skip to content

Commit

Permalink
Adds Spanish(Spain) translation for blocks and designer
Browse files Browse the repository at this point in the history
Change-Id: I008aaa87c0554ad7aa5caf99461a134307dfdff6
  • Loading branch information
josmas authored and jisqyv committed Oct 20, 2014
1 parent 1c9fa72 commit 45a7249
Show file tree
Hide file tree
Showing 8 changed files with 2,380 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@
<extend-property name="locale" values="zh_CN"/>
<!-- Traditional Chinese -->
<extend-property name="locale" values="zh_TW"/>
<!-- Spanish from Spain -->
<extend-property name="locale" values="es_ES"/>

<set-property-fallback name="locale" value="en"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ public void setCurrentScreen(String name) {
private static final String WIDGET_NAME_SWITCH_LANGUAGE = "Language";
private static final String WIDGET_NAME_SWITCH_LANGUAGE_ENGLISH = "English";
private static final String WIDGET_NAME_SWITCH_LANGUAGE_CHINESE_CN = "Simplified Chinese";
private static final String WIDGET_NAME_SWITCH_LANGUAGE_SPANISH_ES = "Spanish-Spain";
//private static final String WIDGET_NAME_SWITCH_LANGUAGE_GERMAN = "German";
//private static final String WIDGET_NAME_SWITCH_LANGUAGE_VIETNAMESE = "Vietnamese";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4690,6 +4690,10 @@ String newerVersionComponentException(String componentType, int srcCompVersion,
@DefaultMessage("繁体中文")
@Description("")
String SwitchToTraditionalChinese();

@DefaultMessage("Español")
@Description("")
String SwitchToSpanish();

@DefaultMessage("Progress Bar")
@Description("")
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ public void onClick(ClickEvent clickEvent) {
nativeName = MESSAGES.SwitchToSimplifiedChinese();
} else if (localeName == "zh_TW") {
nativeName = MESSAGES.SwitchToTraditionalChinese();
} else if (localeName == "es_ES") {
nativeName = MESSAGES.SwitchToSpanish();
}
languageItems.add(new DropDownItem(WIDGET_NAME_LANGUAGE, nativeName, lang));
}
Expand Down
1 change: 1 addition & 0 deletions appinventor/blocklyeditor/ploverConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
'../lib/blockly/src/core/blockly.js',

//msg/js/*.js has to come next (for constants)
'./src/msg/es_es/_messages.js',
'./src/msg/zh_tw/_messages.js',
'./src/msg/zh_cn/_messages.js',
'./src/msg/en/_messages.js',
Expand Down
4 changes: 4 additions & 0 deletions appinventor/blocklyeditor/src/language_switch.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ goog.provide('Blockly.language_switch');
goog.require('Blockly.Msg.en');
goog.require('Blockly.Msg.zh_cn');
goog.require('Blockly.Msg.zh_tw');
goog.require('Blockly.Msg.es_es');

Blockly.language_switch = {
// Switch between languages
Expand All @@ -23,6 +24,9 @@ Blockly.language_switch = {
Blockly.mainWorkspace.clear();
}
switch (language) {
case 'es_ES':
Blockly.Msg.es_es.switch_language_to_spanish_es.init();
break;
case 'zh_TW':
Blockly.Msg.zh_tw.switch_language_to_chinese_tw.init();
break;
Expand Down
1,281 changes: 1,281 additions & 0 deletions appinventor/blocklyeditor/src/msg/es_es/_messages.js

Large diffs are not rendered by default.

0 comments on commit 45a7249

Please sign in to comment.