1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-17 06:52:18 +01:00

Merge branch 'ide-1.5.x' of github.com:arduino/Arduino into ide-1.5.x

This commit is contained in:
Cristian Maglie 2012-11-14 12:32:27 +01:00
commit df23af53bd
2 changed files with 11 additions and 4 deletions

View File

@ -1158,7 +1158,7 @@ public class Base {
}
public void rebuildBoardsMenu(JMenu toolsMenu, final Editor editor) {
JMenu boardsMenu = makeOrGetBoardMenu(toolsMenu, "Board");
JMenu boardsMenu = makeOrGetBoardMenu(toolsMenu, _("Board"));
String selPackage = Preferences.get("target_package");
String selPlatform = Preferences.get("target_platform");
@ -1324,13 +1324,12 @@ public class Base {
}
private JMenu makeOrGetBoardMenu(JMenu toolsMenu, String label) {
String i18nLabel = _(label);
for (JMenu menu : Editor.boardsMenus) {
if (i18nLabel.equals(menu.getText())) {
if (label.equals(menu.getText())) {
return menu;
}
}
JMenu menu = new JMenu(i18nLabel);
JMenu menu = new JMenu(label);
Editor.boardsMenus.add(menu);
toolsMenu.add(menu);
return menu;

View File

@ -23,6 +23,8 @@
*/
package processing.app.debug;
import static processing.app.I18n._;
import java.io.File;
import java.util.HashMap;
import java.util.Map;
@ -46,6 +48,12 @@ public class TargetPlatform {
programmers = new HashMap<String, PreferencesMap>();
preferences = new PreferencesMap();
if (false) {
// Hack to extract this word by gettext tool.
// This word is actually defined in the "boards.txt".
String notused = _("Processor");
}
try {
File boardsFile = new File(_folder, "boards.txt");
if (boardsFile.exists()) {