From ff95d036634b7170dfa1b71aeaba4faaa9adda67 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Wed, 14 Jan 2015 18:05:00 +0100 Subject: [PATCH] Updated some translation strings --- .../packages/uploaders/SerialUploader.java | 3 ++- .../src/processing/app/BaseNoGui.java | 26 +++++++++---------- .../src/processing/app/debug/Compiler.java | 2 +- .../src/processing/app/i18n/update.sh | 1 + 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java b/arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java index bced0adda..bd26a448e 100644 --- a/arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java +++ b/arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java @@ -114,7 +114,8 @@ public class SerialUploader extends Uploader { List before = Serial.list(); if (before.contains(uploadPort)) { if (verbose) - System.out.println(_("Forcing reset using 1200bps open/close on port ") + uploadPort); + System.out.println( + I18n.format(_("Forcing reset using 1200bps open/close on port {0}"), uploadPort)); Serial.touchPort(uploadPort, 1200); } Thread.sleep(400); diff --git a/arduino-core/src/processing/app/BaseNoGui.java b/arduino-core/src/processing/app/BaseNoGui.java index e922a9b01..2eff168a7 100644 --- a/arduino-core/src/processing/app/BaseNoGui.java +++ b/arduino-core/src/processing/app/BaseNoGui.java @@ -487,9 +487,9 @@ public class BaseNoGui { List warningsAccumulator = new LinkedList(); boolean success = false; try { - // costruttore di Editor carica lo sketch usando handleOpenInternal() che fa - // la new di Sketch che chiama load() nel suo costruttore - // In questo punto questo si traduce in: + // Editor constructor loads the sketch with handleOpenInternal() that + // creates a new Sketch that, in trun, calls load() inside its constructor + // This translates here as: // SketchData data = new SketchData(file); // File tempBuildFolder = getBuildFolder(); // data.load(); @@ -498,9 +498,9 @@ public class BaseNoGui { data.load(); // Sketch.exportApplet() - // - chiama Sketch.prepare() che chiama Sketch.ensureExistence() - // - chiama Sketch.build(verbose=false) che chiama Sketch.ensureExistence(), imposta il progressListener e chiama Compiler.build() - // - chiama Sketch.upload() (cfr. dopo...) + // - calls Sketch.prepare() that calls Sketch.ensureExistence() + // - calls Sketch.build(verbose=false) that calls Sketch.ensureExistence(), set progressListener and calls Compiler.build() + // - calls Sketch.upload() (see later...) if (!data.getFolder().exists()) showError(_("No sketch"), _("Can't find the sketch in the specified path"), null); String suggestedClassName = Compiler.build(data, tempBuildFolder.getAbsolutePath(), tempBuildFolder, null, parser.isDoVerboseBuild()); if (suggestedClassName == null) showError(_("Error while verifying"), _("An error occurred while verifying the sketch"), null); @@ -508,7 +508,7 @@ public class BaseNoGui { // - chiama Sketch.upload() ... to be continued ... Uploader uploader = Compiler.getUploaderByPreferences(parser.isNoUploadPort()); - if (uploader.requiresAuthorization() && !PreferencesData.has(uploader.getAuthorizationKey())) showError(_("..."), _("..."), null); + if (uploader.requiresAuthorization() && !PreferencesData.has(uploader.getAuthorizationKey())) showError("...", "...", null); try { success = Compiler.upload(data, uploader, tempBuildFolder.getAbsolutePath(), suggestedClassName, parser.isDoUseProgrammer(), parser.isNoUploadPort(), warningsAccumulator); showMessage(_("Done uploading"), _("Done uploading")); @@ -531,9 +531,9 @@ public class BaseNoGui { for (String path : parser.getFilenames()) { try { - // costruttore di Editor carica lo sketch usando handleOpenInternal() che fa - // la new di Sketch che chiama load() nel suo costruttore - // In questo punto questo si traduce in: + // Editor constructor loads sketch with handleOpenInternal() that + // creates a new Sketch that calls load() in its constructor + // This translates here as: // SketchData data = new SketchData(file); // File tempBuildFolder = getBuildFolder(); // data.load(); @@ -541,9 +541,9 @@ public class BaseNoGui { File tempBuildFolder = getBuildFolder(); data.load(); - // metodo Sketch.prepare() chiama Sketch.ensureExistence() - // Sketch.build(verbose) chiama Sketch.ensureExistence() e poi imposta il progressListener e, finalmente, chiama Compiler.build() - // In questo punto questo si traduce in: + // Sketch.prepare() calls Sketch.ensureExistence() + // Sketch.build(verbose) calls Sketch.ensureExistence() and set progressListener and, finally, calls Compiler.build() + // This translates here as: // if (!data.getFolder().exists()) showError(...); // String ... = Compiler.build(data, tempBuildFolder.getAbsolutePath(), tempBuildFolder, null, verbose); if (!data.getFolder().exists()) showError(_("No sketch"), _("Can't find the sketch in the specified path"), null); diff --git a/arduino-core/src/processing/app/debug/Compiler.java b/arduino-core/src/processing/app/debug/Compiler.java index 3b6d92e00..652d7c77f 100644 --- a/arduino-core/src/processing/app/debug/Compiler.java +++ b/arduino-core/src/processing/app/debug/Compiler.java @@ -86,7 +86,7 @@ public class Compiler implements MessageConsumer { static public String build(SketchData data, String buildPath, File tempBuildFolder, ProgressListener progListener, boolean verbose) throws RunnerException, PreferencesMapException { if (SketchData.checkSketchFile(data.getPrimaryFile()) == null) BaseNoGui.showError(_("Bad file selected"), - _("Bad sketch primary file or bad sketck directory structure"), null); + _("Bad sketch primary file or bad sketch directory structure"), null); String primaryClassName = data.getName() + ".cpp"; Compiler compiler = new Compiler(data, buildPath, primaryClassName); diff --git a/arduino-core/src/processing/app/i18n/update.sh b/arduino-core/src/processing/app/i18n/update.sh index 6e045dd7a..0705f0a17 100755 --- a/arduino-core/src/processing/app/i18n/update.sh +++ b/arduino-core/src/processing/app/i18n/update.sh @@ -21,6 +21,7 @@ catalog() # Generate the new text catalog without the already translated texts. # The 'merge existing' option for xgetext does not work propery for our purpose. find ../../../ -name '*.java' -print > "$files" + find ../../../../../app/src -name '*.java' -print >> "$files" xgettext -s -L Java --from-code=utf-8 -k_ --output="$catalog" --files-from="$files" }