Monotone-Parent: c2a5e3fb9246462545f9ecf1c552400ae0d6a9e9

Monotone-Revision: b8ad0061e865a522c79c6a19bc8d7841469af81a

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-06-02T19:11:15
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2010-06-02 19:11:15 +00:00
parent d12f6ac78c
commit ba2b9aad81
17 changed files with 103 additions and 104 deletions

View File

@@ -225,7 +225,7 @@ function _onContactMenuAction(folderItem, action, refresh) {
for (var i = 0; i < contactIds.length; i++) {
if (contactIds[i].endsWith ("vlf")) {
alert (getLabel("Lists can't be moved or copied."));
alert (_("Lists can't be moved or copied."));
return false;
}
}
@@ -274,7 +274,7 @@ function actionContactCallback(http) {
var error = html.select("p").first().firstChild.nodeValue.trim();
log("actionContactCallback failed: error " + http.status + " (" + error + ")");
if (parseInt(http.status) == 403)
window.alert(getLabel("You don't have the required privileges to perform the operation."));
window.alert(_("You don't have the required privileges to perform the operation."));
else if (error)
window.alert(labels[error]);
refreshCurrentFolder();
@@ -396,7 +396,7 @@ function onToolbarEditSelectedContacts(event) {
var rows = contactsList.getSelectedRowsId();
if (rows.length == 0) {
window.alert(getLabel("Please select a contact."));
window.alert(_("Please select a contact."));
return false;
}
@@ -433,7 +433,7 @@ function onToolbarDeleteSelectedContacts(event) {
var rows = contactsList.getSelectedRowsId();
if (rows.length) {
var label = getLabel("Are you sure you want to delete the selected contacts?");
var label = _("Are you sure you want to delete the selected contacts?");
if (window.confirm(label)) {
for (var i = 0; i < rows.length; i++) {
delete cachedContacts[Contact.currentAddressBook + "/" + rows[i]];
@@ -446,7 +446,7 @@ function onToolbarDeleteSelectedContacts(event) {
}
}
else {
window.alert(getLabel("Please select a contact."));
window.alert(_("Please select a contact."));
}
return false;
@@ -526,7 +526,7 @@ function newContact(sender) {
function newList(sender) {
var li = $(Contact.currentAddressBook);
if (li.hasClassName("remote"))
alert(getLabel("You cannot create a list in a shared address book."));
alert(_("You cannot create a list in a shared address book."));
else
openContactWindow(URLForFolderID(Contact.currentAddressBook) + "/newlist");
@@ -619,7 +619,7 @@ function refreshContacts(cname) {
}
function onAddressBookNew(event) {
createFolder(window.prompt(getLabel("Name of the Address Book"), ""),
createFolder(window.prompt(_("Name of the Address Book"), ""),
appendAddressBook);
preventDefault(event);
}
@@ -735,11 +735,11 @@ function uploadCompleted(response) {
var div = $("uploadResults");
if (data.imported <= 0)
$("uploadResultsContent").update(getLabel("An error occured while importing contacts."));
$("uploadResultsContent").update(_("An error occured while importing contacts."));
else if (data.imported == 0)
$("uploadResultsContent").update(getLabel("No card was imported."));
$("uploadResultsContent").update(_("No card was imported."));
else {
$("uploadResultsContent").update(getLabel("A total of %{0} cards were imported in the addressbook.").formatted(data.imported));
$("uploadResultsContent").update(_("A total of %{0} cards were imported in the addressbook.").formatted(data.imported));
refreshCurrentFolder();
}
@@ -754,7 +754,7 @@ function onAddressBookRemove(event) {
var node = $(nodes[0]);
var owner = node.getAttribute("owner");
if (owner == "nobody") {
var label = getLabel("You cannot remove nor unsubscribe from a public addressbook.");
var label = _("You cannot remove nor unsubscribe from a public addressbook.");
window.alert(label);
}
else if (owner == UserLogin) {
@@ -774,12 +774,12 @@ function onAddressBookRemove(event) {
function deletePersonalAddressBook(folderId) {
if (folderId == "personal") {
var label = getLabel("You cannot remove nor unsubscribe from your personal addressbook.");
var label = _("You cannot remove nor unsubscribe from your personal addressbook.");
window.alert(label);
}
else {
var label
= getLabel("Are you sure you want to delete the selected address book?");
= _("Are you sure you want to delete the selected address book?");
if (window.confirm(label)) {
if (document.deletePersonalABAjaxRequest) {
document.deletePersonalABAjaxRequest.aborted = true;
@@ -960,7 +960,7 @@ function onAddressBookModify(event) {
if (UserLogin == selected.getAttribute("owner")) {
var currentName = selected.innerHTML;
var newName = window.prompt(getLabel("Address Book Name"),
var newName = window.prompt(_("Address Book Name"),
currentName);
if (newName && newName.length > 0
&& newName != currentName) {
@@ -970,7 +970,7 @@ function onAddressBookModify(event) {
{node: selected, name: newName});
}
} else
window.alert(getLabel("Unable to rename that folder!"));
window.alert(_("Unable to rename that folder!"));
}
function folderRenameCallback(http) {
@@ -1306,7 +1306,7 @@ function dropSelectedContacts (action, toId) {
var contactIds = $('contactsList').getSelectedRowsId();
for (var i = 0; i < contactIds.length; i++) {
if (contactIds[i].endsWith ("vlf")) {
alert (getLabel("Lists can't be moved or copied."));
alert (_("Lists can't be moved or copied."));
return false;
}
}