1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-03-15 12:29:26 +01:00

"Boards" must be wrapped in _(...) call.

For internationalization, the word "Boards" must be wrapped directly in
_(...) call. The call was done in makeOrGetBoardMenu(). However, the second
call to makeOrGetBoardMenu() has the argument already wrapped by _(...).
This commit is contained in:
Shigeru KANEMOTO 2012-11-11 14:57:40 +09:00
parent 74dea07f2c
commit 27b8048fc6

View File

@ -1124,7 +1124,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");
@ -1287,13 +1287,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;