@@ -464,7 +464,7 @@ public Base(String[] args) throws Exception {
464
464
if (!parser .isForceSavePrefs ())
465
465
PreferencesData .setDoSave (true );
466
466
if (handleOpen (file , retrieveSketchLocation (".default" ), false ) == null ) {
467
- String mess = I18n . format (tr ("Failed to open sketch: \" {0}\" " ), path );
467
+ String mess = format (tr ("Failed to open sketch: \" {0}\" " ), path );
468
468
// Open failure is fatal in upload/verify mode
469
469
if (parser .isVerifyOrUploadMode ())
470
470
showError (null , mess , 2 );
@@ -1126,7 +1126,7 @@ public void actionPerformed(ActionEvent e) {
1126
1126
importMenu .addSeparator ();
1127
1127
}
1128
1128
lastLibType = libType ;
1129
- JMenuItem platformItem = new JMenuItem (I18n . format (tr ("{0} libraries" ), tr (lastLibType )));
1129
+ JMenuItem platformItem = new JMenuItem (format (tr ("{0} libraries" ), tr (lastLibType )));
1130
1130
platformItem .setEnabled (false );
1131
1131
importMenu .add (platformItem );
1132
1132
}
@@ -1137,7 +1137,7 @@ public void actionPerformed(ActionEvent event) {
1137
1137
try {
1138
1138
activeEditor .getSketchController ().importLibrary (l );
1139
1139
} catch (IOException e ) {
1140
- showWarning (tr ("Error" ), I18n . format ("Unable to list header files in {0}" , l .getSrcFolder ()), e );
1140
+ showWarning (tr ("Error" ), format ("Unable to list header files in {0}" , l .getSrcFolder ()), e );
1141
1141
}
1142
1142
}
1143
1143
};
@@ -1269,7 +1269,7 @@ public void rebuildExamplesMenu(JMenu menu) {
1269
1269
if (!platformLibs .isEmpty ()) {
1270
1270
menu .addSeparator ();
1271
1271
platformLibs .sort ();
1272
- label = new JMenuItem (I18n . format (tr ("Examples for {0}" ), boardId ));
1272
+ label = new JMenuItem (format (tr ("Examples for {0}" ), boardId ));
1273
1273
label .setEnabled (false );
1274
1274
menu .add (label );
1275
1275
for (UserLibrary lib : platformLibs ) {
@@ -1280,7 +1280,7 @@ public void rebuildExamplesMenu(JMenu menu) {
1280
1280
if (!referencedPlatformLibs .isEmpty ()) {
1281
1281
menu .addSeparator ();
1282
1282
referencedPlatformLibs .sort ();
1283
- label = new JMenuItem (I18n . format (tr ("Examples for {0}" ), referencedPlatformName ));
1283
+ label = new JMenuItem (format (tr ("Examples for {0}" ), referencedPlatformName ));
1284
1284
label .setEnabled (false );
1285
1285
menu .add (label );
1286
1286
for (UserLibrary lib : referencedPlatformLibs ) {
@@ -1798,7 +1798,7 @@ public void actionPerformed(ActionEvent event) {
1798
1798
try {
1799
1799
activeEditor .getSketchController ().importLibrary (l );
1800
1800
} catch (IOException e ) {
1801
- showWarning (tr ("Error" ), I18n . format ("Unable to list header files in {0}" , l .getSrcFolder ()), e );
1801
+ showWarning (tr ("Error" ), format ("Unable to list header files in {0}" , l .getSrcFolder ()), e );
1802
1802
}
1803
1803
}
1804
1804
};
@@ -1948,10 +1948,9 @@ static protected File promptSketchbookLocation() {
1948
1948
static public void openURL (String url ) {
1949
1949
try {
1950
1950
BaseNoGui .getPlatform ().openURL (url );
1951
-
1952
1951
} catch (Exception e ) {
1953
1952
showWarning (tr ("Problem Opening URL" ),
1954
- I18n . format (tr ("Could not open the URL\n {0}" ), url ), e );
1953
+ format (tr ("Could not open the URL\n {0}" ), url ), e );
1955
1954
}
1956
1955
}
1957
1956
@@ -1973,10 +1972,9 @@ static protected boolean openFolderAvailable() {
1973
1972
static public void openFolder (File file ) {
1974
1973
try {
1975
1974
BaseNoGui .getPlatform ().openFolder (file );
1976
-
1977
1975
} catch (Exception e ) {
1978
1976
showWarning (tr ("Problem Opening Folder" ),
1979
- I18n . format (tr ("Could not open the folder\n {0}" ), file .getAbsolutePath ()), e );
1977
+ format (tr ("Could not open the folder\n {0}" ), file .getAbsolutePath ()), e );
1980
1978
}
1981
1979
}
1982
1980
@@ -2054,7 +2052,7 @@ static public void showReference(String prefix, String filename) {
2054
2052
if (referenceFile .exists ()){
2055
2053
openURL (referenceFile .getAbsolutePath ());
2056
2054
}else {
2057
- showWarning (tr ("Problem Opening URL" ), I18n . format (tr ("Could not open the URL\n {0}" ), referenceFile ), null );
2055
+ showWarning (tr ("Problem Opening URL" ), format (tr ("Could not open the URL\n {0}" ), referenceFile ), null );
2058
2056
}
2059
2057
}
2060
2058
@@ -2310,7 +2308,7 @@ public void handleAddLibrary() {
2310
2308
2311
2309
String libName = libFolder .getName ();
2312
2310
if (!BaseNoGui .isSanitaryName (libName )) {
2313
- String mess = I18n . format (tr ("The library \" {0}\" cannot be used.\n "
2311
+ String mess = format (tr ("The library \" {0}\" cannot be used.\n "
2314
2312
+ "Library names must contain only basic letters and numbers.\n "
2315
2313
+ "(ASCII only and no spaces, and it cannot start with a number)" ),
2316
2314
libName );
@@ -2334,7 +2332,7 @@ public void handleAddLibrary() {
2334
2332
// copy folder
2335
2333
File destinationFolder = new File (BaseNoGui .getSketchbookLibrariesFolder ().folder , sourceFile .getName ());
2336
2334
if (!destinationFolder .mkdir ()) {
2337
- activeEditor .statusError (I18n . format (tr ("A library named {0} already exists" ), sourceFile .getName ()));
2335
+ activeEditor .statusError (format (tr ("A library named {0} already exists" ), sourceFile .getName ()));
2338
2336
return ;
2339
2337
}
2340
2338
try {
0 commit comments