Skip to content

Commit 821ee53

Browse files
committed
Replaced some example menu labels
From: `Examples from Built-in Libraries` To: `Examples for any board` From: `Examples from Arduino AVR Boards Libraries` (selected platform) To: `Examples for Arduino/Genuino Micro` (selected board) From: `Examples from Arduino AVR Boards Libraries` (referenced platform) To: `Examples for Arduino AVR Boards` (referenced platform)
1 parent afc7c59 commit 821ee53

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/src/processing/app/Base.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,11 +1137,13 @@ public void rebuildExamplesMenu(JMenu menu) {
11371137
File platformLibraryPath = null;
11381138
File referencedPlatformLibraryPath = null;
11391139
String platformName = null;
1140+
String boardId = null;
11401141
String referencedPlatformName = null;
11411142
String myArch = null;
11421143
TargetPlatform targetPlatform = BaseNoGui.getTargetPlatform();
11431144
if (targetPlatform != null) {
11441145
myArch = targetPlatform.getId();
1146+
boardId = BaseNoGui.getTargetBoard().getName();
11451147
platformName = targetPlatform.getPreferences().get("name");
11461148
platformLibraryPath = new File(targetPlatform.getFolder(), "libraries");
11471149
String core = BaseNoGui.getBoardPreferences().get("build.core", "arduino");
@@ -1216,7 +1218,7 @@ public void rebuildExamplesMenu(JMenu menu) {
12161218
// Add examples from libraries
12171219
if (!ideLibs.isEmpty()) {
12181220
ideLibs.sort();
1219-
label = new JMenuItem(tr("Examples from Built-in Libraries"));
1221+
label = new JMenuItem(tr("Examples for any board"));
12201222
label.setEnabled(false);
12211223
menu.add(label);
12221224
}
@@ -1236,7 +1238,7 @@ public void rebuildExamplesMenu(JMenu menu) {
12361238
if (!platformLibs.isEmpty()) {
12371239
menu.addSeparator();
12381240
platformLibs.sort();
1239-
label = new JMenuItem(I18n.format(tr("Examples from {0} Libraries"), platformName));
1241+
label = new JMenuItem(I18n.format(tr("Examples for {0}"), boardId));
12401242
label.setEnabled(false);
12411243
menu.add(label);
12421244
for (UserLibrary lib : platformLibs) {
@@ -1247,7 +1249,7 @@ public void rebuildExamplesMenu(JMenu menu) {
12471249
if (!referencedPlatformLibs.isEmpty()) {
12481250
menu.addSeparator();
12491251
referencedPlatformLibs.sort();
1250-
label = new JMenuItem(I18n.format(tr("Examples from {0} Libraries"), referencedPlatformName));
1252+
label = new JMenuItem(I18n.format(tr("Examples for {0}"), referencedPlatformName));
12511253
label.setEnabled(false);
12521254
menu.add(label);
12531255
for (UserLibrary lib : referencedPlatformLibs) {

0 commit comments

Comments
 (0)