mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 11:47:58 +01:00
Move some more message strings to the properties file.
This commit is contained in:
@@ -539,7 +539,7 @@ var Events = Module("events", {
|
|||||||
timeRecorded: Date.now()
|
timeRecorded: Date.now()
|
||||||
});
|
});
|
||||||
|
|
||||||
dactyl.log("Recorded " + this.recording + ": " + this._macroKeys.join(""), 9);
|
dactyl.log(_("macro.recorded", this.recording, this._macroKeys.join("")), 9);
|
||||||
dactyl.echomsg(_("macro.recorded", this.recording));
|
dactyl.echomsg(_("macro.recorded", this.recording));
|
||||||
}
|
}
|
||||||
this._recording = macro || null;
|
this._recording = macro || null;
|
||||||
|
|||||||
@@ -53,14 +53,14 @@ var Marks = Module("marks", {
|
|||||||
if (Marks.isURLMark(mark)) {
|
if (Marks.isURLMark(mark)) {
|
||||||
let res = this._urlMarks.set(mark, { location: doc.documentURI, position: position, tab: Cu.getWeakReference(tabs.getTab()), timestamp: Date.now()*1000 });
|
let res = this._urlMarks.set(mark, { location: doc.documentURI, position: position, tab: Cu.getWeakReference(tabs.getTab()), timestamp: Date.now()*1000 });
|
||||||
if (!silent)
|
if (!silent)
|
||||||
dactyl.log("Adding URL mark: " + Marks.markToString(mark, res), 5);
|
dactyl.log(_("mark.addURL", Marks.markToString(mark, res)), 5);
|
||||||
}
|
}
|
||||||
else if (Marks.isLocalMark(mark)) {
|
else if (Marks.isLocalMark(mark)) {
|
||||||
let marks = this._localMarks.get(doc.documentURI, {});
|
let marks = this._localMarks.get(doc.documentURI, {});
|
||||||
marks[mark] = { location: doc.documentURI, position: position, timestamp: Date.now()*1000 };
|
marks[mark] = { location: doc.documentURI, position: position, timestamp: Date.now()*1000 };
|
||||||
this._localMarks.changed();
|
this._localMarks.changed();
|
||||||
if (!silent)
|
if (!silent)
|
||||||
dactyl.log("Adding local mark: " + Marks.markToString(mark, marks[mark]), 5);
|
dactyl.log(_("mark.addLocal", Marks.markToString(mark, marks[mark])), 5);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ var Marks = Module("marks", {
|
|||||||
tabs.select(tab);
|
tabs.select(tab);
|
||||||
let doc = tab.linkedBrowser.contentDocument;
|
let doc = tab.linkedBrowser.contentDocument;
|
||||||
if (doc.documentURI == mark.location) {
|
if (doc.documentURI == mark.location) {
|
||||||
dactyl.log("Jumping to URL mark: " + Marks.markToString(char, mark), 5);
|
dactyl.log(_("mark.jumpingToURL", Marks.markToString(char, mark)), 5);
|
||||||
buffer.scrollToPercent(mark.position.x * 100, mark.position.y * 100);
|
buffer.scrollToPercent(mark.position.x * 100, mark.position.y * 100);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -146,7 +146,7 @@ var Marks = Module("marks", {
|
|||||||
let mark = (this._localMarks.get(this.localURI) || {})[char];
|
let mark = (this._localMarks.get(this.localURI) || {})[char];
|
||||||
dactyl.assert(mark, _("mark.unset", char));
|
dactyl.assert(mark, _("mark.unset", char));
|
||||||
|
|
||||||
dactyl.log("Jumping to local mark: " + Marks.markToString(char, mark), 5);
|
dactyl.log(_("marks.jumpingToLocal", Marks.markToString(char, mark)), 5);
|
||||||
buffer.scrollToPercent(mark.position.x * 100, mark.position.y * 100);
|
buffer.scrollToPercent(mark.position.x * 100, mark.position.y * 100);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ dactyl.modulesLoaded = All modules loaded
|
|||||||
dactyl.commandlineOpts-1 = Command-line options: %S
|
dactyl.commandlineOpts-1 = Command-line options: %S
|
||||||
dactyl.noRCFile = No user RC file found
|
dactyl.noRCFile = No user RC file found
|
||||||
dactyl.initialized-1 = %S fully initialized
|
dactyl.initialized-1 = %S fully initialized
|
||||||
|
dactyl.sourced-1 = Sourced: %S
|
||||||
|
|
||||||
dialog.notAvailable-1 = Dialog %S not available
|
dialog.notAvailable-1 = Dialog %S not available
|
||||||
|
|
||||||
@@ -135,6 +136,7 @@ io.downloadFinished-2 = Download of %S to %S finished
|
|||||||
|
|
||||||
macro.canceled-1 = Canceled playback of macro '%S'
|
macro.canceled-1 = Canceled playback of macro '%S'
|
||||||
macro.recorded-1 = Recorded macro '%S'
|
macro.recorded-1 = Recorded macro '%S'
|
||||||
|
macro.recorded-2 = Recorded macro %S: %S
|
||||||
macro.loadFailed-1 = Page did not load completely in %S seconds
|
macro.loadFailed-1 = Page did not load completely in %S seconds
|
||||||
macro.loadWaiting = Waiting for page to load...
|
macro.loadWaiting = Waiting for page to load...
|
||||||
macro.noSuch-1 = Macro '%S' not set
|
macro.noSuch-1 = Macro '%S' not set
|
||||||
@@ -150,6 +152,11 @@ mark.none = No marks set
|
|||||||
mark.invalid = Invalid mark
|
mark.invalid = Invalid mark
|
||||||
mark.unset-1 = Mark not set: %S
|
mark.unset-1 = Mark not set: %S
|
||||||
mark.noMatching-1 = E283: No marks matching %S
|
mark.noMatching-1 = E283: No marks matching %S
|
||||||
|
# TODO: relies on mark formatter
|
||||||
|
mark.addURL-1 = Adding URL mark: %S
|
||||||
|
mark.addLocal-1 = Adding local mark: %S
|
||||||
|
mark.jumpingToURL-1 = Jumping to URL mark: %S
|
||||||
|
mark.jumpingToLocal-1 = Jumping to local mark: %S
|
||||||
|
|
||||||
mode.recursiveSet = Not executing modes.set recursively
|
mode.recursiveSet = Not executing modes.set recursively
|
||||||
mode.invalidBases = Invalid bases
|
mode.invalidBases = Invalid bases
|
||||||
@@ -210,6 +217,7 @@ error.nullComputedStyle-1 = Computed style is null: %S
|
|||||||
error.syntaxError = Syntax error
|
error.syntaxError = Syntax error
|
||||||
error.charsOutsideRange-1 = Character list outside the range %S
|
error.charsOutsideRange-1 = Character list outside the range %S
|
||||||
error.invalidCharRange = Invalid character range: %S
|
error.invalidCharRange = Invalid character range: %S
|
||||||
|
error.notWriteable-1 = Could not write to %S: %S
|
||||||
|
|
||||||
warn.notDefaultBranch-2 = You are running %S from a testing branch: %S. Please do not report errors which do not also occur in the default branch.
|
warn.notDefaultBranch-2 = You are running %S from a testing branch: %S. Please do not report errors which do not also occur in the default branch.
|
||||||
|
|
||||||
|
|||||||
@@ -1399,7 +1399,7 @@ var Commands = Module("commands", {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
dactyl.echo(":" + this.name + " ...");
|
dactyl.echo(":" + this.name + " ..."); // XXX
|
||||||
dactyl.echoerr(_("command.unknownCompleter", completer));
|
dactyl.echoerr(_("command.unknownCompleter", completer));
|
||||||
dactyl.log(e);
|
dactyl.log(e);
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ Components.utils.import("resource://dactyl/bootstrap.jsm");
|
|||||||
defineModule("config", {
|
defineModule("config", {
|
||||||
exports: ["ConfigBase", "Config", "config"],
|
exports: ["ConfigBase", "Config", "config"],
|
||||||
require: ["services", "storage", "util", "template"],
|
require: ["services", "storage", "util", "template"],
|
||||||
use: ["io", "prefs"]
|
use: ["io", "messages", "prefs"]
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
var ConfigBase = Class("ConfigBase", {
|
var ConfigBase = Class("ConfigBase", {
|
||||||
|
|||||||
@@ -202,8 +202,8 @@ var IO = Module("io", {
|
|||||||
this._scriptNames.push(file.path);
|
this._scriptNames.push(file.path);
|
||||||
|
|
||||||
dactyl.echomsg(_("io.sourcingEnd", filename.quote()), 2);
|
dactyl.echomsg(_("io.sourcingEnd", filename.quote()), 2);
|
||||||
|
dactyl.log(_("dactyl.sourced", filename), 3);
|
||||||
|
|
||||||
dactyl.log("Sourced: " + filename, 3);
|
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
@@ -622,7 +622,7 @@ var IO = Module("io", {
|
|||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
dactyl.echoerr(_("io.notWriteable"), file.path.quote());
|
dactyl.echoerr(_("io.notWriteable"), file.path.quote());
|
||||||
dactyl.log("Could not write to " + file.path + ": " + e.message); // XXX
|
dactyl.log(_("error.notWriteable", file.path, e.message)); // XXX
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
argCount: "*", // FIXME: should be "?" but kludged for proper error message
|
argCount: "*", // FIXME: should be "?" but kludged for proper error message
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ Components.utils.import("resource://dactyl/bootstrap.jsm");
|
|||||||
defineModule("util", {
|
defineModule("util", {
|
||||||
exports: ["frag", "FailedAssertion", "Math", "NS", "Point", "Util", "XBL", "XHTML", "XUL", "util"],
|
exports: ["frag", "FailedAssertion", "Math", "NS", "Point", "Util", "XBL", "XHTML", "XUL", "util"],
|
||||||
require: ["services"],
|
require: ["services"],
|
||||||
use: ["commands", "config", "highlight", "storage", "template"]
|
use: ["commands", "config", "highlight", "messages", "storage", "template"]
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
var XBL = Namespace("xbl", "http://www.mozilla.org/xbl");
|
var XBL = Namespace("xbl", "http://www.mozilla.org/xbl");
|
||||||
@@ -827,7 +827,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
|||||||
return xmlhttp;
|
return xmlhttp;
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
util.dactyl.log("Error opening " + String.quote(url) + ": " + e, 1);
|
util.dactyl.log(_("error.cantOpen", String.quote(url), e), 1);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -44,34 +44,35 @@ const Player = Module("player", {
|
|||||||
onMediacoreEvent: function (event) {
|
onMediacoreEvent: function (event) {
|
||||||
switch (event.type) {
|
switch (event.type) {
|
||||||
case Ci.sbIMediacoreEvent.BEFORE_TRACK_CHANGE:
|
case Ci.sbIMediacoreEvent.BEFORE_TRACK_CHANGE:
|
||||||
dactyl.log("Before track changed: " + event.data);
|
dactyl.log(_("player.preTrackChange", event.data));
|
||||||
autocommands.trigger("TrackChangePre", { track: event.data });
|
autocommands.trigger("TrackChangePre", { track: event.data });
|
||||||
break;
|
break;
|
||||||
case Ci.sbIMediacoreEvent.TRACK_CHANGE:
|
case Ci.sbIMediacoreEvent.TRACK_CHANGE:
|
||||||
|
dactyl.log(_("player.trackChanged", event.data));
|
||||||
autocommands.trigger("TrackChange", { track: event.data });
|
autocommands.trigger("TrackChange", { track: event.data });
|
||||||
break;
|
break;
|
||||||
case Ci.sbIMediacoreEvent.BEFORE_VIEW_CHANGE:
|
case Ci.sbIMediacoreEvent.BEFORE_VIEW_CHANGE:
|
||||||
dactyl.log("Before view changed: " + event.data);
|
dactyl.log(_("player.preViewChange", event.data));
|
||||||
autocommands.trigger("ViewChangePre", { view: event.data });
|
autocommands.trigger("ViewChangePre", { view: event.data });
|
||||||
break;
|
break;
|
||||||
case Ci.sbIMediacoreEvent.VIEW_CHANGE:
|
case Ci.sbIMediacoreEvent.VIEW_CHANGE:
|
||||||
dactyl.log("View changed: " + event.data);
|
dactyl.log(_("player.viewChange", event.data));
|
||||||
autocommands.trigger("ViewChange", { view: event.data });
|
autocommands.trigger("ViewChange", { view: event.data });
|
||||||
break;
|
break;
|
||||||
case Ci.sbIMediacoreEvent.STREAM_START:
|
case Ci.sbIMediacoreEvent.STREAM_START:
|
||||||
dactyl.log("Track started: " + gMM.sequencer.currentItem);
|
dactyl.log(_("player.trackStart", gMM.sequencer.currentItem));
|
||||||
autocommands.trigger("StreamStart", { track: gMM.sequencer.currentItem });
|
autocommands.trigger("StreamStart", { track: gMM.sequencer.currentItem });
|
||||||
break;
|
break;
|
||||||
case Ci.sbIMediacoreEvent.STREAM_PAUSE:
|
case Ci.sbIMediacoreEvent.STREAM_PAUSE:
|
||||||
dactyl.log("Track paused: " + gMM.sequencer.currentItem);
|
dactyl.log(_("player.trackPause", gMM.sequencer.currentItem));
|
||||||
autocommands.trigger("StreamPause", { track: gMM.sequencer.currentItem });
|
autocommands.trigger("StreamPause", { track: gMM.sequencer.currentItem });
|
||||||
break;
|
break;
|
||||||
case Ci.sbIMediacoreEvent.STREAM_END:
|
case Ci.sbIMediacoreEvent.STREAM_END:
|
||||||
dactyl.log("Track ended: " + gMM.sequencer.currentItem);
|
dactyl.log(_("player.trackEnd", gMM.sequencer.currentItem));
|
||||||
autocommands.trigger("StreamEnd", { track: gMM.sequencer.currentItem });
|
autocommands.trigger("StreamEnd", { track: gMM.sequencer.currentItem });
|
||||||
break;
|
break;
|
||||||
case Ci.sbIMediacoreEvent.STREAM_STOP:
|
case Ci.sbIMediacoreEvent.STREAM_STOP:
|
||||||
dactyl.log("Track stopped: " + gMM.sequencer.currentItem);
|
dactyl.log(_("player.trackStop", gMM.sequencer.currentItem));
|
||||||
autocommands.trigger("StreamStop", { track: gMM.sequencer.currentItem });
|
autocommands.trigger("StreamStop", { track: gMM.sequencer.currentItem });
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
10
melodactyl/locale/en-US/messages.properties
Normal file
10
melodactyl/locale/en-US/messages.properties
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
player.preTrackChange-1 = Before track changed: %S
|
||||||
|
player.postTrackChange-1 = Track changed: %S
|
||||||
|
player.preViewChange-1 = Before view changed: %S
|
||||||
|
player.postViewChange-1 = View changed: %S
|
||||||
|
player.trackStart-1 = Track started: %S
|
||||||
|
player.trackPause-1 = Track paused: %S
|
||||||
|
player.trackEnd-1 = Track ended: %S
|
||||||
|
player.trackStop-1 = Track stopped: %S
|
||||||
|
|
||||||
|
# vim:se ft=jproperties tw=0:
|
||||||
@@ -205,7 +205,7 @@ var Config = Module("config", ConfigBase, {
|
|||||||
let title = document.getElementById("sidebar-title");
|
let title = document.getElementById("sidebar-title");
|
||||||
|
|
||||||
dactyl.assert(args.length || title.value || args.bang && config.lastSidebar,
|
dactyl.assert(args.length || title.value || args.bang && config.lastSidebar,
|
||||||
"Argument required");
|
_("error.argumentRequired"));
|
||||||
|
|
||||||
if (!args.length)
|
if (!args.length)
|
||||||
return window.toggleSidebar(title.value ? null : config.lastSidebar);
|
return window.toggleSidebar(title.value ? null : config.lastSidebar);
|
||||||
@@ -227,7 +227,7 @@ var Config = Module("config", ConfigBase, {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
return dactyl.echoerr("No sidebar " + args[0] + " found");
|
return dactyl.echoerr(_("error.invalidArgument", args[0]));
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
argCount: "?",
|
argCount: "?",
|
||||||
|
|||||||
2
pentadactyl/locale/en-US/messages.properties
Normal file
2
pentadactyl/locale/en-US/messages.properties
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
# vim:se ft=jproperties tw=0:
|
||||||
@@ -63,9 +63,9 @@ const Addressbook = Module("addressbook", {
|
|||||||
|
|
||||||
if (addresses.length < 1) {
|
if (addresses.length < 1) {
|
||||||
if (!filter)
|
if (!filter)
|
||||||
dactyl.echoerr("Exxx: No contacts", commandline.FORCE_SINGLELINE);
|
dactyl.echoerr(_("addressbook.noContacts"), commandline.FORCE_SINGLELINE);
|
||||||
else
|
else
|
||||||
dactyl.echoerr("Exxx: No contacts matching string '" + filter + "'", commandline.FORCE_SINGLELINE);
|
dactyl.echoerr(_("addressbook.noMatchingContacts"), filter, commandline.FORCE_SINGLELINE);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,9 +100,9 @@ const Addressbook = Module("addressbook", {
|
|||||||
displayName = this.generateDisplayName(firstName, lastName);
|
displayName = this.generateDisplayName(firstName, lastName);
|
||||||
|
|
||||||
if (addressbook.add(mailAddr, firstName, lastName, displayName))
|
if (addressbook.add(mailAddr, firstName, lastName, displayName))
|
||||||
dactyl.echomsg("Added address: " + displayName + " <" + mailAddr + ">", 1, commandline.FORCE_SINGLELINE);
|
dactyl.echomsg(_("addressbook.added", displayName, mailAddr), 1, commandline.FORCE_SINGLELINE);
|
||||||
else
|
else
|
||||||
dactyl.echoerr("Exxx: Could not add contact `" + mailAddr + "'", commandline.FORCE_SINGLELINE);
|
dactyl.echoerr(_("addressbook.cantAdd", mailAddr), commandline.FORCE_SINGLELINE);
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -70,9 +70,9 @@ const Mail = Module("mail", {
|
|||||||
_moveOrCopy: function (copy, destinationFolder, operateOnThread) {
|
_moveOrCopy: function (copy, destinationFolder, operateOnThread) {
|
||||||
let folders = mail.getFolders(destinationFolder);
|
let folders = mail.getFolders(destinationFolder);
|
||||||
if (folders.length == 0)
|
if (folders.length == 0)
|
||||||
return void dactyl.echoerr("Exxx: No matching folder for " + destinationFolder);
|
return void dactyl.echoerr(_("addressbook.noMatchingFolder", destinationFolder));
|
||||||
else if (folders.length > 1)
|
else if (folders.length > 1)
|
||||||
return dactyl.echoerr("Exxx: More than one match for " + destinationFolder);
|
return dactyl.echoerr(_("addressbook.multipleFolderMatches", destinationFolder));
|
||||||
|
|
||||||
let count = gDBView.selection.count;
|
let count = gDBView.selection.count;
|
||||||
if (!count)
|
if (!count)
|
||||||
@@ -168,7 +168,7 @@ const Mail = Module("mail", {
|
|||||||
let url = args.attachments.pop();
|
let url = args.attachments.pop();
|
||||||
let file = io.getFile(url);
|
let file = io.getFile(url);
|
||||||
if (!file.exists())
|
if (!file.exists())
|
||||||
return void dactyl.echoerr("Exxx: Could not attach file `" + url + "'", commandline.FORCE_SINGLELINE);
|
return void dactyl.echoerr(_("mail.cantAttachFile", url), commandline.FORCE_SINGLELINE);
|
||||||
|
|
||||||
attachment = Cc["@mozilla.org/messengercompose/attachment;1"].createInstance(Ci.nsIMsgAttachment);
|
attachment = Cc["@mozilla.org/messengercompose/attachment;1"].createInstance(Ci.nsIMsgAttachment);
|
||||||
attachment.url = "file://" + file.path;
|
attachment.url = "file://" + file.path;
|
||||||
@@ -402,7 +402,7 @@ const Mail = Module("mail", {
|
|||||||
|
|
||||||
let folder = mail.getFolders(arg, true, true)[count];
|
let folder = mail.getFolders(arg, true, true)[count];
|
||||||
if (!folder)
|
if (!folder)
|
||||||
dactyl.echoerr("Exxx: Folder \"" + arg + "\" does not exist");
|
dactyl.echoerr(_("command.goto.folderNotExist", arg));
|
||||||
else if (dactyl.forceNewTab)
|
else if (dactyl.forceNewTab)
|
||||||
MsgOpenNewTabForFolder(folder.URI);
|
MsgOpenNewTabForFolder(folder.URI);
|
||||||
else
|
else
|
||||||
@@ -434,7 +434,7 @@ const Mail = Module("mail", {
|
|||||||
|
|
||||||
// TODO: is there a better way to check for validity?
|
// TODO: is there a better way to check for validity?
|
||||||
if (addresses.some(function (recipient) !(/\S@\S+\.\S/.test(recipient))))
|
if (addresses.some(function (recipient) !(/\S@\S+\.\S/.test(recipient))))
|
||||||
return void dactyl.echoerr("Exxx: Invalid e-mail address");
|
return void dactyl.echoerr(_("command.mail.invalidEmailAddress"));
|
||||||
|
|
||||||
mail.composeNewMail(mailargs);
|
mail.composeNewMail(mailargs);
|
||||||
},
|
},
|
||||||
|
|||||||
14
teledactyl/locale/en-US/messages.properties
Normal file
14
teledactyl/locale/en-US/messages.properties
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
addressbook.noContacts = No contacts
|
||||||
|
addressbook.noMatchingContacts-1 = No contacts matching '%S'
|
||||||
|
addressbook.added-2 = Added address: %S <%S>
|
||||||
|
addressbook.cantAdd-1 = Could not add contact '%S'
|
||||||
|
|
||||||
|
command.goto.folderNotExist-1 = Folder '%S' does not exist
|
||||||
|
command.mail.invalidEmailAddress = Invalid e-mail address
|
||||||
|
|
||||||
|
mail.noMatchingFolder-1 = No matching folder for %S
|
||||||
|
mail.multipleFolderMatches-1 = More than one match for %S
|
||||||
|
mail.cantAttachFile = Could not attach file '%S'
|
||||||
|
|
||||||
|
# vim:se ft=jproperties tw=0:
|
||||||
|
|
||||||
Reference in New Issue
Block a user