mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-12-24 09:58:51 +00:00
Translated post UI.
This commit is contained in:
parent
52c963cf1b
commit
02744d5c72
@ -112,7 +112,7 @@ ComunicWeb.components.posts.ui = {
|
||||
getMultipleUsersInfos(usersToFetch, function(result){
|
||||
if(result.error) {
|
||||
ComunicWeb.debug.logMessage("Could not get some users info!");
|
||||
userName.innerHTML = "Error";
|
||||
userName.innerHTML = lang("posts_ui_error");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -259,7 +259,7 @@ ComunicWeb.components.posts.ui = {
|
||||
|
||||
//Check for errors
|
||||
if(response.error){
|
||||
ComunicWeb.common.notificationSystem.showNotification("Couldn't change post visibility level !", "danger");
|
||||
ComunicWeb.common.notificationSystem.showNotification(lang("posts_ui_err_update_visibility"), "danger");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -326,7 +326,7 @@ ComunicWeb.components.posts.ui = {
|
||||
deleteButtonLink.onclick = function(){
|
||||
|
||||
//Create a confirmation dialog
|
||||
ComunicWeb.common.messages.confirm("Are you sure do you want to delete this post? The operation can not be reverted !", function(accept){
|
||||
ComunicWeb.common.messages.confirm(lang("posts_ui_confirm_delete"), function(accept){
|
||||
|
||||
//Check if the user cancelled the operation
|
||||
if(!accept)
|
||||
@ -341,7 +341,7 @@ ComunicWeb.components.posts.ui = {
|
||||
if(response.error){
|
||||
|
||||
//Display an error
|
||||
ComunicWeb.common.notificationSystem.showNotification("An error occured while trying to delete post !", "danger");
|
||||
ComunicWeb.common.notificationSystem.showNotification(lang("posts_ui_err_delete_post"), "danger");
|
||||
|
||||
//Make the post visible
|
||||
postRoot.style.visibility = "visible";
|
||||
@ -700,20 +700,20 @@ ComunicWeb.components.posts.ui = {
|
||||
appendTo: surveyResponse,
|
||||
class: "survey-given-response",
|
||||
type: "p",
|
||||
innerHTML: "Your response: " + info.data_survey.choices[info.data_survey.user_choice].name + " "
|
||||
innerHTML: lang("posts_ui_survey_your_response", [info.data_survey.choices[info.data_survey.user_choice].name])
|
||||
});
|
||||
|
||||
//Offer the user to cancel his choice
|
||||
var cancelReponseLink = createElem2({
|
||||
appendTo: choosedResponseElem,
|
||||
type: "a",
|
||||
innerHTML: "Cancel"
|
||||
innerHTML: lang("posts_ui_cance_response_survey")
|
||||
});
|
||||
|
||||
//Make cancel button lives
|
||||
cancelReponseLink.onclick = function(){
|
||||
|
||||
ComunicWeb.common.messages.confirm("Do you really want to cancel your response to the survey ?", function(confirm){
|
||||
ComunicWeb.common.messages.confirm(lang("posts_ui_confirm_cancel_survey_response"), function(confirm){
|
||||
|
||||
//Check if the user cancelled
|
||||
if(!confirm)
|
||||
@ -724,7 +724,7 @@ ComunicWeb.components.posts.ui = {
|
||||
|
||||
//Check for errors
|
||||
if(response.error){
|
||||
ComunicWeb.common.notificationSystem.showNotification("Could not cancel response to survey !", "danger");
|
||||
ComunicWeb.common.notificationSystem.showNotification(lang("posts_ui_err_cancel_response_survey"), "danger");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -778,7 +778,7 @@ ComunicWeb.components.posts.ui = {
|
||||
appendTo: chooseButtonSpan,
|
||||
type: "button",
|
||||
class: "btn btn-default",
|
||||
innerHTML: "Send"
|
||||
innerHTML: lang("posts_ui_send_survey_response")
|
||||
});
|
||||
|
||||
//Make confirm button lives
|
||||
|
@ -35,6 +35,17 @@ ComunicWeb.common.langs.en = {
|
||||
menu_bar_action_settings: "Settings",
|
||||
_menu_bar_action_logout: "Logout",
|
||||
|
||||
//Posts - UI
|
||||
posts_ui_error: "Error",
|
||||
posts_ui_err_update_visibility: "Couldn't change post visibility level !",
|
||||
posts_ui_confirm_delete: "Are you sure do you want to delete this post? The operation can not be reverted !",
|
||||
posts_ui_err_delete_post: "An error occured while trying to delete post !",
|
||||
posts_ui_survey_your_response: "Your response: %p ",
|
||||
posts_ui_confirm_cancel_survey_response: "Do you really want to cancel your response to the survey ?",
|
||||
posts_ui_err_cancel_response_survey: "Could not cancel response to survey !",
|
||||
posts_ui_send_survey_response: "Send",
|
||||
posts_ui_cance_response_survey: "Cancel",
|
||||
|
||||
//Posts form
|
||||
_post_type_text: "Text",
|
||||
_post_type_youtube: "Youtube",
|
||||
|
Loading…
Reference in New Issue
Block a user