Translated menu bar

This commit is contained in:
Pierre 2018-03-11 16:55:44 +01:00
parent 6faa10c51a
commit 0fab71c348
3 changed files with 21 additions and 3 deletions

View File

@ -78,7 +78,7 @@ ComunicWeb.components.menuBar.authenticated = {
//Add logout link
var logoutButton = createElem("li", dropdownContent);
var logoutButtonLink = createElem("a", logoutButton);
logoutButtonLink.innerHTML = "Logout";
logoutButtonLink.innerHTML = lang("_menu_bar_action_logout");
logoutButton.onclick = function(){openPage("logout")};
//Return dropdown content element
@ -131,7 +131,7 @@ ComunicWeb.components.menuBar.authenticated = {
//Add user name
var userNameElem = createElem("span", userlinkelement);
userNameElem.className = "hidden-xs";
userNameElem.innerHTML = "Loading...";
userNameElem.innerHTML = lang("_loading");
//Make a request to get informations about the user
ComunicWeb.user.userInfos.getUserInfos("current", (function(userInfos){
@ -168,7 +168,7 @@ ComunicWeb.components.menuBar.authenticated = {
//Create search input
var searchInput = createElem("input", formGroup);
searchInput.className = "form-control";
searchInput.placeholder = "Search...";
searchInput.placeholder = lang("_menu_bar_search_placeholder");
searchInput.type = "text";
searchInput.id = "navbar-search-input";

View File

@ -5,6 +5,9 @@
*/
ComunicWeb.common.langs.en = {
//Really really common messages
_loading: "Loading...",
//Error messages
"__fatal_error": "Fatal error",
"__fatal_error_explanation": "A fatal error occured : <i>%p</i>. Please try to refresh the page...",
@ -23,4 +26,11 @@ ComunicWeb.common.langs.en = {
_menu_bar_login_btn: "Login",
_menu_bar_login_passwd: "Password",
_menu_bar_login_email: "Email address",
//Menu bar - authenticated
_menu_bar_search_placeholder: "Search...",
_menu_bar_action_logout: "Logout",
//Posts form
}

View File

@ -5,6 +5,9 @@
*/
ComunicWeb.common.langs.fr = {
//Really really common messages
_loading: "Chargement...",
//Error messages
"__fatal_error": "Erreur fatale",
"__fatal_error_explanation": "Une erreur fatale a survenue : <i>%p</i>. Veuillez réessayer de recharger la page...",
@ -23,4 +26,9 @@ ComunicWeb.common.langs.fr = {
_menu_bar_login_btn: "Connexion",
_menu_bar_login_passwd: "Mot de passe",
_menu_bar_login_email: "Addresse mail",
//Menu bar - authenticated
_menu_bar_search_placeholder: "Recherche...",
_menu_bar_action_logout: "Déconnexion",
}