From 1e1021fd4907d7963ab425316fe97e13ad47e072 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 4 Aug 2018 09:03:31 +0200 Subject: [PATCH] Added translation for lastest posts page. --- assets/js/langs/en.inc.js | 8 +++++++- assets/js/pages/latestPosts/main.js | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/assets/js/langs/en.inc.js b/assets/js/langs/en.inc.js index 959ec317..711e707d 100644 --- a/assets/js/langs/en.inc.js +++ b/assets/js/langs/en.inc.js @@ -104,5 +104,11 @@ ComunicWeb.common.langs.en = { //Account created page account_created_message_title: "Congratulations!", account_created_message_body: "Your account has been successfully created!
Login now to use all the features of Comunic!", - account_created_message_login: "Login" + account_created_message_login: "Login", + + //Latest posts page + page_latest_posts_err_get_list_title: "Error", + page_latest_posts_err_get_list_message: "Could not get the list of the latest posts ! Please try to refresh the page...", + page_latest_posts_notice_no_post_title: "No post to display", + page_latest_posts_notice_no_posts_message: "Posts from you and your friend will appear here...", } \ No newline at end of file diff --git a/assets/js/pages/latestPosts/main.js b/assets/js/pages/latestPosts/main.js index f4569b81..68eb77ad 100644 --- a/assets/js/pages/latestPosts/main.js +++ b/assets/js/pages/latestPosts/main.js @@ -98,7 +98,7 @@ ComunicWeb.pages.latestPosts.main = { if(response.error){ //Display modal error - var error = ComunicWeb.common.messages.createCalloutElem("Error", "Could not get the list of the latest posts ! Please try to refresh the page...", "danger"); + var error = ComunicWeb.common.messages.createCalloutElem(lang("page_latest_posts_err_get_list_title"), lang("page_latest_posts_err_get_list_message"), "danger"); error.className += " latestPostsError"; target.appendChild(error); } @@ -134,7 +134,7 @@ ComunicWeb.pages.latestPosts.main = { //Check if there aren't any post to display if(list.length == 0){ //Display message - var message = ComunicWeb.common.messages.createCalloutElem("No post to display", "Posts from you and your friend will appear here...", "info"); + var message = ComunicWeb.common.messages.createCalloutElem(lang("page_latest_posts_notice_no_post_title"), lang("page_latest_posts_notice_no_posts_message"), "info"); message.className += " noLatestPosts"; target.appendChild(message); }