mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-23 16:35:46 +01:00
Move some more message strings to the properties file.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
},
|
||||
{
|
||||
|
||||
@@ -70,9 +70,9 @@ const Mail = Module("mail", {
|
||||
_moveOrCopy: function (copy, destinationFolder, operateOnThread) {
|
||||
let folders = mail.getFolders(destinationFolder);
|
||||
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)
|
||||
return dactyl.echoerr("Exxx: More than one match for " + destinationFolder);
|
||||
return dactyl.echoerr(_("addressbook.multipleFolderMatches", destinationFolder));
|
||||
|
||||
let count = gDBView.selection.count;
|
||||
if (!count)
|
||||
@@ -168,7 +168,7 @@ const Mail = Module("mail", {
|
||||
let url = args.attachments.pop();
|
||||
let file = io.getFile(url);
|
||||
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.url = "file://" + file.path;
|
||||
@@ -402,7 +402,7 @@ const Mail = Module("mail", {
|
||||
|
||||
let folder = mail.getFolders(arg, true, true)[count];
|
||||
if (!folder)
|
||||
dactyl.echoerr("Exxx: Folder \"" + arg + "\" does not exist");
|
||||
dactyl.echoerr(_("command.goto.folderNotExist", arg));
|
||||
else if (dactyl.forceNewTab)
|
||||
MsgOpenNewTabForFolder(folder.URI);
|
||||
else
|
||||
@@ -434,7 +434,7 @@ const Mail = Module("mail", {
|
||||
|
||||
// TODO: is there a better way to check for validity?
|
||||
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);
|
||||
},
|
||||
|
||||
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