summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Kearns <dougkearns@gmail.com>2011-04-01 10:12:47 +1100
committerDoug Kearns <dougkearns@gmail.com>2011-04-01 10:12:47 +1100
commita52a0dc61f0cb0184b209c897128bdf9fa63d48c (patch)
tree2c55763c839b7268749df37daee86b2d4a0d95a5
parent477b1139fc123d1dcb12fcc156df8d439bb6f096 (diff)
downloadpentadactyl-a52a0dc61f0cb0184b209c897128bdf9fa63d48c.tar.gz
More ad hoc i18n work.
-rw-r--r--common/content/abbreviations.js4
-rw-r--r--common/content/bookmarks.js2
-rw-r--r--common/content/buffer.js6
-rw-r--r--common/content/editor.js2
-rw-r--r--common/content/marks.js2
-rw-r--r--common/content/mow.js8
-rw-r--r--common/content/tabs.js8
-rw-r--r--common/locale/en-US/messages.properties59
-rw-r--r--common/modules/addons.jsm10
-rw-r--r--common/modules/commands.jsm4
-rw-r--r--common/modules/highlight.jsm2
-rw-r--r--common/modules/io.jsm2
-rw-r--r--common/modules/options.jsm2
-rw-r--r--common/modules/prefs.jsm2
-rw-r--r--common/modules/sanitizer.jsm2
-rw-r--r--common/modules/util.jsm4
-rw-r--r--melodactyl/content/player.js2
17 files changed, 65 insertions, 56 deletions
diff --git a/common/content/abbreviations.js b/common/content/abbreviations.js
index 4314abe9..ccc666e8 100644
--- a/common/content/abbreviations.js
+++ b/common/content/abbreviations.js
@@ -224,7 +224,7 @@ var Abbreviations = Module("abbreviations", {
// TODO: Move this to an ItemList to show this automatically
if (list.*.length() === list.text().length() + 2)
- dactyl.echomsg(_("abbrev.none"));
+ dactyl.echomsg(_("abbreviation.none"));
else
commandline.commandOutput(list);
}
@@ -301,7 +301,7 @@ var Abbreviations = Module("abbreviations", {
if (args.bang)
args["-group"].clear(modes);
else if (!args["-group"].remove(modes, args[0]))
- return dactyl.echoerr(_("abbrev.noSuch"));
+ return dactyl.echoerr(_("abbreviation.noSuch"));
}, {
argCount: "?",
bang: true,
diff --git a/common/content/bookmarks.js b/common/content/bookmarks.js
index ced48c6e..65691e1f 100644
--- a/common/content/bookmarks.js
+++ b/common/content/bookmarks.js
@@ -511,7 +511,7 @@ var Bookmarks = Module("bookmarks", {
function (resp) {
if (resp && resp.match(/^y(es)?$/i)) {
bookmarks.remove(Object.keys(bookmarkcache.bookmarks));
- dactyl.echomsg(_("bookmark.allGone"));
+ dactyl.echomsg(_("bookmark.allDeleted"));
}
});
else {
diff --git a/common/content/buffer.js b/common/content/buffer.js
index dd42d7df..161a09d5 100644
--- a/common/content/buffer.js
+++ b/common/content/buffer.js
@@ -607,7 +607,7 @@ var Buffer = Module("buffer", {
try {
window.urlSecurityCheck(uri.spec, doc.nodePrincipal);
- io.CommandFileMode(/*L*/"Save link: ", {
+ io.CommandFileMode(_("buffer.prompt.saveLink") + " ", {
onSubmit: function (path) {
let file = io.File(path);
if (file.exists() && file.isDirectory())
@@ -1284,7 +1284,7 @@ var Buffer = Module("buffer", {
// FIXME: arg handling is a bit of a mess, check for filename
dactyl.assert(!arg || arg[0] == ">" && !util.OS.isWindows,
- _("error.trailing"));
+ _("error.trailingCharacters"));
prefs.withContext(function () {
if (arg) {
@@ -1463,7 +1463,7 @@ var Buffer = Module("buffer", {
level = Math.constrain(level, Buffer.ZOOM_MIN, Buffer.ZOOM_MAX);
}
else
- dactyl.assert(false, _("error.trailing"));
+ dactyl.assert(false, _("error.trailingCharacters"));
buffer.setZoom(level, args.bang);
},
diff --git a/common/content/editor.js b/common/content/editor.js
index 86b8440c..3fd78fbe 100644
--- a/common/content/editor.js
+++ b/common/content/editor.js
@@ -243,7 +243,7 @@ var Editor = Module("editor", {
let args = options.get("editor").format(args);
- dactyl.assert(args.length >= 1, _("editor.noEditor"));
+ dactyl.assert(args.length >= 1, _("option.notSet", "editor"));
io.run(args.shift(), args, blocking);
},
diff --git a/common/content/marks.js b/common/content/marks.js
index fc63bc83..1cb3e957 100644
--- a/common/content/marks.js
+++ b/common/content/marks.js
@@ -249,7 +249,7 @@ var Marks = Module("marks", {
"Mark current location within the web page",
function (args) {
let mark = args[0] || "";
- dactyl.assert(mark.length <= 1, _("error.trailing"));
+ dactyl.assert(mark.length <= 1, _("error.trailingCharacters"));
dactyl.assert(/[a-zA-Z]/.test(mark), _("mark.invalid"));
marks.add(mark);
diff --git a/common/content/mow.js b/common/content/mow.js
index 51e55076..4e8c0b88 100644
--- a/common/content/mow.js
+++ b/common/content/mow.js
@@ -53,16 +53,16 @@ var MOW = Module("mow", {
<popupset>
<menupopup id="dactyl-contextmenu" highlight="Events" events="contextEvents">
<menuitem id="dactyl-context-copylink"
- label={/*L*/"Copy Link Location"} dactyl:group="link"
+ label={_("mow.contextMenu.copyLink")} dactyl:group="link"
oncommand="goDoCommand('cmd_copyLink');"/>
<menuitem id="dactyl-context-copypath"
- label={/*L*/"Copy File Path"} dactyl:group="link path"
+ label={_("mow.contextMenu.copyPath")} dactyl:group="link path"
oncommand="dactyl.clipboardWrite(document.popupNode.getAttribute('path'));"/>
<menuitem id="dactyl-context-copy"
- label={/*L*/"Copy"} dactyl:group="selection"
+ label={_("mow.contextMenu.copy")} dactyl:group="selection"
command="cmd_copy"/>
<menuitem id="dactyl-context-selectall"
- label={/*L*/"Select All"}
+ label={_("mow.contextMenu.selectAll")}
command="cmd_selectAll"/>
</menupopup>
</popupset>
diff --git a/common/content/tabs.js b/common/content/tabs.js
index f22e2b53..5c82b2bb 100644
--- a/common/content/tabs.js
+++ b/common/content/tabs.js
@@ -678,7 +678,7 @@ var Tabs = Module("tabs", {
if (/^\d+$/.test(arg))
tabs.select("-" + arg, true);
else
- dactyl.echoerr(_("error.trailing"));
+ dactyl.echoerr(_("error.trailingCharacters"));
}
else if (count > 0)
tabs.select("-" + count, true);
@@ -701,7 +701,7 @@ var Tabs = Module("tabs", {
// count is ignored if an arg is specified, as per Vim
if (arg) {
- dactyl.assert(/^\d+$/.test(arg), _("error.trailing"));
+ dactyl.assert(/^\d+$/.test(arg), _("error.trailingCharacters"));
index = arg - 1;
}
else
@@ -770,7 +770,7 @@ var Tabs = Module("tabs", {
// FIXME: tabmove! N should probably produce an error
dactyl.assert(!arg || /^([+-]?\d+)$/.test(arg),
- _("error.trailing"));
+ _("error.trailingCharacters"));
// if not specified, move to after the last tab
tabs.move(config.tabbrowser.mCurrentTab, arg || "$", args.bang);
@@ -825,7 +825,7 @@ var Tabs = Module("tabs", {
"Attach the current tab to another window",
function (args) {
dactyl.assert(args.length <= 2 && !args.some(function (i) !/^\d+$/.test(i)),
- _("error.trailing"));
+ _("error.trailingCharacters"));
let [winIndex, tabIndex] = args.map(parseInt);
let win = dactyl.windows[winIndex - 1];
diff --git a/common/locale/en-US/messages.properties b/common/locale/en-US/messages.properties
index 6e6ddd28..63d1a130 100644
--- a/common/locale/en-US/messages.properties
+++ b/common/locale/en-US/messages.properties
@@ -1,13 +1,12 @@
# TODO: normalize this debacle of Vim legacy messages
-# : are we losing the error code prefixes? --djk
-abbrev.noSuch = No such abbreviation
-abbrev.none = No abbreviations found
+abbreviation.noSuch = No such abbreviation
+abbreviation.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
-addon.uknownCommand = Unknown command
+addon.unknownCommand = Unknown command
addon.commandNotAllowed = Command not allowed
addon.installingUpdates-1 = Installing updates for addons: %S
addon.noUpdates = No addon updates found
@@ -15,9 +14,9 @@ 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
+addon.action.Delete = Del
+addon.action.Update = Upd
+addon.action.Options = Opt
AddonManager.ERROR_NETWORK_FAILURE = A network error occurred
AddonManager.ERROR_INCORRECT_HASH = The downloaded file did not match the expected hash
@@ -35,12 +34,13 @@ bookmark.noMatchingTags-1 = No bookmarks matching tags %S
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.allDeleted = All bookmarks deleted
bookmark.removed-1 = Removed bookmark: %S
bookmark.added-1 = Added bookmark: %S
bookmark.deleted-1 = %S bookmark(s) deleted
bookmark.prompt.deleteAll = This will delete all bookmarks. Would you like to continue? (yes/[no]):
+# TODO: add plurals support
buffer.fewerTab-1 = %S fewer tab
buffer.fewerTabs-1 = %S fewer tabs
buffer.cantDetatchLast = Can't detach the last tab
@@ -50,12 +50,15 @@ buffer.noClosed = No matching closed tab
buffer.noAlternate = No alternate page
buffer.backgroundLoaded = Background tab loaded: %S
+# TODO: categorise these
buffer.noTitle = [No Title]
buffer.noName = [No Name]
buffer.help = [Help]
buffer.bookmarked = bookmarked
+
buffer.prompt.uploadFile = Upload file:
+buffer.prompt.saveLink = Save link:
context.scriptGroup-1 = Script group for %S
@@ -84,18 +87,18 @@ command.noBang = E477: No ! allowed
command.colorscheme.notFound-1 = E185: Cannot find color scheme %S
command.conditional.illegal = Invalid use of conditional
command.finish.illegal = E168: :finish used outside of a sourced file
-command.let.noSuch-1 = E108: No such variable: %S
-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.let.noSuch-1 = E108: No such variable: %S
+command.let.undefinedVar-1 = E121: Undefined variable: %S
+command.let.unexpectedChar = E18: Unexpected characters in :let
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.numberRequired-2 = E521: Number required after =: %S=%S
command.set.unknownOption-1 = E518: Unknown option: %S
+command.yank.yankedLine-1 = Yanked %S line
+command.yank.yankedLines-1 = Yanked %S lines
completion.waitingFor-1 = Waiting for %S
completion.waitingForKeyPress = Waiting for key press
@@ -117,9 +120,9 @@ dactyl.yank-1 = Yank %S
dialog.notAvailable-1 = Dialog %S not available
# TODO: merge with addon.*?
-download.uknownCommand = Unknown command
+download.unknownCommand = 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.prompt.launchExecutable = This will launch an executable download. Would you like to continue? (yes/[no]/always):
download.action.Pause = Pause
download.action.Remove = Remove
@@ -128,7 +131,6 @@ 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]):
emenu.notFound-1 = Menu not found: %S
@@ -173,6 +175,7 @@ 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
+io.shellReturn-1 = shell returned %S
macro.canceled-1 = Canceled playback of macro '%S'
macro.recorded-1 = Recorded macro '%S'
@@ -206,24 +209,30 @@ mow.continue = Press ENTER or type command to continue
mow.more = -- More --
mow.moreHelp = -- More -- SPACE/<C-f>/j: screen/page/line down, <C-b>/<C-u>/k: up, q: quit
+mow.contextMenu.copyLink = Copy Link Location
+mow.contextMenu.copyPath = Copy File Path
+mow.contextMenu.copy = Copy
+mow.contextMenu.selectAll = Select All
+
option.noSuch = No such option
option.noSuch-1 = No such option: %S
option.replaceExisting-1 = Warning: %S already exists: replacing existing option
option.intRequired = Integer value required
option.operatorNotSupported-2 = Operator %S not supported for option type %S
+option.notSet-1 = E764: Option '%S' is not set
option.currentValue = Current Value
option.defaultValue = Default Value
option.bufferLocal = buffer local
+option.activate.safeSet = See the 'activate' option.
+option.guioptions.safeSet = See 'guioptions' scrollbar flags.
+option.hintkeys.duplicate = Duplicate keys not allowed
# The string 'passkeys' must appear exactly, including U0027 apostrophes
option.passkeys.passedBy = passed by 'passkeys'
-option.hintkeys.duplicate = Duplicate keys not allowed
-option.showtabline.safeSet = See 'showtabline' option.
-option.activate.safeSet = See the 'activate' option.
option.popups.safeSet = See the 'activate' option.
-option.guioptions.safeSet = See 'guioptions' scrollbar flags.
+option.showtabline.safeSet = See 'showtabline' option.
option.visualbell.safeSet = See 'visualbell' option.
pageinfo.s.ownerUnverified = %S (unverified)
@@ -271,8 +280,8 @@ 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.trailingCharacters = Trailing characters
+error.trailingCharacters-1 = Trailing characters: %S
error.invalid-1 = Invalid %S
error.invalidArgument = Invalid argument
error.invalidArgument-1 = Invalid argument: %S
@@ -283,8 +292,8 @@ error.invalidOperation = Invalid operation
error.monkeyPatchOverlay-1 = Not replacing property with eval-generated overlay by %S
error.nullComputedStyle-1 = Computed style is null: %S
error.syntaxError = Syntax error
-error.charsOutsideRange-1 = Character list outside the range %S
-error.invalidCharRange = Invalid character range: %S
+error.charactersOutsideRange-1 = Character list outside the range %S
+error.invalidCharacterRange = Invalid character range: %S
error.notWriteable-2 = Could not write to %S: %S
warn.deprecated-2 = %S is deprecated: Please use %S instead.
diff --git a/common/modules/addons.jsm b/common/modules/addons.jsm
index 2d584911..58458c71 100644
--- a/common/modules/addons.jsm
+++ b/common/modules/addons.jsm
@@ -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"));
diff --git a/common/modules/commands.jsm b/common/modules/commands.jsm
index 3c60ad87..e27e7b5e 100644
--- a/common/modules/commands.jsm
+++ b/common/modules/commands.jsm
@@ -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];
diff --git a/common/modules/highlight.jsm b/common/modules/highlight.jsm
index 37d769d5..6142cce5 100644
--- a/common/modules/highlight.jsm
+++ b/common/modules/highlight.jsm
@@ -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(
diff --git a/common/modules/io.jsm b/common/modules/io.jsm
index edf378d0..5dd2b2fb 100644
--- a/common/modules/io.jsm
+++ b/common/modules/io.jsm
@@ -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>);
diff --git a/common/modules/options.jsm b/common/modules/options.jsm
index e856cd4e..56f0e899 100644
--- a/common/modules/options.jsm
+++ b/common/modules/options.jsm
@@ -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)
diff --git a/common/modules/prefs.jsm b/common/modules/prefs.jsm
index 6837f735..1fa898b2 100644
--- a/common/modules/prefs.jsm
+++ b/common/modules/prefs.jsm
@@ -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));
},
diff --git a/common/modules/sanitizer.jsm b/common/modules/sanitizer.jsm
index 837a9a6b..b7b3fe61 100644
--- a/common/modules/sanitizer.jsm
+++ b/common/modules/sanitizer.jsm
@@ -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));
}
diff --git a/common/modules/util.jsm b/common/modules/util.jsm
index 989f6ef1..16f9b0b6 100644
--- a/common/modules/util.jsm
+++ b/common/modules/util.jsm
@@ -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) + "]");
},
diff --git a/melodactyl/content/player.js b/melodactyl/content/player.js
index 3bed2ed0..5609a301 100644
--- a/melodactyl/content/player.js
+++ b/melodactyl/content/player.js
@@ -661,7 +661,7 @@ const Player = Module("player", {
let arg = args[0];
dactyl.assert(arg, _("error.argumentRequired"));
- dactyl.assert(/^[+-]?\d+$/.test(arg), _("error.trailing"));
+ dactyl.assert(/^[+-]?\d+$/.test(arg), _("error.trailingCharacters"));
let level = parseInt(arg, 10) / 100;