1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-29 02:45:44 +01:00

Move some more message strings to the properties file.

This commit is contained in:
Doug Kearns
2011-03-08 03:09:37 +11:00
parent 1f0a95e40d
commit c08c0dc19f
9 changed files with 27 additions and 16 deletions

View File

@@ -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) });
}
},

View File

@@ -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);
}

View File

@@ -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;
}

View File

@@ -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);
},
/**