From 46b48df966d772f4b9cffc683f831d0d84247fa0 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 3 Feb 2017 10:48:15 +0100 Subject: [PATCH] Don't display 'Hello null' if we can't get the account name --- customize.dist/main.js | 6 +++++- customize.dist/translations/messages.fr.js | 1 + customize.dist/translations/messages.js | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/customize.dist/main.js b/customize.dist/main.js index ba0626853..aad572107 100644 --- a/customize.dist/main.js +++ b/customize.dist/main.js @@ -35,7 +35,11 @@ define([ var $hello = $loggedInBlock.find('#loggedInHello'); var $logout = $loggedInBlock.find('#loggedInLogOut'); - $hello.text(Messages._getKey('login_hello', [name])); + if (name) { + $hello.text(Messages._getKey('login_hello', [name])); + } else { + $hello.text(Messages.login_helloNoName); + } $('#buttons').find('.nologin').hide(); $logout.click(function () { diff --git a/customize.dist/translations/messages.fr.js b/customize.dist/translations/messages.fr.js index 071791fb9..d616ec69a 100644 --- a/customize.dist/translations/messages.fr.js +++ b/customize.dist/translations/messages.fr.js @@ -280,6 +280,7 @@ define(function () { out.loginText = '

Votre nom d\'utilisateur et votre mot d epasse sont utilisés pour générer une clé unique qui reste inconnue de notre serveur.

\n' + '

Faîtes attention de ne pas perdre vos identifiants, puisqu\'il est impossible de les récupérer

'; out.login_hello = 'Bonjour {0},'; // {0} is the username + out.login_helloNoName = 'Bonjour,'; out.login_accessDrive = 'Accédez à votre drive'; // index.html diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js index 29bee7bd3..ee90a5993 100644 --- a/customize.dist/translations/messages.js +++ b/customize.dist/translations/messages.js @@ -282,6 +282,7 @@ define(function () { out.loginText = '

Your username and password are used to generate a unique key which is never known by our server.

\n' + '

Be careful not to forget your credentials, as they are impossible to recover

'; out.login_hello = 'Hello {0},'; // {0} is the username + out.login_helloNoName = 'Hello,'; out.login_accessDrive = 'Access your drive'; // index.html