From 83385f9d0bd945ead712c94f2bfac17fe9f974bf Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sun, 6 Mar 2011 19:16:54 +1100 Subject: [PATCH] Move some more message strings to the properties file. --- common/locale/en-US/messages.properties | 7 +++++++ common/modules/io.jsm | 12 ++++++------ common/modules/options.jsm | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/common/locale/en-US/messages.properties b/common/locale/en-US/messages.properties index c7ab6f8e..453eda2a 100644 --- a/common/locale/en-US/messages.properties +++ b/common/locale/en-US/messages.properties @@ -100,6 +100,12 @@ io.exists-1 = File %S exists (add ! to override) io.noCommand-1 = Command not found: %S io.commandFailed = E472: Command failed io.oneFileAllowed = E172: Only one file name allowed +io.callingShell-1 = Calling shell to execute: %S +io.sourcing-1 = sourcing %S +io.sourcingEnd-1 = finished sourcing %S +io.notInRTP-1 = not found in 'runtimepath': %S +io.searchingFor-1 = Searching for %S +io.searchingFor-2 = Searching for %S in %S macro.canceled-1 = Canceled playback of macro '%S' macro.recorded-1 = Recorded macro '%S' @@ -123,6 +129,7 @@ mow.noPreviousOutput = No previous command output option.noSuch = No such option option.noSuch-1 = No such option: %S +option.replaceExisting = Warning: %S already exists: replacing existing option. plugin.searchingFor-1 = Searching for %S plugin.searchingForIn-2 = Searching for %S in %S diff --git a/common/modules/io.jsm b/common/modules/io.jsm index cd2e8597..b32fa7a7 100644 --- a/common/modules/io.jsm +++ b/common/modules/io.jsm @@ -112,14 +112,14 @@ var IO = Module("io", { let dirs = modules.options.get("runtimepath").files; let found = null; - dactyl.echomsg("Searching for " + paths.join(" ").quote() + " in " + modules.options.get("runtimepath").stringValue, 2); + dactyl.echomsg(_("io.searchingFor", paths.join(" ").quote(), modules.options.get("runtimepath").stringValue), 2); outer: for (let dir in values(dirs)) { for (let [,path] in Iterator(paths)) { let file = dir.child(path); - dactyl.echomsg("Searching for " + file.path.quote(), 3); + dactyl.echomsg(_("io.searchingFor", file.path.quote()), 3); if (file.exists() && file.isFile() && file.isReadable()) { found = io.source(file.path, false) || true; @@ -131,7 +131,7 @@ var IO = Module("io", { } if (!found) - dactyl.echomsg("not found in 'runtimepath': " + paths.join(" ").quote(), 1); + dactyl.echomsg(_("io.notInRTP", paths.join(" ").quote()), 1); return found; }, @@ -162,7 +162,7 @@ var IO = Module("io", { return; } - dactyl.echomsg("sourcing " + filename.quote(), 2); + dactyl.echomsg(_("io.sourcing", filename.quote()), 2); let uri = services.io.newFileURI(file); @@ -201,7 +201,7 @@ var IO = Module("io", { if (this._scriptNames.indexOf(file.path) == -1) this._scriptNames.push(file.path); - dactyl.echomsg("finished sourcing " + filename.quote(), 2); + dactyl.echomsg(_("io.sourcingEnd", filename.quote()), 2); dactyl.log("Sourced: " + filename, 3); return context; @@ -471,7 +471,7 @@ var IO = Module("io", { * @returns {object} */ system: function (command, input) { - util.dactyl.echomsg("Calling shell to execute: " + command, 4); + util.dactyl.echomsg(_("io.callingShell", command), 4); function escape(str) '"' + str.replace(/[\\"$]/g, "\\$&") + '"'; diff --git a/common/modules/options.jsm b/common/modules/options.jsm index ba662815..4717b5e8 100644 --- a/common/modules/options.jsm +++ b/common/modules/options.jsm @@ -803,7 +803,7 @@ var Options = Module("options", { let name = names[0]; if (name in this._optionMap) { - this.dactyl.log("Warning: " + name.quote() + " already exists: replacing existing option.", 1); + this.dactyl.log(_("option.replaceExisting", name.quote()), 1); this.remove(name); }