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);
}
},
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 {
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(_("mark.jumpingToLocal", Marks.markToString(char, mark)), 5);
buffer.scrollToPercent(mark.position.x * 100, mark.position.y * 100);
}
else
"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);
completion.mark = function mark(context) {
function percent(i) Math.round(i * 100);
- // FIXME: Line/Column doesn't make sense with %
context.title = ["Mark", "HPos VPos File"];
context.keys.description = function ([, m]) percent(m.position.x) + "% " + percent(m.position.y) + "% " + m.location;
context.completions = marks.all;