Translated messages script.

This commit is contained in:
Pierre HUBERT 2018-08-05 16:33:39 +02:00
parent 81ba811622
commit 0af31052b4
2 changed files with 16 additions and 7 deletions

View File

@ -47,7 +47,7 @@ ComunicWeb.common.messages.createCalloutElem = function(calloutTitle, calloutMes
*/
ComunicWeb.common.messages.createLoadingCallout = function(target){
var elem = this.createCalloutElem("Loading", "Please wait while this page is loading...", "info");
var elem = this.createCalloutElem(lang("messages_loading_layout_title"), lang("messages_loading_layout_message"), "info");
if(target)
target.appendChild(elem);
@ -138,7 +138,7 @@ ComunicWeb.common.messages.createDialogSkeleton = function(info){
appendTo: data.modalFooter,
type: "button",
class: "btn btn-default",
innerHTML: "Cancel"
innerHTML: lang("messages_dialog_cancel")
});
return data;
@ -197,7 +197,7 @@ ComunicWeb.common.messages.confirm = function(message, callback){
appendTo: modalHeader,
type: "h4",
class: "modal-title",
innerHTML: "Confirm the operation"
innerHTML: lang("messages_dialog_confirm_title")
});
//Modal body
@ -219,7 +219,7 @@ ComunicWeb.common.messages.confirm = function(message, callback){
appendTo: modalFooter,
type: "button",
class: "btn btn-default pull-left",
innerHTML: "Cancel"
innerHTML: lang("messages_dialog_confirm_cancel")
});
cancelButton.setAttribute("data-confirm", "false");
@ -227,7 +227,7 @@ ComunicWeb.common.messages.confirm = function(message, callback){
appendTo: modalFooter,
type: "button",
class: "btn btn-danger",
innerHTML: "Confirm"
innerHTML: lang("messages_dialog_confirm_confirm")
});
confirmButton.setAttribute("data-confirm", "true");
@ -341,7 +341,7 @@ ComunicWeb.common.messages.inputString = function(title, message, defaultValue,
appendTo: modalFooter,
type: "button",
class: "btn btn-default pull-left",
innerHTML: "Cancel"
innerHTML: lang("messages_dialog_input_string_cancel")
});
cancelButton.setAttribute("data-confirm", "false");
@ -349,7 +349,7 @@ ComunicWeb.common.messages.inputString = function(title, message, defaultValue,
appendTo: modalFooter,
type: "button",
class: "btn btn-primary",
innerHTML: "Submit"
innerHTML: lang("messages_dialog_input_string_submit")
});
submitButton.setAttribute("data-confirm", "true");

View File

@ -18,6 +18,15 @@ ComunicWeb.common.langs.en = {
"__fatal_error": "Fatal error",
"__fatal_error_explanation": "A fatal error occured : <i>%p</i>. Please try to refresh the page...",
//Messages
messages_loading_layout_title: "Loading",
messages_loading_layout_message: "Please wait while this page is loading...",
messages_dialog_cancel: "Cancel",
messages_dialog_confirm_title: "Confirm the operation",
messages_dialog_confirm_confirm: "Confirm",
messages_dialog_confirm_cancel: "Cancel",
messages_dialog_input_string_cancel: "Cancel",
messages_dialog_input_string_submit: "Submit",
/**
* Components