mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-26 05:49:22 +00:00
Added comments component translation.
This commit is contained in:
parent
4b7008b5ba
commit
81ba811622
@ -25,7 +25,7 @@ ComunicWeb.components.comments.actions = {
|
||||
|
||||
//Check for errors
|
||||
if(result.error){
|
||||
ComunicWeb.common.notificationSystem.showNotification("Couldn't get informations about a comment !", "danger");
|
||||
ComunicWeb.common.notificationSystem.showNotification(lang("comments_actions_err_get_info_single"), "danger");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ ComunicWeb.components.comments.editor = {
|
||||
|
||||
//Check for error
|
||||
if(result.error){
|
||||
ComunicWeb.common.notificationSystem.showNotification("An error occured while trying to update comment content !", "danger");
|
||||
ComunicWeb.common.notificationSystem.showNotification(lang("comments_editor_err_update"), "danger");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -39,8 +39,8 @@ ComunicWeb.components.comments.editor = {
|
||||
|
||||
//Prompt the user to enter the new content of the comment
|
||||
ComunicWeb.common.messages.inputString(
|
||||
"Edit comment content",
|
||||
"Please specify the new content of the comment: ",
|
||||
lang("comments_editor_title"),
|
||||
lang("comments_editor_notice"),
|
||||
infos.content,
|
||||
inputCallback
|
||||
);
|
||||
|
@ -46,7 +46,7 @@ ComunicWeb.components.comments.form = {
|
||||
type: "input",
|
||||
elemType: "text",
|
||||
class: "form-control",
|
||||
placeholder: "New comment...",
|
||||
placeholder: lang("comments_form_input_placeholder"),
|
||||
name: "content"
|
||||
});
|
||||
newCommentText.maxLength = 255;
|
||||
@ -106,7 +106,7 @@ ComunicWeb.components.comments.form = {
|
||||
appendTo: buttonsGroup,
|
||||
type: "button",
|
||||
class: "btn btn-default btn-flat",
|
||||
innerHTML: "Send"
|
||||
innerHTML: lang("comments_form_send")
|
||||
});
|
||||
|
||||
//Catch form when submitted
|
||||
@ -117,7 +117,7 @@ ComunicWeb.components.comments.form = {
|
||||
|
||||
//Check the comment
|
||||
if(!hasImage && newCommentText.value < 5){
|
||||
ComunicWeb.common.notificationSystem.showNotification("Please type a valid comment! (at least 5 characters)", "danger");
|
||||
ComunicWeb.common.notificationSystem.showNotification(lang("comments_form_err_invalid_comment"), "danger");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -140,7 +140,7 @@ ComunicWeb.components.comments.form = {
|
||||
|
||||
//Check for errors
|
||||
if(result.error){
|
||||
ComunicWeb.common.notificationSystem.showNotification("Couldn't create comment! (check its content)", "danger");
|
||||
ComunicWeb.common.notificationSystem.showNotification(lang("comments_form_err_create_comment"), "danger");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ ComunicWeb.components.comments.ui = {
|
||||
|
||||
//Check for errors
|
||||
if(result.error){
|
||||
ComunicWeb.common.notificationSystem.showNotification("Couldn't informations about some users to display their comments !", "danger");
|
||||
ComunicWeb.common.notificationSystem.showNotification(lang("comments_ui_err_get_users_info"), "danger");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ ComunicWeb.components.comments.ui = {
|
||||
|
||||
//Check for errors
|
||||
if(result.error){
|
||||
ComunicWeb.common.notificationSystem.showNotification("Couldn't get informations about a user!", "danger");
|
||||
ComunicWeb.common.notificationSystem.showNotification(lang("comments_ui_err_get_user_info"), "danger");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -191,7 +191,7 @@ ComunicWeb.components.comments.ui = {
|
||||
//Make delete button lives
|
||||
deleteCommentLink.onclick = function(){
|
||||
|
||||
ComunicWeb.common.messages.confirm("Are you sure do you want to delete this comment ? This operation is unrecoverable!", function(response){
|
||||
ComunicWeb.common.messages.confirm(lang("comments_ui_confirm_delete"), function(response){
|
||||
|
||||
//Check if user cancelled the operation
|
||||
if(!response)
|
||||
@ -207,7 +207,7 @@ ComunicWeb.components.comments.ui = {
|
||||
|
||||
//Check for errors
|
||||
if(response.error){
|
||||
ComunicWeb.common.notificationSystem.showNotification("Could not delete comment!", "danger");
|
||||
ComunicWeb.common.notificationSystem.showNotification(lang("comments_ui_err_delete_comment"), "danger");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -111,6 +111,27 @@ ComunicWeb.common.langs.en = {
|
||||
notifications_dropdown_no_notif_notice: "You do not have any notification yet.",
|
||||
|
||||
|
||||
//Comments - Actions
|
||||
comments_actions_err_get_info_single: "Couldn't get informations about a comment !",
|
||||
|
||||
//Comments - Editor
|
||||
comments_editor_err_update: "An error occured while trying to update comment content !",
|
||||
comments_editor_title: "Edit comment content",
|
||||
comments_editor_notice: "Please specify the new content of the comment: ",
|
||||
|
||||
//Comments - UI
|
||||
comments_ui_err_get_users_info: "Couldn't information about some users to display their comments !",
|
||||
comments_ui_err_get_user_info: "Couldn't get information about a user!",
|
||||
comments_ui_confirm_delete: "Are you sure do you want to delete this comment ? This operation is unrecoverable!",
|
||||
comments_ui_err_delete_comment: "Could not delete comment!",
|
||||
|
||||
//Comments - Form
|
||||
comments_form_input_placeholder: "New comment...",
|
||||
comments_form_send: "Send",
|
||||
comments_form_err_invalid_comment: "Please type a valid comment! (at least 5 characters)",
|
||||
comments_form_err_create_comment: "Couldn't create comment! (check its content)",
|
||||
|
||||
|
||||
/**
|
||||
* Pages
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user