diff --git a/common/content/bookmarks.js b/common/content/bookmarks.js index 3f267249..4e7ded7f 100644 --- a/common/content/bookmarks.js +++ b/common/content/bookmarks.js @@ -30,6 +30,7 @@ var Bookmarks = Module("bookmarks", { signals: { "browser.locationChange": function (webProgress, request, uri) { + statusline.bookmarked = false; this.checkBookmarked(uri); } }, diff --git a/common/locale/en-US/messages.properties b/common/locale/en-US/messages.properties index 46fce503..adafe648 100644 --- a/common/locale/en-US/messages.properties +++ b/common/locale/en-US/messages.properties @@ -9,6 +9,20 @@ addon.cantInstallDir-1 = Cannot install a directory: %S addon.unavailable = Don't have add-on yet addon.uknownCommand = Unknown command addon.commandNotAllowed = Command not allowed +addon.installingUpdates-1 = Installing updates for addons: %S +addon.noUpdates = No addon updates found +addon.error-3 = Add-on %S %S: %S + +addon.action.On = OnĀ  +addon.action.Off = Off +addon.action.Del = Del +addon.action.Upd = Upd +addon.action.Opt = Opt + +AddonManager.ERROR_NETWORK_FAILURE = A network error occurred +AddonManager.ERROR_INCORRECT_HASH = The downloaded file did not match the expected hash +AddonManager.ERROR_CORRUPT_FILE = The file appears to be corrupt +AddonManager.ERROR_FILE_ACCESS = There was an error accessing the filesystem autocmd.executing-2 = Executing %S Auto commands for %S autocmd.autocommand-1 = autocommand %S @@ -36,6 +50,8 @@ buffer.noClosed = No matching closed tab buffer.noAlternate = No alternate page buffer.backgroundLoaded = Background tab loaded: %S +context.scriptGroup-1 = Script group for %S + command.commands = commands command.cantDelete = Cannot delete non-user commands @@ -66,12 +82,17 @@ command.let.unexpectedChar = E18: Unexpected characters in :let command.let.illegalVar-1 = E461: Illegal variable name: %S command.let.undefinedVar-1 = E121: Undefined variable: %S command.let.invalidExpression-1 = E15: Invalid expression: %S +command.yank.yankedLine-1 = Yanked %S line +command.yank.yankedLines-1 = Yanked %S lines command.run.noPrevious = E34: No previous command command.sanitize.privateMode = Cannot sanitize items in private mode command.set.numberRequired-2 = E521: Number required after =: %S=%S command.set.errorParsing-1 = Error parsing :set command: %S command.set.unknownOption-1 = E518: Unknown option: %S +completion.waitingFor-1 = Waiting for %S +completion.waitingForKeyPress = Waiting for key press + dactyl.parsingCommandLine-1 = Parsing command line options: %S dactyl.notCommand-2 = E492: Not a %S command: %S dactyl.sourcingPlugins-1 = Sourcing plugin directory: %S... @@ -90,6 +111,13 @@ download.uknownCommand = Unknown command download.commandNotAllowed = Command not allowed download.prompt.launchExternal = This will launch an executable download. Would you like to continue? (yes/[no]/always): +download.action.Pause = Pause +download.action.Remove = Remove +download.action.Resume = Resume +download.action.Retry = Retry +download.action.Cancel = Cancel +download.action.Delete = Delete + editor.noEditor = No editor specified editor.prompt.editPassword = Editing a password field externally will reveal the password. Would you like to continue? (yes/[no]): @@ -218,6 +246,7 @@ error.cantOpen-2 = Error opening %S: %S error.error-1 = Error: %S error.interrupted = Interrupted error.invalidSort-1 = Invalid sort order: %S +error.missingQuote-1 = E114: Missing quote: %S error.trailing = Trailing characters error.trailing-1 = Trailing characters: %S error.invalid-1 = Invalid %S diff --git a/common/modules/addons.jsm b/common/modules/addons.jsm index 7e8242ae..290c8ebd 100644 --- a/common/modules/addons.jsm +++ b/common/modules/addons.jsm @@ -22,8 +22,8 @@ var callResult = function callResult(method) { var listener = function listener(action, event) function addonListener(install) { this.dactyl[install.error ? "echoerr" : "echomsg"]( - "Add-on " + action + " " + event + ": " + (install.name || install.sourceURI.spec) + - (install.error ? ": " + addonErrors[install.error] : "")); + _("addon.error", action, event, (install.name || install.sourceURI.spec) + + (install.error ? ": " + addons.errors[install.error] : ""))); } var AddonListener = Class("AddonListener", { @@ -68,8 +68,8 @@ var updateAddons = Class("UpgradeListener", AddonListener, { if (!this.remaining.length) this.dactyl.echomsg( this.upgrade.length - ? "Installing updates for addons: " + this.upgrade.map(function (i) i.name).join(", ") - : "No addon updates found"); + ? _("addon.installingUpdates", this.upgrade.map(function (i) i.name).join(", ")) + : _("addon.noUpdates")); } }); @@ -151,11 +151,11 @@ var Addon = Class("Addon", { - On  - Off - Del - Upd - Opt + {_("addon.action.On")} + {_("addon.action.Off")} + {_("addon.action.Del")} + {_("addon.action.Upd")} + {_("addon.action.Opt")} , @@ -347,6 +347,11 @@ var AddonList = Class("AddonList", { }); var Addons = Module("addons", { + errors: Class.memoize(function () + array(["ERROR_NETWORK_FAILURE", "ERROR_INCORRECT_HASH", + "ERROR_CORRUPT_FILE", "ERROR_FILE_ACCESS"]) + .map(function (e) [AddonManager[e], _("AddonManager." + e)]) + .toObject()) }, { }, { commands: function (dactyl, modules, window) { @@ -595,12 +600,6 @@ else } }; -var addonErrors = array.toObject([ - [AddonManager.ERROR_NETWORK_FAILURE, "A network error occurred"], - [AddonManager.ERROR_INCORRECT_HASH, "The downloaded file did not match the expected hash"], - [AddonManager.ERROR_CORRUPT_FILE, "The file appears to be corrupt"], - [AddonManager.ERROR_FILE_ACCESS, "There was an error accessing the filesystem"]]); - endModule(); } catch(e){ if (isString(e)) e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); } diff --git a/common/modules/commands.jsm b/common/modules/commands.jsm index bd2c4f6a..06e11881 100644 --- a/common/modules/commands.jsm +++ b/common/modules/commands.jsm @@ -863,9 +863,9 @@ var Commands = Module("commands", { let [count, arg, quote] = Commands.parseArg(str, null, _keepQuotes); if (quote == "\\" && !complete) - return [, , , "Trailing \\"]; + return [, , , _("error.trailing", "\\")]; if (quote && !complete) - return [, , , "E114: Missing quote: " + quote]; + return [, , , _("error.missingQuote", quote)]; return [count, arg, quote]; } @@ -1351,7 +1351,7 @@ var Commands = Module("commands", { // dynamically get completions as specified with the command's completer function context.highlight(); if (!command) { - context.message = "No such command: " + match.cmd; + context.message = _("command.noSuch", match.cmd); context.highlight(0, match.cmd.length, "SPELLCHECK"); return; } @@ -1591,7 +1591,7 @@ var Commands = Module("commands", { dactyl.clipboardWrite(res); let lines = res.split("\n").length; - dactyl.echomsg("Yanked " + lines + " line" + (lines == 1 ? "" : "s")); + dactyl.echomsg(_("command.yank.yankedLine" + (lines == 1 ? "" : "s"), lines)); }, { completer: function (context) modules.completion[/^:/.test(context.filter) ? "ex" : "javascript"](context), diff --git a/common/modules/completion.jsm b/common/modules/completion.jsm index 25d2ba62..74e8cf15 100644 --- a/common/modules/completion.jsm +++ b/common/modules/completion.jsm @@ -11,7 +11,7 @@ try { Components.utils.import("resource://dactyl/bootstrap.jsm"); defineModule("completion", { exports: ["CompletionContext", "Completion", "completion"], - use: ["config", "template", "util"] + use: ["config", "messages", "template", "util"] }, this); /** @@ -331,7 +331,7 @@ var CompletionContext = Class("CompletionContext", { * The message displayed at the head of the completions for the * current context. */ - get message() this._message || (this.waitingForTab && this.hasItems !== false ? "Waiting for " : null), + get message() this._message || (this.waitingForTab && this.hasItems !== false ? _("completion.waitingFor", "") : null), set message(val) this._message = val, /** diff --git a/common/modules/contexts.jsm b/common/modules/contexts.jsm index c37aa104..bf7cbc98 100644 --- a/common/modules/contexts.jsm +++ b/common/modules/contexts.jsm @@ -237,7 +237,7 @@ var Contexts = Module("contexts", { group = this.addGroup(commands.nameRegexp .iterate(name.replace(/\.[^.]*$/, "")) .join("-").replace(/--+/g, "-"), - "Script group for " + file.path, + _("context.scriptGroup", file.path), null, false); Class.replaceProperty(self, "GROUP", group); diff --git a/common/modules/downloads.jsm b/common/modules/downloads.jsm index 62fc59d3..39441259 100644 --- a/common/modules/downloads.jsm +++ b/common/modules/downloads.jsm @@ -7,7 +7,7 @@ Components.utils.import("resource://dactyl/bootstrap.jsm"); defineModule("downloads", { exports: ["Download", "Downloads", "downloads"], - use: ["io", "prefs", "services", "util"] + use: ["io", "messages", "prefs", "services", "util"] }, this); Cu.import("resource://gre/modules/DownloadUtils.jsm", this); @@ -39,12 +39,12 @@ var Download = Class("Download", { - Pause - Remove - Resume - Retry - Cancel - Delete + {_("download.action.Pause")} + {_("download.action.Remove")} + {_("download.action.Resume")} + {_("download.action.Retry")} + {_("download.action.Cancel")} + {_("download.action.Delete")} 1) { this.context.waitingForTab = true; - this.context.message = "Waiting for key press"; + this.context.message = _("completion.waitingForKeyPress"); return null; }