X-Git-Url: https://git.donarmstrong.com/dactyl.git?a=blobdiff_plain;f=common%2Fcontent%2Fmarks.js;h=8e5632838a6270d2fbb675090b6e2c186f454424;hb=70740024f9c028c1fd63e1a1850ab062ff956054;hp=aedbfc06b88737379737083f47ec5fe11900f5c6;hpb=718c614c183350706466e22939d0101ca4c87efe;p=dactyl.git diff --git a/common/content/marks.js b/common/content/marks.js index aedbfc0..8e56328 100644 --- a/common/content/marks.js +++ b/common/content/marks.js @@ -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(_("mark.jumpingToLocal", Marks.markToString(char, mark)), 5); buffer.scrollToPercent(mark.position.x * 100, mark.position.y * 100); } else @@ -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); @@ -270,7 +270,6 @@ var Marks = Module("marks", { 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;