Skip to content

Commit 16b28ed

Browse files
committed
Merge pull request #128 from sgk/ide15i18n
Fixes to include "Boards" and "Processor" entries in the "*.po" files.
2 parents 74dea07 + 9e25ad5 commit 16b28ed

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

app/src/processing/app/Base.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ public void onBoardOrPortChange() {
11241124
}
11251125

11261126
public void rebuildBoardsMenu(JMenu toolsMenu, final Editor editor) {
1127-
JMenu boardsMenu = makeOrGetBoardMenu(toolsMenu, "Board");
1127+
JMenu boardsMenu = makeOrGetBoardMenu(toolsMenu, _("Board"));
11281128

11291129
String selPackage = Preferences.get("target_package");
11301130
String selPlatform = Preferences.get("target_platform");
@@ -1287,13 +1287,12 @@ private static boolean ifThereAreVisibleItemsOn(JMenu menu) {
12871287
}
12881288

12891289
private JMenu makeOrGetBoardMenu(JMenu toolsMenu, String label) {
1290-
String i18nLabel = _(label);
12911290
for (JMenu menu : Editor.boardsMenus) {
1292-
if (i18nLabel.equals(menu.getText())) {
1291+
if (label.equals(menu.getText())) {
12931292
return menu;
12941293
}
12951294
}
1296-
JMenu menu = new JMenu(i18nLabel);
1295+
JMenu menu = new JMenu(label);
12971296
Editor.boardsMenus.add(menu);
12981297
toolsMenu.add(menu);
12991298
return menu;

app/src/processing/app/debug/TargetPlatform.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
*/
2424
package processing.app.debug;
2525

26+
import static processing.app.I18n._;
27+
2628
import java.io.File;
2729
import java.util.HashMap;
2830
import java.util.Map;
@@ -46,6 +48,12 @@ public TargetPlatform(String _name, File _folder) {
4648
programmers = new HashMap<String, PreferencesMap>();
4749
preferences = new PreferencesMap();
4850

51+
if (false) {
52+
// Hack to extract this word by gettext tool.
53+
// This word is actually defined in the "boards.txt".
54+
String notused = _("Processor");
55+
}
56+
4957
try {
5058
File boardsFile = new File(_folder, "boards.txt");
5159
if (boardsFile.exists()) {

0 commit comments

Comments
 (0)