diff --git a/assets/js/components/posts/actions.js b/assets/js/components/posts/actions.js index 12cdcafb..90ee865e 100644 --- a/assets/js/components/posts/actions.js +++ b/assets/js/components/posts/actions.js @@ -25,7 +25,7 @@ ComunicWeb.components.posts.actions = { //Check for errors if(infos.error){ - ComunicWeb.common.notificationSystem.showNotification("An error occured while getting information about the post !", "danger"); + ComunicWeb.common.notificationSystem.showNotification(lang("posts_actions_err_get_single"), "danger"); return; } diff --git a/assets/js/components/posts/edit.js b/assets/js/components/posts/edit.js index b935c9a2..1f287a81 100644 --- a/assets/js/components/posts/edit.js +++ b/assets/js/components/posts/edit.js @@ -56,7 +56,7 @@ ComunicWeb.components.posts.edit = { appendTo: modalHeader, type: "h4", class: "modal-title", - innerHTML: "Update the post" + innerHTML: lang("posts_edit_title") }); //Modal body @@ -77,7 +77,7 @@ ComunicWeb.components.posts.edit = { appendTo: modalFooter, type: "button", class: "btn btn-default pull-left", - innerHTML: "Cancel" + innerHTML: lang("posts_edit_cancel") }); cancelButton.setAttribute("data-confirm", "false"); @@ -85,7 +85,7 @@ ComunicWeb.components.posts.edit = { appendTo: modalFooter, type: "button", class: "btn btn-primary", - innerHTML: "Update" + innerHTML: lang("posts_edit_update") }); confirmButton.setAttribute("data-confirm", "true"); @@ -135,7 +135,7 @@ ComunicWeb.components.posts.edit = { //Check the new post content if(!ComunicWeb.components.posts.form._check_message(new_content)){ - ComunicWeb.common.notificationSystem.showNotification("Please check your message content !", "danger"); + ComunicWeb.common.notificationSystem.showNotification(lang("posts_edit_err_invalid_content"), "danger"); return; } @@ -147,13 +147,13 @@ ComunicWeb.components.posts.edit = { //Check for errors if(response.error){ - ComunicWeb.common.notificationSystem.showNotification("An error occured while trying to udpate post !", "danger"); + ComunicWeb.common.notificationSystem.showNotification(lang("posts_edit_err_update_content"), "danger"); confirmButton.disabled = false; return; } //Display success - ComunicWeb.common.notificationSystem.showNotification("The post has been updated !", "success"); + ComunicWeb.common.notificationSystem.showNotification(lang("posts_edit_success_update"), "success"); //Reload post ComunicWeb.components.posts.actions.reload_post(infos.ID, root); diff --git a/assets/js/langs/en.inc.js b/assets/js/langs/en.inc.js index b3a93a7b..4f1289b9 100644 --- a/assets/js/langs/en.inc.js +++ b/assets/js/langs/en.inc.js @@ -56,6 +56,17 @@ ComunicWeb.common.langs.en = { menu_bar_action_settings: "Settings", _menu_bar_action_logout: "Logout", + //Posts - Actions + posts_actions_err_get_single: "An error occured while getting information about the post !", + + //Posts - Editor + posts_edit_cancel: "Cancel", + posts_edit_update: "Update", + posts_edit_err_invalid_content: "Please check your message content !", + posts_edit_err_update_content: "An error occured while trying to udpate post !", + posts_edit_success_update: "The post has been updated !", + posts_edit_title: "Update the post", + //Posts - UI posts_ui_error: "Error", posts_ui_err_update_visibility: "Couldn't change post visibility level !",