From 19bfd2ada93d131c9af3afb1f5a41d87ee22dfb3 Mon Sep 17 00:00:00 2001 From: per1234 Date: Tue, 26 Jun 2018 20:13:22 -0700 Subject: [PATCH] Correct messages re: sketch/library folder name restrictions - Specify that library name error is about folder name. - We would normally expect "library name" to mean the "fancy name" (as defined by the library.properties name field). - Specify exactly which characters are allowed. - State that spaces are prohibited in sketch folder name. - Remove outdated message about library folders not being allowed to start with a number. - This restriction was removed by https://github.com/arduino/Arduino/commit/4545283ae773b6351d089e37b6d4080905ea8fd5. - State library folder name length restriction. - Make sketch and library messages consistent with each other. --- app/src/processing/app/SketchController.java | 5 +++-- .../cc/arduino/contributions/libraries/LibrariesIndexer.java | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/processing/app/SketchController.java b/app/src/processing/app/SketchController.java index 6f99a1fb6..89f1a3516 100644 --- a/app/src/processing/app/SketchController.java +++ b/app/src/processing/app/SketchController.java @@ -846,8 +846,9 @@ public class SketchController { if (!newName.equals(origName)) { String msg = - tr("The sketch name had to be modified. Sketch names can only consist\n" + - "of ASCII characters and numbers and be less than 64 characters long."); + tr("The sketch name had to be modified.\n" + + "Sketch names must start with a letter or number, followed by letters,\n" + + "numbers, dashes, dots and underscores. Maximum length is 63 characters."); System.out.println(msg); } return newName; diff --git a/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java b/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java index e088cca84..e30ff15f5 100644 --- a/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java +++ b/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java @@ -178,8 +178,8 @@ public class LibrariesIndexer { badLibNotified.add(subfolderName); String mess = I18n.format(tr("The library \"{0}\" cannot be used.\n" - + "Library names must contain only basic letters and numbers.\n" - + "(ASCII only and no spaces, and it cannot start with a number)"), + + "Library folder names must start with a letter or number, followed by letters,\n" + + "numbers, dashes, dots and underscores. Maximum length is 63 characters."), subfolderName); BaseNoGui.showMessage(tr("Ignoring bad library name"), mess); }