Translated user page posts section.

This commit is contained in:
Pierre HUBERT 2018-08-04 09:24:46 +02:00
parent 536570abf1
commit 6fa2123d57
2 changed files with 10 additions and 4 deletions

View File

@ -135,4 +135,10 @@ ComunicWeb.common.langs.en = {
user_page_profile_info_note: "Note", user_page_profile_info_note: "Note",
user_page_profile_info_membership: "Membership", user_page_profile_info_membership: "Membership",
user_page_profile_info_member_for: "Member for %p", 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.",
} }

View File

@ -46,7 +46,7 @@ ComunicWeb.pages.userPage.posts = {
var loadingMsg = createElem2({ var loadingMsg = createElem2({
appendTo: postsBody, appendTo: postsBody,
type: "p", type: "p",
innerHTML: "Loading posts..." innerHTML: lang("user_page_posts_loading")
}); });
loadingMsg.style.textAlign = "center"; loadingMsg.style.textAlign = "center";
@ -95,7 +95,7 @@ ComunicWeb.pages.userPage.posts = {
//Check for errors //Check for errors
if(result.error){ if(result.error){
//Display notification //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 { else {
@ -158,14 +158,14 @@ ComunicWeb.pages.userPage.posts = {
var msgTitle = createElem2({ var msgTitle = createElem2({
appendTo: msgContainer, appendTo: msgContainer,
type: "h2", type: "h2",
innerHTML: "No post yet" innerHTML: lang("user_page_posts_notice_no_posts_title")
}); });
msgTitle.style.textAlign = "center"; msgTitle.style.textAlign = "center";
var msgContent = createElem2({ var msgContent = createElem2({
appendTo: msgContainer, appendTo: msgContainer,
type: "p", type: "p",
innerHTML: "Nobody has posted a message on this page yet." innerHTML: lang("user_page_posts_notice_no_posts_message")
}).style.textAlign = "center"; }).style.textAlign = "center";
} }