Skip to content

Commit 19bfd2a

Browse files
per1234cmaglie
authored andcommitted
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 4545283. - State library folder name length restriction. - Make sketch and library messages consistent with each other.
1 parent 677e050 commit 19bfd2a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Diff for: app/src/processing/app/SketchController.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -846,8 +846,9 @@ private static String checkName(String origName) {
846846

847847
if (!newName.equals(origName)) {
848848
String msg =
849-
tr("The sketch name had to be modified. Sketch names can only consist\n" +
850-
"of ASCII characters and numbers and be less than 64 characters long.");
849+
tr("The sketch name had to be modified.\n" +
850+
"Sketch names must start with a letter or number, followed by letters,\n" +
851+
"numbers, dashes, dots and underscores. Maximum length is 63 characters.");
851852
System.out.println(msg);
852853
}
853854
return newName;

Diff for: arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ private void scanInstalledLibraries(UserLibraryFolder folderDesc) {
178178
badLibNotified.add(subfolderName);
179179

180180
String mess = I18n.format(tr("The library \"{0}\" cannot be used.\n"
181-
+ "Library names must contain only basic letters and numbers.\n"
182-
+ "(ASCII only and no spaces, and it cannot start with a number)"),
181+
+ "Library folder names must start with a letter or number, followed by letters,\n"
182+
+ "numbers, dashes, dots and underscores. Maximum length is 63 characters."),
183183
subfolderName);
184184
BaseNoGui.showMessage(tr("Ignoring bad library name"), mess);
185185
}

0 commit comments

Comments
 (0)