X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=teledactyl%2Fcontent%2Faddressbook.js;h=cd9fe12a91ef0da17b206fc5d752d5268f8126d9;hb=8b6fcae7eaa413bc62d645d2d0c99835c47265e6;hp=2a7dd1e5b9cdfa00279362834f7a931849cb0d4e;hpb=eeed0be1a8abf7e3c97f43b63c1d595e940fef21;p=dactyl.git diff --git a/teledactyl/content/addressbook.js b/teledactyl/content/addressbook.js index 2a7dd1e..cd9fe12 100644 --- a/teledactyl/content/addressbook.js +++ b/teledactyl/content/addressbook.js @@ -4,7 +4,7 @@ // given in the LICENSE.txt file included with this file. "use strict"; -const Addressbook = Module("addressbook", { +var Addressbook = Module("addressbook", { init: function () { }, @@ -63,9 +63,9 @@ const Addressbook = Module("addressbook", { if (addresses.length < 1) { if (!filter) - dactyl.echoerr("Exxx: No contacts", commandline.FORCE_SINGLELINE); + dactyl.echoerr(_("addressbook.noContacts"), commandline.FORCE_SINGLELINE); else - dactyl.echoerr("Exxx: No contacts matching string '" + filter + "'", commandline.FORCE_SINGLELINE); + dactyl.echoerr(_("addressbook.noMatchingContacts"), filter, commandline.FORCE_SINGLELINE); return false; } @@ -88,7 +88,7 @@ const Addressbook = Module("addressbook", { } }, { }, { - commands: function () { + commands: function initCommands() { commands.add(["con[tact]"], "Add an address book entry", function (args) { @@ -100,9 +100,9 @@ const Addressbook = Module("addressbook", { displayName = this.generateDisplayName(firstName, lastName); 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 - dactyl.echoerr("Exxx: Could not add contact `" + mailAddr + "'", commandline.FORCE_SINGLELINE); + dactyl.echoerr(_("addressbook.cantAdd", mailAddr), commandline.FORCE_SINGLELINE); }, { @@ -117,7 +117,7 @@ const Addressbook = Module("addressbook", { function (args) { addressbook.list(args.string, args.bang); }, { bang: true }); }, - mappings: function () { + mappings: function initMappings() { var myModes = config.mailModes; mappings.add(myModes, ["a"],