diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index a84e959ea..a7fd734de 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -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; diff --git a/app/src/processing/app/debug/TargetPlatform.java b/app/src/processing/app/debug/TargetPlatform.java index 4eabe9a95..542514e39 100644 --- a/app/src/processing/app/debug/TargetPlatform.java +++ b/app/src/processing/app/debug/TargetPlatform.java @@ -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(); 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()) {