1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-03 20:24:12 +01:00

Move some more strings to messages.properties and report (but don't throw) an error for unknown strings.

This commit is contained in:
Kris Maglione
2011-03-02 02:59:04 -05:00
parent 28d1c1bcad
commit e032a82d62
9 changed files with 147 additions and 103 deletions

View File

@@ -8,7 +8,7 @@ Components.utils.import("resource://dactyl/bootstrap.jsm");
defineModule("highlight", {
exports: ["Highlight", "Highlights", "highlight"],
require: ["services", "styles", "util"],
use: ["template"]
use: ["messages", "template"]
}, this);
var Highlight = Struct("class", "selector", "sites",
@@ -306,7 +306,7 @@ var Highlights = Module("Highlight", {
highlight.clear();
else {
lastScheme = modules.io.sourceFromRuntimePath(["colors/" + scheme + "." + config.fileExtension]);
dactyl.assert(lastScheme, "E185: Cannot find color scheme " + scheme);
dactyl.assert(lastScheme, _("command.colorscheme.notFound", scheme));
}
autocommands.trigger("ColorScheme", { name: scheme });
},
@@ -337,7 +337,7 @@ var Highlights = Module("Highlight", {
if (!modify && /&$/.test(key))
[clear, modify, key] = [true, true, key.replace(/&$/, "")];
dactyl.assert(!(clear && css), "E488: Trailing characters");
dactyl.assert(!(clear && css), _("error.trailing"));
if (!modify)
modules.commandline.commandOutput(
@@ -355,7 +355,7 @@ var Highlights = Module("Highlight", {
else if (key)
highlight.set(key, css, clear, "-append" in args, args["-link"]);
else
util.assert(false, "Invalid arguments");
util.assert(false, _("error.invalidArgument"));
},
{
// TODO: add this as a standard highlight completion function?