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)
This commit is contained in:
Cristian Maglie 2016-09-19 16:16:41 +02:00
parent afc7c596fc
commit 821ee53d40
1 changed files with 5 additions and 3 deletions

View File

@ -1137,11 +1137,13 @@ public class Base {
File platformLibraryPath = null;
File referencedPlatformLibraryPath = null;
String platformName = null;
String boardId = null;
String referencedPlatformName = null;
String myArch = null;
TargetPlatform targetPlatform = BaseNoGui.getTargetPlatform();
if (targetPlatform != null) {
myArch = targetPlatform.getId();
boardId = BaseNoGui.getTargetBoard().getName();
platformName = targetPlatform.getPreferences().get("name");
platformLibraryPath = new File(targetPlatform.getFolder(), "libraries");
String core = BaseNoGui.getBoardPreferences().get("build.core", "arduino");
@ -1216,7 +1218,7 @@ public class Base {
// Add examples from libraries
if (!ideLibs.isEmpty()) {
ideLibs.sort();
label = new JMenuItem(tr("Examples from Built-in Libraries"));
label = new JMenuItem(tr("Examples for any board"));
label.setEnabled(false);
menu.add(label);
}
@ -1236,7 +1238,7 @@ public class Base {
if (!platformLibs.isEmpty()) {
menu.addSeparator();
platformLibs.sort();
label = new JMenuItem(I18n.format(tr("Examples from {0} Libraries"), platformName));
label = new JMenuItem(I18n.format(tr("Examples for {0}"), boardId));
label.setEnabled(false);
menu.add(label);
for (UserLibrary lib : platformLibs) {
@ -1247,7 +1249,7 @@ public class Base {
if (!referencedPlatformLibs.isEmpty()) {
menu.addSeparator();
referencedPlatformLibs.sort();
label = new JMenuItem(I18n.format(tr("Examples from {0} Libraries"), referencedPlatformName));
label = new JMenuItem(I18n.format(tr("Examples for {0}"), referencedPlatformName));
label.setEnabled(false);
menu.add(label);
for (UserLibrary lib : referencedPlatformLibs) {