mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-30 09:12:26 +01:00
More ad hoc i18n work.
This commit is contained in:
@@ -110,7 +110,7 @@ var actions = {
|
||||
name: "extr[ehash]",
|
||||
description: "Reload an extension",
|
||||
action: function (addon) {
|
||||
util.assert(util.haveGecko("2b"), _("error.notUseful", config.host));
|
||||
util.assert(util.haveGecko("2b"), _("command.notUseful", config.host));
|
||||
util.timeout(function () {
|
||||
addon.userDisabled = true;
|
||||
addon.userDisabled = false;
|
||||
@@ -153,9 +153,9 @@ var Addon = Class("Addon", {
|
||||
<td highlight="AddonButtons Buttons">
|
||||
<a highlight="Button" key="enable">{_("addon.action.On")}</a>
|
||||
<a highlight="Button" key="disable">{_("addon.action.Off")}</a>
|
||||
<a highlight="Button" key="delete">{_("addon.action.Del")}</a>
|
||||
<a highlight="Button" key="update">{_("addon.action.Upd")}</a>
|
||||
<a highlight="Button" key="options">{_("addon.action.Opt")}</a>
|
||||
<a highlight="Button" key="delete">{_("addon.action.Delete")}</a>
|
||||
<a highlight="Button" key="update">{_("addon.action.Update")}</a>
|
||||
<a highlight="Button" key="options">{_("addon.action.Options")}</a>
|
||||
</td>
|
||||
<td highlight="AddonDescription" key="description"/>
|
||||
</tr>,
|
||||
@@ -418,7 +418,7 @@ var Addons = Module("addons", {
|
||||
function (args) {
|
||||
let name = args[0];
|
||||
if (args.bang && !command.bang)
|
||||
dactyl.assert(!name, _("error.trailing"));
|
||||
dactyl.assert(!name, _("error.trailingCharacters"));
|
||||
else
|
||||
dactyl.assert(name, _("error.argumentRequired"));
|
||||
|
||||
|
||||
@@ -310,7 +310,7 @@ var Command = Class("Command", {
|
||||
|
||||
util.assert((this.length == 0 || this.command.argCount !== "0") &&
|
||||
(this.length <= 1 || !/^[01?]$/.test(this.command.argCount)),
|
||||
_("error.trailing"));
|
||||
_("error.trailingCharacters"));
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -863,7 +863,7 @@ var Commands = Module("commands", {
|
||||
|
||||
let [count, arg, quote] = Commands.parseArg(str, null, _keepQuotes);
|
||||
if (quote == "\\" && !complete)
|
||||
return [, , , _("error.trailing", "\\")];
|
||||
return [, , , _("error.trailingCharacters", "\\")];
|
||||
if (quote && !complete)
|
||||
return [, , , _("error.missingQuote", quote)];
|
||||
return [count, arg, quote];
|
||||
|
||||
@@ -337,7 +337,7 @@ var Highlights = Module("Highlight", {
|
||||
if (!modify && /&$/.test(key))
|
||||
[clear, modify, key] = [true, true, key.replace(/&$/, "")];
|
||||
|
||||
dactyl.assert(!(clear && css), _("error.trailing"));
|
||||
dactyl.assert(!(clear && css), _("error.trailingCharacters"));
|
||||
|
||||
if (!modify)
|
||||
modules.commandline.commandOutput(
|
||||
|
||||
@@ -831,7 +831,7 @@ unlet s:cpo_save
|
||||
|
||||
let result = io.system(arg);
|
||||
if (result.returnValue != 0)
|
||||
result.output += /*L*/"\nshell returned " + result.returnValue;
|
||||
result.output += "\n" + _("io.shellReturn", result.returnValue);
|
||||
|
||||
modules.commandline.command = "!" + arg;
|
||||
modules.commandline.commandOutput(<span highlight="CmdOutput">{result.output}</span>);
|
||||
|
||||
@@ -1169,7 +1169,7 @@ var Options = Module("options", {
|
||||
|
||||
context.advance(context.filter.indexOf("="));
|
||||
if (option.type == "boolean")
|
||||
return error(context.filter.length, _("error.trailing"));
|
||||
return error(context.filter.length, _("error.trailingCharacters"));
|
||||
|
||||
context.advance(1);
|
||||
if (opt.error)
|
||||
|
||||
@@ -288,7 +288,7 @@ var Prefs = Module("prefs", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference])
|
||||
*/
|
||||
toggle: function (name) {
|
||||
util.assert(this.branch.getPrefType(name) === Ci.nsIPrefBranch.PREF_BOOL,
|
||||
_("error.trailing", name + "!"));
|
||||
_("error.trailingCharacters", name + "!"));
|
||||
this.set(name, !this.get(name));
|
||||
},
|
||||
|
||||
|
||||
@@ -416,7 +416,7 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
|
||||
args[0] = "all";
|
||||
|
||||
if (args.bang) {
|
||||
dactyl.assert(args.length == 0, _("error.trailing"));
|
||||
dactyl.assert(args.length == 0, _("error.trailingCharacters"));
|
||||
items = Object.keys(sanitizer.itemMap).filter(
|
||||
function (k) modules.options.get("sanitizeitems").has(k));
|
||||
}
|
||||
|
||||
@@ -182,12 +182,12 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
||||
|
||||
// check for chars not in the accepted range
|
||||
this.assert(RegExp("^[" + accepted + "-]+$").test(list),
|
||||
_("error.charsOutsideRange", accepted.quote()));
|
||||
_("error.charactersOutsideRange", accepted.quote()));
|
||||
|
||||
// check for illegal ranges
|
||||
for (let [match] in this.regexp.iterate(/.-./g, list))
|
||||
this.assert(match.charCodeAt(0) <= match.charCodeAt(2),
|
||||
_("error.invalidCharRange", list.slice(list.indexOf(match))));
|
||||
_("error.invalidCharacterRange", list.slice(list.indexOf(match))));
|
||||
|
||||
return RegExp("[" + util.regexp.escape(list) + "]");
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user