mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 20:19:21 +00:00
Translated notifications dropdown.
This commit is contained in:
parent
52d1328f93
commit
52c963cf1b
@ -68,7 +68,7 @@ ComunicWeb.components.notifications.dropdown = {
|
|||||||
appendTo: dropdownMenu,
|
appendTo: dropdownMenu,
|
||||||
type: "li",
|
type: "li",
|
||||||
class: "header",
|
class: "header",
|
||||||
innerHTML: "Notifications"
|
innerHTML: lang("notifications_dropdown_title")
|
||||||
});
|
});
|
||||||
|
|
||||||
//Add notifications list
|
//Add notifications list
|
||||||
@ -93,13 +93,13 @@ ComunicWeb.components.notifications.dropdown = {
|
|||||||
var deleteAllLink = createElem2({
|
var deleteAllLink = createElem2({
|
||||||
appendTo: dropdownBottom,
|
appendTo: dropdownBottom,
|
||||||
type: "a",
|
type: "a",
|
||||||
innerHTML: "Delete all"
|
innerHTML: lang("notifications_dropdown_delete_all_link")
|
||||||
});
|
});
|
||||||
|
|
||||||
//Make the delete all notifications link lives
|
//Make the delete all notifications link lives
|
||||||
deleteAllLink.onclick = function(){
|
deleteAllLink.onclick = function(){
|
||||||
|
|
||||||
ComunicWeb.common.messages.confirm("Are you sure do you want to delete all the notifications ? This operation can not be cancelled !", function(accept){
|
ComunicWeb.common.messages.confirm(lang("notifications_dropdown_confirm_delete_all"), function(accept){
|
||||||
|
|
||||||
//We continue only if the user confirmed the operation
|
//We continue only if the user confirmed the operation
|
||||||
if(!accept)
|
if(!accept)
|
||||||
@ -110,12 +110,12 @@ ComunicWeb.components.notifications.dropdown = {
|
|||||||
|
|
||||||
//Check for errors
|
//Check for errors
|
||||||
if(result.error){
|
if(result.error){
|
||||||
ComunicWeb.common.notificationSystem.showNotification("An error occured while trying to delete all the notifications !", "danger");
|
ComunicWeb.common.notificationSystem.showNotification(lang("notifications_dropdown_err_delete_all_notifications"), "danger");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Display success
|
//Display success
|
||||||
ComunicWeb.common.notificationSystem.showNotification("The entire list of notification has been cleared.", "success");
|
ComunicWeb.common.notificationSystem.showNotification(lang("notifications_dropdown_delete_all_success"), "success");
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -150,7 +150,7 @@ ComunicWeb.components.notifications.dropdown = {
|
|||||||
|
|
||||||
//Check for errors
|
//Check for errors
|
||||||
if(result.error){
|
if(result.error){
|
||||||
ComunicWeb.common.notificationSystem.showNotification("An error occured while trying to retrieve notifications list !", "danger");
|
ComunicWeb.common.notificationSystem.showNotification(lang("notifications_dropdown_err_get_notifs_list"), "danger");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,7 +162,7 @@ ComunicWeb.components.notifications.dropdown = {
|
|||||||
|
|
||||||
//Check for errors
|
//Check for errors
|
||||||
if(users.error){
|
if(users.error){
|
||||||
ComunicWeb.common.notificationSystem.showNotification("An error occured while trying to retrieve users informations for the notifications !", "danger");
|
ComunicWeb.common.notificationSystem.showNotification(lang("notifications_dropdown_err_get_related_users_info"), "danger");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -172,7 +172,7 @@ ComunicWeb.components.notifications.dropdown = {
|
|||||||
|
|
||||||
//Check for errors
|
//Check for errors
|
||||||
if(groups.error)
|
if(groups.error)
|
||||||
return notify("Could not get groups information!", "danger");
|
return notify(lang("notifications_dropdown_err_get_related_groups_info"), "danger");
|
||||||
|
|
||||||
//Empty the target list
|
//Empty the target list
|
||||||
list.innerHTML = "";
|
list.innerHTML = "";
|
||||||
@ -188,7 +188,7 @@ ComunicWeb.components.notifications.dropdown = {
|
|||||||
//Display a message if there isn't any notification to display
|
//Display a message if there isn't any notification to display
|
||||||
if(result.length == 0){
|
if(result.length == 0){
|
||||||
|
|
||||||
list.innerHTML = "<li class='no-notification-msg'>You do not have any notification yet.</li>";
|
list.innerHTML = "<li class='no-notification-msg'>" + lang("notifications_dropdown_no_notif_notice") + "</li>";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,13 +81,25 @@ ComunicWeb.common.langs.en = {
|
|||||||
like_btn_liking: "Liking",
|
like_btn_liking: "Liking",
|
||||||
like_btn_like: "Like",
|
like_btn_like: "Like",
|
||||||
|
|
||||||
//Conversations dropdown
|
//Conversations - unread dropdown
|
||||||
conversations_dropdown_header: "Unread conversations",
|
conversations_dropdown_header: "Unread conversations",
|
||||||
conversations_dropdown_err_get_list: "Could not retrieve the list of unread conversations !",
|
conversations_dropdown_err_get_list: "Could not retrieve the list of unread conversations !",
|
||||||
conversations_dropdown_err_get_user_info: "Could not get informations about some users !",
|
conversations_dropdown_err_get_user_info: "Could not get informations about some users !",
|
||||||
conversations_dropdown_no_unread_notice: "You do not have any unread messages in the conversations you are following...",
|
conversations_dropdown_no_unread_notice: "You do not have any unread messages in the conversations you are following...",
|
||||||
|
|
||||||
|
|
||||||
|
//Notifications - dropdown
|
||||||
|
notifications_dropdown_title: "Notifications",
|
||||||
|
notifications_dropdown_delete_all_link: "Delete all",
|
||||||
|
notifications_dropdown_confirm_delete_all: "Are you sure do you want to delete all the notifications ? This operation can not be cancelled !",
|
||||||
|
notifications_dropdown_err_delete_all_notifications: "An error occured while trying to delete all the notifications !",
|
||||||
|
notifications_dropdown_delete_all_success: "The entire list of notification has been cleared.",
|
||||||
|
notifications_dropdown_err_get_notifs_list: "An error occured while trying to retrieve notifications list !",
|
||||||
|
notifications_dropdown_err_get_related_users_info: "An error occured while trying to retrieve users informations for the notifications !",
|
||||||
|
notifications_dropdown_err_get_related_groups_info: "Could not get groups information!",
|
||||||
|
notifications_dropdown_no_notif_notice: "You do not have any notification yet.",
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pages
|
* Pages
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user