From d05b3758100069e8afb8e0975520bc110f52c873 Mon Sep 17 00:00:00 2001 From: Hasso Tepper Date: Mon, 18 Jan 2016 09:44:35 +0200 Subject: [PATCH] Fix some incorrect I18n.format()/tr() usage --- app/src/processing/app/Editor.java | 8 ++++---- .../src/cc/arduino/packages/uploaders/SSHUploader.java | 2 +- arduino-core/src/processing/app/SketchData.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/processing/app/Editor.java b/app/src/processing/app/Editor.java index 86260259a..2f7b5bfdf 100644 --- a/app/src/processing/app/Editor.java +++ b/app/src/processing/app/Editor.java @@ -2549,7 +2549,7 @@ public class Editor extends JFrame implements RunnerListener { if(serialPlotter.isClosed()) { serialPlotter = null; } else { - statusError(I18n.format("Serial monitor not available while plotter is open")); + statusError(tr("Serial monitor not available while plotter is open")); return; } } @@ -2578,7 +2578,7 @@ public class Editor extends JFrame implements RunnerListener { BoardPort port = Base.getDiscoveryManager().find(PreferencesData.get("serial.port")); if (port == null) { - statusError(I18n.format("Board at {0} is not available", PreferencesData.get("serial.port"))); + statusError(I18n.format(tr("Board at {0} is not available"), PreferencesData.get("serial.port"))); return; } @@ -2646,7 +2646,7 @@ public class Editor extends JFrame implements RunnerListener { if(serialMonitor.isClosed()) { serialMonitor = null; } else { - statusError(I18n.format("Plotter not available while serial monitor is open")); + statusError(tr("Plotter not available while serial monitor is open")); return; } } @@ -2674,7 +2674,7 @@ public class Editor extends JFrame implements RunnerListener { BoardPort port = Base.getDiscoveryManager().find(PreferencesData.get("serial.port")); if (port == null) { - statusError(I18n.format("Board at {0} is not available", PreferencesData.get("serial.port"))); + statusError(I18n.format(tr("Board at {0} is not available"), PreferencesData.get("serial.port"))); return; } diff --git a/arduino-core/src/cc/arduino/packages/uploaders/SSHUploader.java b/arduino-core/src/cc/arduino/packages/uploaders/SSHUploader.java index b6898d2a4..b0ba1ec4e 100644 --- a/arduino-core/src/cc/arduino/packages/uploaders/SSHUploader.java +++ b/arduino-core/src/cc/arduino/packages/uploaders/SSHUploader.java @@ -139,7 +139,7 @@ public class SSHUploader extends Uploader { return false; } if (e.getMessage().contains("Connection refused")) { - throw new RunnerException(I18n.format("Unable to connect to {0}", port.getAddress())); + throw new RunnerException(I18n.format(tr("Unable to connect to {0}"), port.getAddress())); } throw new RunnerException(e); } catch (Exception e) { diff --git a/arduino-core/src/processing/app/SketchData.java b/arduino-core/src/processing/app/SketchData.java index e0161727d..21aeecb48 100644 --- a/arduino-core/src/processing/app/SketchData.java +++ b/arduino-core/src/processing/app/SketchData.java @@ -136,7 +136,7 @@ public class SketchData { if (BaseNoGui.isSanitaryName(base)) { addCode(new SketchCode(new File(folder, filename))); } else { - System.err.println(I18n.format("File name {0} is invalid: ignored", filename)); + System.err.println(I18n.format(tr("File name {0} is invalid: ignored"), filename)); } } }