From 821ee53d40e4fc8b02b1b2a7645f65c4402992fe Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Mon, 19 Sep 2016 16:16:41 +0200 Subject: [PATCH] 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) --- app/src/processing/app/Base.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index 7e4d602ed..86eb4f265 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -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) {