Monotone-Parent: c2a5e3fb9246462545f9ecf1c552400ae0d6a9e9
Monotone-Revision: b8ad0061e865a522c79c6a19bc8d7841469af81a Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-06-02T19:11:15 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
d12f6ac78c
commit
ba2b9aad81
|
@ -1,5 +1,8 @@
|
|||
2010-06-02 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/WebServerResources/*.js: replaced all remaining calls to
|
||||
"getLabel" with calls to "_".
|
||||
|
||||
* Tests/Integration/test-davacl.py (DAVPublicAccessTest): new test
|
||||
class that implements tests strictly related to accessing the
|
||||
"/public" prefix.
|
||||
|
|
|
@ -88,7 +88,7 @@ function addUserLineToTree(tree, parent, line) {
|
|||
'', '',
|
||||
ResourcesURL + '/abcard.png',
|
||||
ResourcesURL + '/abcard.png');
|
||||
tree.add(parent + 1, parent, getLabel("Please wait..."), 0, '#', null,
|
||||
tree.add(parent + 1, parent, _("Please wait..."), 0, '#', null,
|
||||
null, '', '', icon, icon);
|
||||
}
|
||||
|
||||
|
@ -170,7 +170,7 @@ function addFolderBranchToTree(tree, user, folder, nodeId, subId, isLast) {
|
|||
|
||||
function addFolderNotFoundNode (tree, nodeId) {
|
||||
var icon = ResourcesURL + '/icon_unread.gif';
|
||||
var node = new Node(1, nodeId, getLabel("No possible subscription"), 0, '#',
|
||||
var node = new Node(1, nodeId, _("No possible subscription"), 0, '#',
|
||||
null, null, '', '', icon, icon);
|
||||
node._ls = true;
|
||||
return tree.node(node, (nodeId + 1), null);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -198,7 +198,7 @@ function openMessageWindowsForSelection(action, firstOnly) {
|
|||
break;
|
||||
}
|
||||
} else {
|
||||
window.alert(getLabel("Please select a message."));
|
||||
window.alert(_("Please select a message."));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -383,7 +383,7 @@ function deleteSelectedMessages(sender) {
|
|||
{ "Content-type": "application/x-www-form-urlencoded" });
|
||||
}
|
||||
else
|
||||
window.alert(getLabel("Please select a message."));
|
||||
window.alert(_("Please select a message."));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -459,10 +459,10 @@ function deleteMessageWithDelay(url, id, mailbox, messageId) {
|
|||
function onPrintCurrentMessage(event) {
|
||||
var rowIds = $("messageList").getSelectedRowsId();
|
||||
if (rowIds.length == 0) {
|
||||
window.alert(getLabel("Please select a message to print."));
|
||||
window.alert(_("Please select a message to print."));
|
||||
}
|
||||
else if (rowIds.length > 1) {
|
||||
window.alert(getLabel("Please select only one message to print."));
|
||||
window.alert(_("Please select only one message to print."));
|
||||
}
|
||||
else
|
||||
window.print();
|
||||
|
@ -512,7 +512,7 @@ function toggleAddressColumn(search, replace) {
|
|||
var header = $(search + "Header");
|
||||
if (header) {
|
||||
header.id = replace + "Header";
|
||||
header.update(getLabel(replace.capitalize()));
|
||||
header.update(_(replace.capitalize()));
|
||||
var i = UserDefaults["SOGoMailListViewColumnsOrder"].indexOf(search.capitalize());
|
||||
if (i >= 0)
|
||||
UserDefaults["SOGoMailListViewColumnsOrder"][i] = replace.capitalize();
|
||||
|
@ -775,9 +775,9 @@ function updateMessageListCounter(count, isDelta) {
|
|||
}
|
||||
|
||||
if (count > 0)
|
||||
cell.update(count + " " + getLabel("messages"));
|
||||
cell.update(count + " " + _("messages"));
|
||||
else
|
||||
cell.update(getLabel("No message"));
|
||||
cell.update(_("No message"));
|
||||
}
|
||||
|
||||
function onMessageListRender(event) {
|
||||
|
@ -1196,12 +1196,12 @@ function ICalendarButtonCallback(http) {
|
|||
for (var i = 0; i < Mailer.popups.length; i++) {
|
||||
if (Mailer.popups[i].messageUID == oldMsg) {
|
||||
// Show the alert in the proper popup window
|
||||
Mailer.popups[i].alert(getLabel(msg));
|
||||
Mailer.popups[i].alert(_(msg));
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == Mailer.popups.length)
|
||||
window.alert(getLabel(msg));
|
||||
window.alert(_(msg));
|
||||
}
|
||||
else
|
||||
window.alert("received code: " + http.status + "\nerror: " + http.responseText);
|
||||
|
@ -1333,7 +1333,7 @@ function messageCallback(http) {
|
|||
}
|
||||
}
|
||||
else if (http.status == 404) {
|
||||
alert (getLabel("The message you have selected doesn't exist anymore."));
|
||||
alert (_("The message you have selected doesn't exist anymore."));
|
||||
window.location.reload();
|
||||
}
|
||||
else
|
||||
|
@ -1747,7 +1747,7 @@ function updateMailboxTreeInPage() {
|
|||
/ Mailer.quotas.maxQuota)
|
||||
/ 100);
|
||||
var level = (percents > 85)? "alert" : (percents > 70)? "warn" : "ok";
|
||||
var format = getLabel("quotasFormat");
|
||||
var format = _("quotasFormat");
|
||||
var text = format.formatted(percents,
|
||||
Math.round(Mailer.quotas.maxQuota/10.24)/100);
|
||||
quotaDiv = new Element('div', { 'id': 'quotaIndicator',
|
||||
|
@ -1814,7 +1814,7 @@ function generateMenuForMailbox(mailbox, prefix, callback) {
|
|||
if (mailbox.type != "account") {
|
||||
var newNode = document.createElement("li");
|
||||
newNode.mailbox = mailbox;
|
||||
newNode.appendChild(document.createTextNode(getLabel("This Folder")));
|
||||
newNode.appendChild(document.createTextNode(_("This Folder")));
|
||||
menu.appendChild(newNode);
|
||||
menu.appendChild(document.createElement("li"));
|
||||
callbacks.push(callback);
|
||||
|
@ -2009,7 +2009,7 @@ function saveFoldersStateCallback(http) {
|
|||
}
|
||||
|
||||
function onMenuCreateFolder(event) {
|
||||
var name = window.prompt(getLabel("Name :"), "");
|
||||
var name = window.prompt(_("Name :"), "");
|
||||
if (name && name.length > 0) {
|
||||
var folderID = document.menuTarget.getAttribute("dataname");
|
||||
var urlstr = URLForFolderID(folderID) + "/createFolder?name=" + encodeURIComponent(name);
|
||||
|
@ -2020,7 +2020,7 @@ function onMenuCreateFolder(event) {
|
|||
}
|
||||
|
||||
function onMenuRenameFolder(event) {
|
||||
var name = window.prompt(getLabel("Enter the new name of your folder :"),
|
||||
var name = window.prompt(_("Enter the new name of your folder :"),
|
||||
"");
|
||||
if (name && name.length > 0) {
|
||||
var folderID = document.menuTarget.getAttribute("dataname");
|
||||
|
@ -2032,11 +2032,11 @@ function onMenuRenameFolder(event) {
|
|||
}
|
||||
|
||||
function onMenuDeleteFolder(event) {
|
||||
var answer = window.confirm(getLabel("Do you really want to move this folder into the trash ?"));
|
||||
var answer = window.confirm(_("Do you really want to move this folder into the trash ?"));
|
||||
if (answer) {
|
||||
var folderID = document.menuTarget.getAttribute("dataname");
|
||||
var urlstr = URLForFolderID(folderID) + "/delete";
|
||||
var errorLabel = getLabel("The folder could not be deleted.");
|
||||
var errorLabel = _("The folder could not be deleted.");
|
||||
triggerAjaxRequest(urlstr, folderOperationCallback, errorLabel);
|
||||
}
|
||||
}
|
||||
|
@ -2050,7 +2050,7 @@ function onMenuExpungeFolder(event) {
|
|||
function onMenuEmptyTrash(event) {
|
||||
var folderID = document.menuTarget.getAttribute("dataname");
|
||||
var urlstr = URLForFolderID(folderID) + "/emptyTrash";
|
||||
var errorLabel = getLabel("The trash could not be emptied.");
|
||||
var errorLabel = _("The trash could not be emptied.");
|
||||
triggerAjaxRequest(urlstr, folderOperationCallback, errorLabel);
|
||||
|
||||
if (folderID == Mailer.currentMailbox) {
|
||||
|
@ -2067,11 +2067,11 @@ function onMenuEmptyTrash(event) {
|
|||
function _onMenuChangeToXXXFolder(event, folder) {
|
||||
var type = document.menuTarget.getAttribute("datatype");
|
||||
if (type == "additional")
|
||||
window.alert(getLabel("You need to choose a non-virtual folder!"));
|
||||
window.alert(_("You need to choose a non-virtual folder!"));
|
||||
else {
|
||||
var folderID = document.menuTarget.getAttribute("dataname");
|
||||
var urlstr = URLForFolderID(folderID) + "/setAs" + folder + "Folder";
|
||||
var errorLabel = getLabel("The folder functionality could not be changed.");
|
||||
var errorLabel = _("The folder functionality could not be changed.");
|
||||
triggerAjaxRequest(urlstr, folderOperationCallback, errorLabel);
|
||||
}
|
||||
}
|
||||
|
@ -2199,7 +2199,7 @@ function folderRefreshCallback(http) {
|
|||
row.show();
|
||||
}
|
||||
}
|
||||
window.alert(getLabel("Operation failed"));
|
||||
window.alert(_("Operation failed"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2280,7 +2280,7 @@ function saveAs(event) {
|
|||
window.location.href = (url+"?id="+uids+"&uid="+uids+"&mailbox="+Mailer.currentMailbox+"&path="+paths);
|
||||
}
|
||||
else
|
||||
window.alert(getLabel("Please select a message."));
|
||||
window.alert(_("Please select a message."));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -7,10 +7,10 @@ var MailerUIdTreeExtension = {
|
|||
sent: "tbtv_sent_17x17.png",
|
||||
draft: "tbtv_drafts_17x17.png",
|
||||
trash: "tbtv_trash_17x17.png" },
|
||||
folderNames: { inbox: getLabel("InboxFolderName"),
|
||||
sent: getLabel("SentFolderName"),
|
||||
draft: getLabel("DraftsFolderName"),
|
||||
trash: getLabel("TrashFolderName") },
|
||||
folderNames: { inbox: _("InboxFolderName"),
|
||||
sent: _("SentFolderName"),
|
||||
draft: _("DraftsFolderName"),
|
||||
trash: _("TrashFolderName") },
|
||||
_addFolderNode: function (parent, name, fullName, type, unseen) {
|
||||
var icon = this.folderIcons[type];
|
||||
if (icon)
|
||||
|
|
|
@ -161,7 +161,7 @@ function editEvent() {
|
|||
var nodes = listOfSelection.getSelectedRows();
|
||||
|
||||
if (nodes.length == 0) {
|
||||
window.alert(getLabel("Please select an event or a task."));
|
||||
window.alert(_("Please select an event or a task."));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -175,7 +175,7 @@ function editEvent() {
|
|||
_editEventId(selectedCalendarCell[0].cname,
|
||||
selectedCalendarCell[0].calendar);
|
||||
} else {
|
||||
window.alert(getLabel("Please select an event or a task."));
|
||||
window.alert(_("Please select an event or a task."));
|
||||
}
|
||||
|
||||
return false; /* stop following the link */
|
||||
|
@ -199,13 +199,13 @@ function deleteEvent() {
|
|||
if (nodes.length > 0) {
|
||||
var label = "";
|
||||
if (!nodes[0].erasable) {
|
||||
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."));
|
||||
return false;
|
||||
}
|
||||
if (listOfSelection == $("tasksList"))
|
||||
label = getLabel("taskDeleteConfirmation");
|
||||
label = _("taskDeleteConfirmation");
|
||||
else
|
||||
label = getLabel("eventDeleteConfirmation");
|
||||
label = _("eventDeleteConfirmation");
|
||||
|
||||
if (nodes.length == 1
|
||||
&& nodes[0].recurrenceTime) {
|
||||
|
@ -235,19 +235,19 @@ function deleteEvent() {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
window.alert(getLabel("Please select an event or a task."));
|
||||
window.alert(_("Please select an event or a task."));
|
||||
}
|
||||
}
|
||||
else if (selectedCalendarCell) {
|
||||
if (!selectedCalendarCell[0].erasable) {
|
||||
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."));
|
||||
return false;
|
||||
}
|
||||
if (selectedCalendarCell[0].recurrenceTime) {
|
||||
_editRecurrenceDialog(selectedCalendarCell[0], "confirmDeletion");
|
||||
}
|
||||
else {
|
||||
var label = getLabel("eventDeleteConfirmation");
|
||||
var label = _("eventDeleteConfirmation");
|
||||
if (confirm(label)) {
|
||||
if (document.deleteEventAjaxRequest) {
|
||||
document.deleteEventAjaxRequest.aborted = true;
|
||||
|
@ -260,7 +260,7 @@ function deleteEvent() {
|
|||
}
|
||||
}
|
||||
else
|
||||
window.alert(getLabel("Please select an event or a task."));
|
||||
window.alert(_("Please select an event or a task."));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -290,12 +290,12 @@ function closeInvitationWindow() {
|
|||
closePseudoWin.style.top = "0px;";
|
||||
closePseudoWin.style.left = "0px;";
|
||||
closePseudoWin.style.right = "0px;";
|
||||
closePseudoWin.appendChild(document.createTextNode(getLabel("closeThisWindowMessage")));
|
||||
closePseudoWin.appendChild(document.createTextNode(_("closeThisWindowMessage")));
|
||||
|
||||
var calLink = document.createElement("a");
|
||||
closePseudoWin.appendChild(calLink);
|
||||
calLink.href = ApplicationBaseURL;
|
||||
calLink.appendChild(document.createTextNode(getLabel("Calendar").toLowerCase()));
|
||||
calLink.appendChild(document.createTextNode(_("Calendar").toLowerCase()));
|
||||
}
|
||||
|
||||
function modifyEventCallback(http) {
|
||||
|
@ -318,10 +318,10 @@ function modifyEventCallback(http) {
|
|||
} else {
|
||||
msg = "delegate is a participant";
|
||||
}
|
||||
window.alert(getLabel(msg));
|
||||
window.alert(_(msg));
|
||||
}
|
||||
else {
|
||||
window.alert(getLabel("eventPartStatModificationError"));
|
||||
window.alert(_("eventPartStatModificationError"));
|
||||
}
|
||||
document.modifyEventAjaxRequest = null;
|
||||
}
|
||||
|
@ -475,7 +475,7 @@ function deleteEventCallback(http) {
|
|||
document.deleteEventAjaxRequest = null;
|
||||
}
|
||||
else 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
|
||||
log ("deleteEventCallback Ajax error (" + http.status + ")");
|
||||
}
|
||||
|
@ -1424,7 +1424,7 @@ function newEventDIV(eventRep, event) {
|
|||
var textDiv = inside.childNodesWithTag("div")[1];
|
||||
textDiv.appendChild(createElement("br"));
|
||||
var span = createElement("span", null, "location");
|
||||
var text = getLabel("Location:") + " " + event[6];
|
||||
var text = _("Location:") + " " + event[6];
|
||||
span.appendChild(document.createTextNode(text));
|
||||
textDiv.appendChild(span);
|
||||
}
|
||||
|
@ -2089,9 +2089,9 @@ function onCalendarsMenuPrepareVisibility() {
|
|||
var deleteCalendarOption = $("deleteCalendarMenuItem");
|
||||
// Swith between Delete and Unsubscribe
|
||||
if (folderOwner == UserLogin)
|
||||
deleteCalendarOption.update(getLabel("Delete Calendar"));
|
||||
deleteCalendarOption.update(_("Delete Calendar"));
|
||||
else
|
||||
deleteCalendarOption.update(getLabel("Unsubscribe Calendar"));
|
||||
deleteCalendarOption.update(_("Unsubscribe Calendar"));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -2273,7 +2273,7 @@ function updateCalendarProperties(calendarID, calendarName, calendarColor) {
|
|||
}
|
||||
|
||||
function onCalendarNew(event) {
|
||||
createFolder(window.prompt(getLabel("Name of the Calendar"), ""),
|
||||
createFolder(window.prompt(_("Name of the Calendar"), ""),
|
||||
appendCalendar);
|
||||
preventDefault(event);
|
||||
}
|
||||
|
@ -2284,7 +2284,7 @@ function onCalendarAdd(event) {
|
|||
}
|
||||
|
||||
function onCalendarWebAdd(event) {
|
||||
var calendarUrl = window.prompt(getLabel("URL of the Calendar"), "");
|
||||
var calendarUrl = window.prompt(_("URL of the Calendar"), "");
|
||||
if (calendarUrl) {
|
||||
if (document.addWebCalendarRequest) {
|
||||
document.addWebCalendarRequest.aborted = true;
|
||||
|
@ -2304,7 +2304,7 @@ function addWebCalendarCallback (http) {
|
|||
changeCalendarDisplay();
|
||||
}
|
||||
else {
|
||||
alert (getLabel("An error occured while importing calendar."));
|
||||
alert (_("An error occured while importing calendar."));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2358,11 +2358,11 @@ function uploadCompleted(response) {
|
|||
|
||||
var div = $("uploadResults");
|
||||
if (data.imported < 0)
|
||||
$("uploadResultsContent").update(getLabel("An error occured while importing calendar."));
|
||||
$("uploadResultsContent").update(_("An error occured while importing calendar."));
|
||||
else if (data.imported == 0)
|
||||
$("uploadResultsContent").update(getLabel("No event was imported."));
|
||||
$("uploadResultsContent").update(_("No event was imported."));
|
||||
else {
|
||||
$("uploadResultsContent").update(getLabel("A total of %{0} events were imported in the calendar.").formatted(data.imported));
|
||||
$("uploadResultsContent").update(_("A total of %{0} events were imported in the calendar.").formatted(data.imported));
|
||||
refreshEventsAndDisplay();
|
||||
}
|
||||
|
||||
|
@ -2394,7 +2394,7 @@ function appendCalendar(folderName, folderPath) {
|
|||
//log ("append name: " + folderName + "; path: " + folderPath + "; owner: " + owner);
|
||||
|
||||
if ($(folderPath))
|
||||
window.alert(getLabel("You have already subscribed to that folder!"));
|
||||
window.alert(_("You have already subscribed to that folder!"));
|
||||
else {
|
||||
var calendarList = $("calendarList");
|
||||
var items = calendarList.select("li");
|
||||
|
|
|
@ -991,7 +991,7 @@ SOGoEventDragController.prototype = {
|
|||
this._determineEventType(dayNode);
|
||||
this._prepareEventType();
|
||||
this.ghostController = new SOGoEventDragGhostController();
|
||||
this.ghostController.setTitle(getLabel("New Event"));
|
||||
this.ghostController.setTitle(_("New Event"));
|
||||
|
||||
this.onDragStartBound = this.onDragStart.bindAsEventListener(this);
|
||||
dayNode.observe("mousedown", this.onDragStartBound, false);
|
||||
|
|
|
@ -74,7 +74,7 @@ function nodeForUser(userName, userId) {
|
|||
var cb = document.createElement("input");
|
||||
cb.type = "checkbox";
|
||||
label.appendChild(cb);
|
||||
label.appendChild(document.createTextNode(getLabel("Subscribe User")));
|
||||
label.appendChild(document.createTextNode(_("Subscribe User")));
|
||||
node.appendChild(label);
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ function subscribeToFolder(refreshCallback, refreshCallbackData) {
|
|||
refreshCallbackData["folder"]);
|
||||
}
|
||||
else
|
||||
refreshCallbackData["window"].alert(getLabel("You cannot subscribe to a folder that you own!"));
|
||||
refreshCallbackData["window"].alert(_("You cannot subscribe to a folder that you own!"));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -1296,7 +1296,7 @@ function onEditorOkClick(event) {
|
|||
onRequestComplete: function eCH_l_onRequestComplete(handlers, code) {
|
||||
var label = ("A time conflict exists with one or more attendees.\n"
|
||||
+ "Would you like to keep the current settings anyway?");
|
||||
if (code || window.confirm(getLabel(label))) {
|
||||
if (code || window.confirm(_(label))) {
|
||||
_confirmEditorOkClick();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,25 +32,25 @@ function onOKClick(event) {
|
|||
if (tag
|
||||
&& $("synchronizeCalendar").checked) {
|
||||
if (tag.value.blank()) {
|
||||
alert(getLabel("tagNotDefined"));
|
||||
alert(_("tagNotDefined"));
|
||||
save = false;
|
||||
}
|
||||
else if (allTags
|
||||
&& allTags.indexOf(tag.value) > -1) {
|
||||
alert(getLabel("tagAlreadyExists"));
|
||||
alert(_("tagAlreadyExists"));
|
||||
save = false;
|
||||
}
|
||||
else if (originalTag
|
||||
&& !originalTag.value.blank()) {
|
||||
if (tag.value != originalTag.value)
|
||||
save = confirm(getLabel("tagHasChanged"));
|
||||
save = confirm(_("tagHasChanged"));
|
||||
}
|
||||
else
|
||||
save = confirm(getLabel("tagWasAdded"));
|
||||
save = confirm(_("tagWasAdded"));
|
||||
}
|
||||
else if (originalTag
|
||||
&& !originalTag.value.blank())
|
||||
save = confirm(getLabel("tagWasRemoved"));
|
||||
save = confirm(_("tagWasRemoved"));
|
||||
|
||||
if (save) {
|
||||
window.opener.updateCalendarProperties(calendarID.value,
|
||||
|
|
|
@ -39,7 +39,7 @@ function onPopupAttachWindow(event) {
|
|||
preventDefault(event);
|
||||
|
||||
var attachInput = $("attach");
|
||||
var newAttach = window.prompt(getLabel("Target:"), attachInput.value || "http://");
|
||||
var newAttach = window.prompt(_("Target:"), attachInput.value || "http://");
|
||||
if (newAttach != null) {
|
||||
var documentHref = $("documentHref");
|
||||
var documentLabel = $("documentLabel");
|
||||
|
|
|
@ -86,14 +86,14 @@ function validateContactEditor() {
|
|||
var e = $('workMail');
|
||||
if (e.value.length > 0
|
||||
&& !uixEmailRegex.test(e.value)) {
|
||||
alert(getLabel ("invalidemailwarn"));
|
||||
alert(_("invalidemailwarn"));
|
||||
rc = false;
|
||||
}
|
||||
|
||||
e = $('homeMail');
|
||||
if (e.value.length > 0
|
||||
&& !uixEmailRegex.test(e.value)) {
|
||||
alert(getLabel ("invalidemailwarn"));
|
||||
alert(_("invalidemailwarn"));
|
||||
rc = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ function addUserLineToTree(tree, parent, line) {
|
|||
ResourcesURL + '/abcard.png',
|
||||
ResourcesURL + '/abcard.png');
|
||||
if (window.opener.userFolderType != "user") {
|
||||
tree.add(parent + 1, parent, getLabel("Please wait..."), 0, '#', null,
|
||||
tree.add(parent + 1, parent, _("Please wait..."), 0, '#', null,
|
||||
null, '', '', icon, icon);
|
||||
}
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ function addFolderBranchToTree(tree, user, folder, nodeId, subId, isLast) {
|
|||
|
||||
function addFolderNotFoundNode (tree, nodeId) {
|
||||
var icon = ResourcesURL + '/icon_unread.gif';
|
||||
var node = new Node(1, nodeId, getLabel("No possible subscription"), 0, '#',
|
||||
var node = new Node(1, nodeId, _("No possible subscription"), 0, '#',
|
||||
null, null, '', '', icon, icon);
|
||||
node._ls = true;
|
||||
return tree.node(node, (nodeId + 1));
|
||||
|
@ -219,7 +219,7 @@ function onConfirmFolderSelection(event) {
|
|||
|
||||
var data = { folderName: folderName, folder: folder, window: window };
|
||||
if (parent$(accessToSubscribedFolder(folder)))
|
||||
window.alert(getLabel("You have already subscribed to that folder!"));
|
||||
window.alert(_("You have already subscribed to that folder!"));
|
||||
else
|
||||
window.opener.subscribeToFolder(window.opener.userFolderCallback, data);
|
||||
this.blur(); // required by IE
|
||||
|
|
|
@ -112,13 +112,13 @@ function validateEditorInput(sender) {
|
|||
|
||||
field = document.pageform.subject;
|
||||
if (field.value == "")
|
||||
errortext = errortext + getLabel("error_missingsubject") + "\n";
|
||||
errortext = errortext + _("error_missingsubject") + "\n";
|
||||
|
||||
if (!hasRecipients())
|
||||
errortext = errortext + getLabel("error_missingrecipients") + "\n";
|
||||
errortext = errortext + _("error_missingrecipients") + "\n";
|
||||
|
||||
if (errortext.length > 0) {
|
||||
alert(getLabel("error_validationfailed") + ":\n" + errortext);
|
||||
alert(_("error_validationfailed") + ":\n" + errortext);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ function savePreferences(sender) {
|
|||
var end = $("dayEndTime");
|
||||
var selectedEnd = parseInt(end.options[end.selectedIndex].value);
|
||||
if (selectedStart >= selectedEnd) {
|
||||
alert (getLabel ("Day start time must be prior to day end time."));
|
||||
alert (_("Day start time must be prior to day end time."));
|
||||
sendForm = false;
|
||||
}
|
||||
}
|
||||
|
@ -28,14 +28,14 @@ function savePreferences(sender) {
|
|||
if ($("enableVacation") && $("enableVacation").checked) {
|
||||
if ($("autoReplyText").value.strip().length == 0
|
||||
|| $("autoReplyEmailAddresses").value.strip().length == 0) {
|
||||
alert(getLabel("Please specify your message and your email addresses for which you want to enable auto reply."));
|
||||
alert(_("Please specify your message and your email addresses for which you want to enable auto reply."));
|
||||
sendForm = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($("enableForward") && $("enableForward").checked) {
|
||||
if ($("forwardAddress").value.strip().length == 0) {
|
||||
alert(getLabel("Please specify an address to which you want to forward your messages."));
|
||||
alert(_("Please specify an address to which you want to forward your messages."));
|
||||
sendForm = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -96,11 +96,11 @@ function toggleDetails() {
|
|||
if (div.style.visibility) {
|
||||
div.style.visibility = null;
|
||||
window.resizeBy(0, -(div.clientHeight + buttonsHeight));
|
||||
$("detailsButton").innerHTML = getLabel("Show Details");
|
||||
$("detailsButton").innerHTML = _("Show Details");
|
||||
} else {
|
||||
div.style.visibility = 'visible;';
|
||||
window.resizeBy(0, (div.clientHeight + buttonsHeight));
|
||||
$("detailsButton").innerHTML = getLabel("Hide Details");
|
||||
$("detailsButton").innerHTML = _("Hide Details");
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -1028,7 +1028,7 @@ function folderSubscriptionCallback(http) {
|
|||
http.callbackData["method"](http.callbackData["data"]);
|
||||
}
|
||||
else
|
||||
window.alert(getLabel("Unable to subscribe to that folder!"));
|
||||
window.alert(_("Unable to subscribe to that folder!"));
|
||||
document.subscriptionAjaxRequest = null;
|
||||
}
|
||||
else
|
||||
|
@ -1053,7 +1053,7 @@ function subscribeToFolder(refreshCallback, refreshCallbackData) {
|
|||
rfCbData);
|
||||
}
|
||||
else
|
||||
refreshCallbackData["window"].alert(getLabel("You cannot subscribe to a folder that you own!"));
|
||||
refreshCallbackData["window"].alert(_("You cannot subscribe to a folder that you own!"));
|
||||
}
|
||||
|
||||
function folderUnsubscriptionCallback(http) {
|
||||
|
@ -1064,7 +1064,7 @@ function folderUnsubscriptionCallback(http) {
|
|||
http.callbackData["method"](http.callbackData["data"]);
|
||||
}
|
||||
else
|
||||
window.alert(getLabel("Unable to unsubscribe from that folder!"));
|
||||
window.alert(_("Unable to unsubscribe from that folder!"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1084,7 +1084,7 @@ function unsubscribeFromFolder(folderUrl, owner, refreshCallback,
|
|||
triggerAjaxRequest(url, folderUnsubscriptionCallback, rfCbData);
|
||||
}
|
||||
else
|
||||
window.alert(getLabel("You cannot unsubscribe from a folder that you own!"));
|
||||
window.alert(_("You cannot unsubscribe from a folder that you own!"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1205,21 +1205,21 @@ function showAlarmCallback(http) {
|
|||
&& http.status == 200) {
|
||||
if (http.responseText.length) {
|
||||
var data = http.responseText.evalJSON(true);
|
||||
var msg = getLabel("Reminder:") + " " + data["summary"] + "\n";
|
||||
var msg = _("Reminder:") + " " + data["summary"] + "\n";
|
||||
if (data["startDate"]) {
|
||||
msg += getLabel("Start:") + " " + data["startDate"];
|
||||
msg += _("Start:") + " " + data["startDate"];
|
||||
if (parseInt(data["isAllDay"]) == 0)
|
||||
msg += " - " + data["startTime"];
|
||||
msg += "\n";
|
||||
}
|
||||
if (data["dueDate"]) {
|
||||
msg += getLabel("Due Date:") + " " + data["dueDate"];
|
||||
msg += _("Due Date:") + " " + data["dueDate"];
|
||||
if (data["dueTime"])
|
||||
msg += " - " + data["dueTime"];
|
||||
msg += "\n";
|
||||
}
|
||||
if (data["location"].length)
|
||||
msg += "\n" + getLabel("Location:") + " " + data["location"];
|
||||
msg += "\n" + _("Location:") + " " + data["location"];
|
||||
if (data["description"].length)
|
||||
msg += "\n\n" + data["description"];
|
||||
|
||||
|
@ -1534,7 +1534,7 @@ function createFolderCallback(http) {
|
|||
data.okCB(data.name, "/" + http.responseText, UserLogin);
|
||||
}
|
||||
else if (http.status == 409) {
|
||||
alert (getLabel("A folder by that name already exists."));
|
||||
alert (_("A folder by that name already exists."));
|
||||
}
|
||||
else {
|
||||
if (data.notOkCB)
|
||||
|
@ -1552,7 +1552,7 @@ function delegateInvitation(componentUrl, callbackFunction, callbackData) {
|
|||
if (input.readAttribute("uid") != null)
|
||||
delegatedTo = input.readAttribute("uid");
|
||||
else if (input.value.blank())
|
||||
alert(getLabel("noEmailForDelegation"));
|
||||
alert(_("noEmailForDelegation"));
|
||||
else
|
||||
delegatedTo = input.value;
|
||||
|
||||
|
@ -1607,10 +1607,6 @@ function _(key) {
|
|||
return value;
|
||||
}
|
||||
|
||||
function getLabel(key) {
|
||||
return _(key);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* AJAX IFRAME METHOD (AIM)
|
||||
|
|
Loading…
Reference in New Issue