From 6fa2123d57f0bcf923093ccae2dede9dd3eb729f Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 4 Aug 2018 09:24:46 +0200 Subject: [PATCH] Translated user page posts section. --- assets/js/langs/en.inc.js | 6 ++++++ assets/js/pages/userPage/posts.js | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/assets/js/langs/en.inc.js b/assets/js/langs/en.inc.js index 70fe2127..d9e88ec5 100644 --- a/assets/js/langs/en.inc.js +++ b/assets/js/langs/en.inc.js @@ -135,4 +135,10 @@ ComunicWeb.common.langs.en = { user_page_profile_info_note: "Note", user_page_profile_info_membership: "Membership", user_page_profile_info_member_for: "Member for %p", + + //User page - posts section + user_page_posts_loading: "Loading posts...", + user_page_posts_err_get_posts: "Couldn't get user posts!", + user_page_posts_notice_no_posts_title: "No post yet", + user_page_posts_notice_no_posts_message: "Nobody has posted a message on this page yet.", } \ No newline at end of file diff --git a/assets/js/pages/userPage/posts.js b/assets/js/pages/userPage/posts.js index 069836f7..3491bb72 100644 --- a/assets/js/pages/userPage/posts.js +++ b/assets/js/pages/userPage/posts.js @@ -46,7 +46,7 @@ ComunicWeb.pages.userPage.posts = { var loadingMsg = createElem2({ appendTo: postsBody, type: "p", - innerHTML: "Loading posts..." + innerHTML: lang("user_page_posts_loading") }); loadingMsg.style.textAlign = "center"; @@ -95,7 +95,7 @@ ComunicWeb.pages.userPage.posts = { //Check for errors if(result.error){ //Display notification - ComunicWeb.common.notificationSystem.showNotification("Couldn't get user posts!", "danger", 4, "Error"); + ComunicWeb.common.notificationSystem.showNotification(lang("user_page_posts_err_get_posts"), "danger", 4, "Error"); } else { @@ -158,14 +158,14 @@ ComunicWeb.pages.userPage.posts = { var msgTitle = createElem2({ appendTo: msgContainer, type: "h2", - innerHTML: "No post yet" + innerHTML: lang("user_page_posts_notice_no_posts_title") }); msgTitle.style.textAlign = "center"; var msgContent = createElem2({ appendTo: msgContainer, type: "p", - innerHTML: "Nobody has posted a message on this page yet." + innerHTML: lang("user_page_posts_notice_no_posts_message") }).style.textAlign = "center"; }