diff --git a/assets/js/components/posts/form.js b/assets/js/components/posts/form.js
index 222c3367..42323df8 100644
--- a/assets/js/components/posts/form.js
+++ b/assets/js/components/posts/form.js
@@ -51,29 +51,29 @@ ComunicWeb.components.posts.form = {
});
//Text
- var textType = this._add_post_type(postTypesContener, "text", "Text");
+ var textType = this._add_post_type(postTypesContener, "text", lang("_post_type_text"));
textType.checked = true;
//Image
- var imageType = this._add_post_type(postTypesContener, "image", " Image");
+ var imageType = this._add_post_type(postTypesContener, "image", " "+lang("_post_type_image")+"");
//Youtube
- var youtubeType = this._add_post_type(postTypesContener, "youtube", " YouTube");
+ var youtubeType = this._add_post_type(postTypesContener, "youtube", " "+lang("_post_type_youtube")+"");
//Movie
- var movieType = this._add_post_type(postTypesContener, "movie", " Movie");
+ var movieType = this._add_post_type(postTypesContener, "movie", " "+lang("_post_type_movie")+"");
//Link
- var linkType = this._add_post_type(postTypesContener, "link", " Weblink");
+ var linkType = this._add_post_type(postTypesContener, "link", " "+lang("_post_type_link")+"");
//PDF
- var pdfType = this._add_post_type(postTypesContener, "pdf", " PDF");
+ var pdfType = this._add_post_type(postTypesContener, "pdf", " "+lang("_post_type_pdf")+"");
//Countdown timer
- var countdownType = this._add_post_type(postTypesContener, "countdown", " Timer");
+ var countdownType = this._add_post_type(postTypesContener, "countdown", " "+lang("_post_type_countdown")+"");
//Survey
- var surveyType = this._add_post_type(postTypesContener, "survey", " Survey");
+ var surveyType = this._add_post_type(postTypesContener, "survey", " "+lang("_post_type_survey")+"");
@@ -101,7 +101,7 @@ ComunicWeb.components.posts.form = {
var youtubeLinkInput = createFormGroup({
target: youtubeInputForm,
- label: "Youtube video link",
+ label: lang("_input_youtube_link_label"),
placeholder: "https://youtube.com/watch?v=",
type: "text"
});
@@ -120,7 +120,7 @@ ComunicWeb.components.posts.form = {
appendTo: movieInputForm,
type: "button",
class: "btn btn-primary",
- innerHTML: "Choose"
+ innerHTML: lang("_choose")
});
var movieIDInput = createElem2({
@@ -133,7 +133,7 @@ ComunicWeb.components.posts.form = {
var movieName = createElem2({
appendTo: movieInputForm,
type: "span",
- innerHTML: "No movie selected."
+ innerHTML: lang("_no_movie_selected")
});
//Make movie choose button lives
@@ -155,7 +155,7 @@ ComunicWeb.components.posts.form = {
var linkInput = createFormGroup({
target: linkChooseForm,
- label: "Page URL",
+ label: lang("_input_page_url_label"),
placeholder: "https://...",
type: "text"
});
@@ -184,7 +184,7 @@ ComunicWeb.components.posts.form = {
var timeEndInput = createFormGroup({
target: countdownForm,
- label: "End date",
+ label: lang("_input_countdown_enddate"),
placeholder: "dd/mm/yyyy",
type: "text"
});
@@ -205,15 +205,15 @@ ComunicWeb.components.posts.form = {
//Survey question
var surveyQuestionInput = createFormGroup({
target: surveyForm,
- label: "Question for the survey",
- placeholder: "Question",
+ label: lang("_input_survey_question_label"),
+ placeholder: lang("_input_survey_question_placeholder"),
type: "text"
});
//Survey answers
var surveyAnswerInput = createFormGroup({
target: surveyForm,
- label: "Answers",
+ label: lang("_input_survey_answers_label"),
type: "select2",
multiple: true,
});
@@ -222,7 +222,7 @@ ComunicWeb.components.posts.form = {
var surveyAnswerHelper = createElem2({
appendTo: surveyForm,
type: "p",
- innerHTML: "Type your answer and then press return (enter) key to confirm it."
+ innerHTML: lang("_input_survey_answers_hint"),
})
//Enable select2
@@ -287,7 +287,7 @@ ComunicWeb.components.posts.form = {
appendTo: rightDiv,
type: "button",
class: "btn btn-primary",
- innerHTML: "Send"
+ innerHTML: lang("_send")
});
//Make send button lives
@@ -302,7 +302,7 @@ ComunicWeb.components.posts.form = {
//Check if the message includes an image
if(message_content.includes("data:image/")){
- ComunicWeb.common.notificationSystem.showNotification("Please do not drag images directly in the message !", "danger");
+ ComunicWeb.common.notificationSystem.showNotification(lang("_err_drag_image_post"), "danger");
return;
}
diff --git a/assets/js/langs/en.inc.js b/assets/js/langs/en.inc.js
index fba34073..aa5ec74a 100644
--- a/assets/js/langs/en.inc.js
+++ b/assets/js/langs/en.inc.js
@@ -7,6 +7,8 @@ ComunicWeb.common.langs.en = {
//Really really common messages
_loading: "Loading...",
+ _send: "Send",
+ _choose: "Choisir",
//Error messages
"__fatal_error": "Fatal error",
@@ -32,5 +34,24 @@ ComunicWeb.common.langs.en = {
_menu_bar_action_logout: "Logout",
//Posts form
+ _post_type_text: "Text",
+ _post_type_youtube: "Youtube",
+ _post_type_image: "Image",
+ _post_type_movie: "Movie",
+ _post_type_link: "Weblink",
+ _post_type_pdf: "PDF",
+ _post_type_countdown: "Timer",
+ _post_type_survey: "Survey",
+
+ _input_youtube_link_label: "Youtube video link",
+ _no_movie_selected: "No movie selected.",
+ _input_page_url_label: "Page URL",
+ _input_countdown_enddate: "End date",
+ _input_survey_question_label: "Question for the survey",
+ _input_survey_question_placeholder: "Question",
+ _input_survey_answers_label: "Answers",
+ _input_survey_answers_hint: "Type your answer and then press return (enter) key to confirm it.",
+
+ _err_drag_image_post: "Please do not drag images directly in the message !",
}
\ No newline at end of file
diff --git a/assets/js/langs/fr.inc.js b/assets/js/langs/fr.inc.js
index ad650d78..cfbaf850 100644
--- a/assets/js/langs/fr.inc.js
+++ b/assets/js/langs/fr.inc.js
@@ -7,6 +7,7 @@ ComunicWeb.common.langs.fr = {
//Really really common messages
_loading: "Chargement...",
+ _send: "Envoyer",
//Error messages
"__fatal_error": "Erreur fatale",
@@ -31,4 +32,24 @@ ComunicWeb.common.langs.fr = {
_menu_bar_search_placeholder: "Recherche...",
_menu_bar_action_logout: "Déconnexion",
+ //Posts form
+ _post_type_text: "Texte",
+ _post_type_youtube: "Youtube",
+ _post_type_image: "Image",
+ _post_type_movie: "Vidéos",
+ _post_type_link: "Lien web",
+ _post_type_pdf: "PDF",
+ _post_type_countdown: "Compteur à rebours",
+ _post_type_survey: "Sondage",
+
+ _input_youtube_link_label: "Lien de la vidéo YouTube",
+ _no_movie_selected: "Aucune vidéo sélectionnée.",
+ _input_page_url_label: "URL de la page",
+ _input_countdown_enddate: "Date de fin",
+ _input_survey_question_label: "Question du sondage",
+ _input_survey_question_placeholder: "Question",
+ _input_survey_answers_label: "Réponses",
+ _input_survey_answers_hint: "Saisissez vos réponses une par une. Appuyer sur entrée après avoir saisi une réponse pour la confirmer.",
+
+ _err_drag_image_post: "Veuillez ne pas glisser d'images dans les messages !",
}
\ No newline at end of file