mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-26 13:59:23 +00:00
Translated friendship status section.
This commit is contained in:
parent
5f2deebfb5
commit
391c74df62
@ -149,4 +149,18 @@ ComunicWeb.common.langs.en = {
|
||||
user_page_forbidden_access_denied_message: "You don't have the right to access this page.",
|
||||
user_page_forbidden_private_account_notice: "This account is private.",
|
||||
user_page_forbidden_loading: "Loading...",
|
||||
|
||||
//User page - friendship status section
|
||||
user_page_friendship_section_err_load_title: "Error",
|
||||
user_page_friendship_section_err_load_message: "Couldn't load friendship informations !",
|
||||
user_page_friendship_section_reject_request: "Reject request",
|
||||
user_page_friendship_section_accept_request: "Accept request",
|
||||
user_page_friendship_section_err_update_request_status: "Couldn't update request status !",
|
||||
user_page_friendship_section_cancel_request: "Cancel request",
|
||||
user_page_friendship_section_err_remove_request: "An error occured while trying to remove the request !",
|
||||
user_page_friendship_section_send_request: "Send request",
|
||||
user_page_friendship_section_err_send_request: "An error occured while trying to send the request !",
|
||||
user_page_friendship_section_following: "Following",
|
||||
user_page_friendship_section_follow: "Follow",
|
||||
user_page_friendship_section_err_update_following_status: "An error occured while trying to update following status !",
|
||||
}
|
@ -23,7 +23,9 @@ ComunicWeb.pages.userPage.friendshipStatus = {
|
||||
|
||||
//Check for errors
|
||||
if(response.error){
|
||||
message = ComunicWeb.common.messages.createCalloutElem("Error", "Couldn't load friendship informations !", "danger");
|
||||
message = ComunicWeb.common.messages.createCalloutElem(
|
||||
lang("user_page_friendship_section_err_load_title"),
|
||||
lang("user_page_friendship_section_err_load_message"), "danger");
|
||||
target.appendChild(message);
|
||||
return;
|
||||
}
|
||||
@ -36,7 +38,7 @@ ComunicWeb.pages.userPage.friendshipStatus = {
|
||||
appendTo: target,
|
||||
type: "button",
|
||||
class: "btn btn-xs btn-danger",
|
||||
innerHTML: "Reject request"
|
||||
innerHTML: lang("user_page_friendship_section_reject_request")
|
||||
});
|
||||
|
||||
createElem2({
|
||||
@ -50,7 +52,7 @@ ComunicWeb.pages.userPage.friendshipStatus = {
|
||||
appendTo: target,
|
||||
type: "button",
|
||||
class: "btn btn-xs btn-success",
|
||||
innerHTML: "Accept request"
|
||||
innerHTML: lang("user_page_friendship_section_accept_request")
|
||||
});
|
||||
|
||||
//Prepare the buttons
|
||||
@ -76,7 +78,7 @@ ComunicWeb.pages.userPage.friendshipStatus = {
|
||||
|
||||
//Check for errors
|
||||
if(response.error){
|
||||
ComunicWeb.common.notificationSystem.showNotification("Couldn't update request status !",
|
||||
ComunicWeb.common.notificationSystem.showNotification(lang("user_page_friendship_section_err_update_request_status"),
|
||||
"danger", 5);
|
||||
}
|
||||
|
||||
@ -102,7 +104,7 @@ ComunicWeb.pages.userPage.friendshipStatus = {
|
||||
appendTo: target,
|
||||
type: "button",
|
||||
class: "btn btn-xs btn-danger",
|
||||
innerHTML: "Cancel request"
|
||||
innerHTML: lang("user_page_friendship_section_cancel_request")
|
||||
});
|
||||
|
||||
cancelRequest.onclick = function(){
|
||||
@ -115,7 +117,7 @@ ComunicWeb.pages.userPage.friendshipStatus = {
|
||||
|
||||
//Check for errors
|
||||
if(response.error){
|
||||
ComunicWeb.common.notificationSystem.showNotification("An error occured while trying to remove the request !");
|
||||
ComunicWeb.common.notificationSystem.showNotification(lang("user_page_friendship_section_err_remove_request"));
|
||||
}
|
||||
|
||||
//Reload this component
|
||||
@ -135,7 +137,7 @@ ComunicWeb.pages.userPage.friendshipStatus = {
|
||||
appendTo: target,
|
||||
type: "button",
|
||||
class: "btn btn-xs btn-primary",
|
||||
innerHTML: "Send request"
|
||||
innerHTML: lang("user_page_friendship_section_send_request")
|
||||
});
|
||||
|
||||
sendRequestButton.onclick = function(){
|
||||
@ -148,7 +150,7 @@ ComunicWeb.pages.userPage.friendshipStatus = {
|
||||
|
||||
//Check for errors
|
||||
if(response.error){
|
||||
ComunicWeb.common.notificationSystem.showNotification("An error occured while trying to send the request !");
|
||||
ComunicWeb.common.notificationSystem.showNotification(lang("user_page_friendship_section_err_send_request"));
|
||||
}
|
||||
|
||||
//Reload this component
|
||||
@ -171,11 +173,11 @@ ComunicWeb.pages.userPage.friendshipStatus = {
|
||||
});
|
||||
|
||||
if(response.following){
|
||||
followButton.innerHTML = "Following";
|
||||
followButton.innerHTML = lang("user_page_friendship_section_following");
|
||||
followButton.setAttribute("data-following", "true");
|
||||
}
|
||||
else {
|
||||
followButton.innerHTML = "Follow";
|
||||
followButton.innerHTML = lang("user_page_friendship_section_follow");
|
||||
followButton.setAttribute("data-following", "false");
|
||||
}
|
||||
|
||||
@ -192,7 +194,7 @@ ComunicWeb.pages.userPage.friendshipStatus = {
|
||||
|
||||
//Check for errors
|
||||
if(response.error){
|
||||
ComunicWeb.common.notificationSystem.showNotification("An error occured while trying to update following status !");
|
||||
ComunicWeb.common.notificationSystem.showNotification(lang("user_page_friendship_section_err_update_following_status"));
|
||||
}
|
||||
|
||||
//Reload this component
|
||||
|
Loading…
Reference in New Issue
Block a user