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

Move some more message strings to the properties file.

This commit is contained in:
Doug Kearns
2011-03-13 03:10:59 +11:00
parent 55267dddff
commit 27de24f852
14 changed files with 64 additions and 29 deletions

View File

@@ -539,7 +539,7 @@ var Events = Module("events", {
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));
}
this._recording = macro || null;

View File

@@ -53,14 +53,14 @@ var Marks = Module("marks", {
if (Marks.isURLMark(mark)) {
let res = this._urlMarks.set(mark, { location: doc.documentURI, position: position, tab: Cu.getWeakReference(tabs.getTab()), timestamp: Date.now()*1000 });
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)) {
let marks = this._localMarks.get(doc.documentURI, {});
marks[mark] = { location: doc.documentURI, position: position, timestamp: Date.now()*1000 };
this._localMarks.changed();
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);
let doc = tab.linkedBrowser.contentDocument;
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);
}
else {
@@ -146,7 +146,7 @@ var Marks = Module("marks", {
let mark = (this._localMarks.get(this.localURI) || {})[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);
}
else

View File

@@ -81,6 +81,7 @@ dactyl.modulesLoaded = All modules loaded
dactyl.commandlineOpts-1 = Command-line options: %S
dactyl.noRCFile = No user RC file found
dactyl.initialized-1 = %S fully initialized
dactyl.sourced-1 = Sourced: %S
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.recorded-1 = Recorded macro '%S'
macro.recorded-2 = Recorded macro %S: %S
macro.loadFailed-1 = Page did not load completely in %S seconds
macro.loadWaiting = Waiting for page to load...
macro.noSuch-1 = Macro '%S' not set
@@ -150,6 +152,11 @@ mark.none = No marks set
mark.invalid = Invalid mark
mark.unset-1 = Mark not set: %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.invalidBases = Invalid bases
@@ -210,6 +217,7 @@ 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.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.

View File

@@ -1399,7 +1399,7 @@ var Commands = Module("commands", {
});
}
catch (e) {
dactyl.echo(":" + this.name + " ...");
dactyl.echo(":" + this.name + " ..."); // XXX
dactyl.echoerr(_("command.unknownCompleter", completer));
dactyl.log(e);
return undefined;

View File

@@ -13,7 +13,7 @@ Components.utils.import("resource://dactyl/bootstrap.jsm");
defineModule("config", {
exports: ["ConfigBase", "Config", "config"],
require: ["services", "storage", "util", "template"],
use: ["io", "prefs"]
use: ["io", "messages", "prefs"]
}, this);
var ConfigBase = Class("ConfigBase", {

View File

@@ -202,8 +202,8 @@ var IO = Module("io", {
this._scriptNames.push(file.path);
dactyl.echomsg(_("io.sourcingEnd", filename.quote()), 2);
dactyl.log(_("dactyl.sourced", filename), 3);
dactyl.log("Sourced: " + filename, 3);
return context;
}
catch (e) {
@@ -622,7 +622,7 @@ var IO = Module("io", {
}
catch (e) {
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

View File

@@ -13,7 +13,7 @@ Components.utils.import("resource://dactyl/bootstrap.jsm");
defineModule("util", {
exports: ["frag", "FailedAssertion", "Math", "NS", "Point", "Util", "XBL", "XHTML", "XUL", "util"],
require: ["services"],
use: ["commands", "config", "highlight", "storage", "template"]
use: ["commands", "config", "highlight", "messages", "storage", "template"]
}, this);
var XBL = Namespace("xbl", "http://www.mozilla.org/xbl");
@@ -827,7 +827,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
return xmlhttp;
}
catch (e) {
util.dactyl.log("Error opening " + String.quote(url) + ": " + e, 1);
util.dactyl.log(_("error.cantOpen", String.quote(url), e), 1);
return null;
}
},