diff options
author | Doug Kearns <dougkearns@gmail.com> | 2011-03-08 03:09:37 +1100 |
---|---|---|
committer | Doug Kearns <dougkearns@gmail.com> | 2011-03-08 03:09:37 +1100 |
commit | c08c0dc19fb59e51153eb4477873745b43c1d4b9 (patch) | |
tree | 697b9b05388e82c24d04eeb4ccc41953284f751d /common | |
parent | 1f0a95e40d1c3c3fd22a54fc3ab41741de0d7bc1 (diff) | |
download | pentadactyl-c08c0dc19fb59e51153eb4477873745b43c1d4b9.tar.gz |
Move some more message strings to the properties file.
Diffstat (limited to 'common')
-rw-r--r-- | common/content/bookmarks.js | 8 | ||||
-rw-r--r-- | common/content/browser.js | 2 | ||||
-rw-r--r-- | common/content/modes.js | 2 | ||||
-rw-r--r-- | common/content/quickmarks.js | 2 | ||||
-rw-r--r-- | common/locale/en-US/messages.properties | 15 | ||||
-rw-r--r-- | common/modules/config.jsm | 2 | ||||
-rw-r--r-- | common/modules/contexts.jsm | 2 | ||||
-rw-r--r-- | common/modules/io.jsm | 2 | ||||
-rw-r--r-- | common/modules/util.jsm | 8 |
9 files changed, 27 insertions, 16 deletions
diff --git a/common/content/bookmarks.js b/common/content/bookmarks.js index 1ae229ca..ade210df 100644 --- a/common/content/bookmarks.js +++ b/common/content/bookmarks.js @@ -135,14 +135,14 @@ var Bookmarks = Module("bookmarks", { let count = this.remove(url); if (count > 0) - dactyl.echomsg({ domains: [util.getHost(url)], message: "Removed bookmark: " + url }); + dactyl.echomsg({ domains: [util.getHost(url)], message: _("bookmark.removed", url) }); else { let title = buffer.uri.spec == url && buffer.title || url; let extra = ""; if (title != url) extra = " (" + title + ")"; this.add({ unfiled: true, title: title, url: url }); - dactyl.echomsg({ domains: [util.getHost(url)], message: "Added bookmark: " + url + extra }); + dactyl.echomsg({ domains: [util.getHost(url)], message: _("bookmark.added", url + extra) }); } }, @@ -429,7 +429,7 @@ var Bookmarks = Module("bookmarks", { if (bookmarks.add(opts)) { let extra = (opts.title == opts.url) ? "" : " (" + opts.title + ")"; - dactyl.echomsg({ domains: [util.getHost(opts.url)], message: "Added bookmark: " + opts.url + extra }, + dactyl.echomsg({ domains: [util.getHost(opts.url)], message: _("bookmark.added", opts.url + extra) }, 1, commandline.FORCE_SINGLELINE); } else @@ -502,7 +502,7 @@ var Bookmarks = Module("bookmarks", { var deletedCount = bookmarks.remove(context.allItems.items.map(function (item) item.item.id)); } - dactyl.echomsg({ message: deletedCount + " bookmark(s) deleted" }); + dactyl.echomsg({ message: _("bookmark.deleted", deletedCount) }); } }, diff --git a/common/content/browser.js b/common/content/browser.js index 534ba143..746b46ec 100644 --- a/common/content/browser.js +++ b/common/content/browser.js @@ -81,7 +81,7 @@ var Browser = Module("browser", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), else { // code which should happen for all (also background) newly loaded tabs goes here: if (doc != config.browser.contentDocument) - dactyl.echomsg({ domains: [util.getHost(doc.location)], message: "Background tab loaded: " + (doc.title || doc.location.href) }, 3); + dactyl.echomsg({ domains: [util.getHost(doc.location)], message: _("buffer.backgroundLoaded", (doc.title || doc.location.href)) }, 3); this._triggerLoadAutocmd("PageLoad", doc); } diff --git a/common/content/modes.js b/common/content/modes.js index 8edce45a..a46b33ed 100644 --- a/common/content/modes.js +++ b/common/content/modes.js @@ -306,7 +306,7 @@ var Modes = Module("modes", { var delayed, oldExtended, oldMain, prev, push; if (this.inSet) { - dactyl.reportError(Error("Not executing modes.set recursively"), true); + dactyl.reportError(Error(_("mode.recursiveSet")), true); return; } diff --git a/common/content/quickmarks.js b/common/content/quickmarks.js index 1ef116f1..c12e7681 100644 --- a/common/content/quickmarks.js +++ b/common/content/quickmarks.js @@ -28,7 +28,7 @@ var QuickMarks = Module("quickmarks", { */ add: function add(qmark, location) { this._qmarks.set(qmark, location); - dactyl.echomsg({ domains: [util.getHost(location)], message: "Added Quick Mark '" + qmark + "': " + location }, 1); + dactyl.echomsg({ domains: [util.getHost(location)], message: _("quickmark.added", qmark, location) }, 1); }, /** diff --git a/common/locale/en-US/messages.properties b/common/locale/en-US/messages.properties index 141066c4..22982567 100644 --- a/common/locale/en-US/messages.properties +++ b/common/locale/en-US/messages.properties @@ -6,6 +6,7 @@ abbrev.none = No abbreviations found addon.check-1 = Checking updates for addons: %S addon.cantInstallDir-1 = Cannot install a directory: %S +addon.unavailable = Don't have add-on yet autocmd.executing-2 = Executing %S Auto commands for %S autocmd.autocommand-1 = autocommand %S @@ -19,6 +20,9 @@ bookmark.noMatchingString-1 = No bookmarks matching string %S bookmark.none = No bookmarks set bookmark.cantAdd-1 = Could not add bookmark %S bookmark.allGone = All bookmarks deleted +bookmark.removed-1 = Removed bookmark: %S +bookmark.added-1 = Added bookmark: %S +bookmark.deleted-1 = %S bookmark(s) deleted buffer.fewer-2 = %S fewer tab%S buffer.cantDetatchLast = Can't detach the last tab @@ -26,6 +30,7 @@ buffer.noMatching-1 = No matching buffer for %S buffer.multipleMatching-1 = More than one match for %S buffer.noClosed = No matching closed tab buffer.noAlternate = No alternate page +buffer.backgroundLoaded = Background tab loaded: %S command.commands = commands @@ -112,6 +117,7 @@ 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 +io.downloadFinished-2 = Download of %S to %S finished macro.canceled-1 = Canceled playback of macro '%S' macro.recorded-1 = Recorded macro '%S' @@ -131,6 +137,8 @@ mark.invalid = Invalid mark mark.unset-1 = Mark not set: %S mark.noMatching-1 = E283: No marks matching %S +mode.recursiveSet = Not executing modes.set recursively + mow.noPreviousOutput = No previous command output option.noSuch = No such option @@ -139,6 +147,7 @@ option.replaceExisting-1 = Warning: %S already exists: replacing existing option plugin.searchingFor-1 = Searching for %S plugin.searchingForIn-2 = Searching for %S in %S +plugin.notReplacingContext-1 = Not replacing plugin context for %S print.toFile-1 = Printing to file: %S print.sending = Sending to printer... @@ -149,6 +158,7 @@ quickmark.none = No QuickMarks set quickmark.noMatching-1 = No QuickMarks matching %S quickmark.notSet = QuickMark not set quickmark.invalid = Argument must be an ASCII letter or digit +quickmark.added-2 = Added Quick Mark '%S': %S save.invalidDestination-1 = Invalid destination: %S @@ -171,8 +181,6 @@ error.countRequired-1 = Count required for %S error.cantOpen-2 = Error opening %S: %S error.interrupted = Interrupted error.invalidSort-1 = Invalid sort order: %S -error.argRequired = Argument required - error.trailing = Trailing characters error.trailing-1 = Trailing characters: %S error.invalid-1 = Invalid %S @@ -183,4 +191,7 @@ error.argumentRequired = Argument required error.argumentOrBang = Argument or ! required error.invalidOperation = Invalid operation +error.monkeyPatchOverlay-1 = Not replacing property with eval-generated overlay by %S +error.nullComputedStyle-1 = Computed style is null: %S + # vim:se ft=jproperties tw=0: diff --git a/common/modules/config.jsm b/common/modules/config.jsm index 627551ba..7e088f98 100644 --- a/common/modules/config.jsm +++ b/common/modules/config.jsm @@ -59,7 +59,7 @@ var ConfigBase = Class("ConfigBase", { do { addon = (JSMLoader.bootstrap || {}).addon; if (addon && !addon.getResourceURI) { - util.reportError(Error("Don't have add-on yet")); + util.reportError(Error(_("addon.unavailable"))); yield 10; } } diff --git a/common/modules/contexts.jsm b/common/modules/contexts.jsm index 9693e741..15549e37 100644 --- a/common/modules/contexts.jsm +++ b/common/modules/contexts.jsm @@ -221,7 +221,7 @@ var Contexts = Module("contexts", { enumerable: true, get: function () self, set: function (val) { - util.dactyl(val).reportError(FailedAssertion("Not replacing plugin context for " + self.NAME, 3, false), true); + util.dactyl(val).reportError(FailedAssertion(_("plugin.notReplacingContext", self.NAME), 3, false), true); } }); } diff --git a/common/modules/io.jsm b/common/modules/io.jsm index b32fa7a7..93f9752e 100644 --- a/common/modules/io.jsm +++ b/common/modules/io.jsm @@ -48,7 +48,7 @@ var IO = Module("io", { let file = download.targetFile.path; let size = download.size; - dactyl.echomsg({ domains: [util.getHost(url)], message: "Download of " + title + " to " + file + " finished" }, + dactyl.echomsg({ domains: [util.getHost(url)], message: _("io.downloadFinished", title, file) }, 1, modules.commandline.ACTIVE_WINDOW); modules.autocommands.trigger("DownloadPost", { url: url, title: title, file: file, size: size }); } diff --git a/common/modules/util.jsm b/common/modules/util.jsm index 8675aa24..b72f6fa1 100644 --- a/common/modules/util.jsm +++ b/common/modules/util.jsm @@ -455,8 +455,8 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]), } catch (e) {} if (res == null) { - util.dumpStack("Computed style is null: " + node); - Cu.reportError(Error("Computed style is null: " + node)); + util.dumpStack(_("error.nullComputedStyle", node)); + Cu.reportError(Error(_("error.nullComputedStyle", node))); return {}; } return res; @@ -1227,8 +1227,8 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]), Class.replaceProperty(this, k, val); else { let package_ = util.newURI(util.fixURI(Components.stack.caller.filename)).host; - util.reportError(Error("Not replacing property with eval-generated overlay by " + package_)); - util.dactyl.echoerr("Not replacing property with eval-generated overlay by " + package_); + util.reportError(Error(_("error.monkeyPatchOverlay", package_))); + util.dactyl.echoerr(_("error.monkeyPatchOverlay", package_)); } }; } |