diff --git a/ng2-components/ng2-alfresco-login/i18n/en.json b/ng2-components/ng2-alfresco-login/i18n/en.json index d47fa0506c..d821ca2293 100644 --- a/ng2-components/ng2-alfresco-login/i18n/en.json +++ b/ng2-components/ng2-alfresco-login/i18n/en.json @@ -1,11 +1,19 @@ { - "title" : "Welcome", - "login" : "Login", - "username" : "Username", - "password" : "Password", - "input-required-message": "Required", - "input-min-message": "Your username needs to be at least 4 characters.", - "login-button": "Login", - "login-error-message": "You have entered an invalid username or password", - "login-success-message": "Login successful" -} \ No newline at end of file + "LOGIN": { + "LABEL": { + "LOGIN": "Login", + "USERNAME": "Username", + "PASSWORD": "Password" + }, + "MESSAGES": { + "USERNAME-REQUIRED": "Required", + "USERNAME-MIN": "Your username needs to be at least 4 characters.", + "PASSWORD-REQUIRED": "Required", + "LOGIN-ERROR": "You have entered an invalid username or password", + "LOGIN-SUCCESS": "Login successful" + }, + "BUTTON": { + "LOGIN": "Login" + } + } +} diff --git a/ng2-components/ng2-alfresco-login/i18n/it.json b/ng2-components/ng2-alfresco-login/i18n/it.json index 4de5c5d1e4..c0b6799b3f 100644 --- a/ng2-components/ng2-alfresco-login/i18n/it.json +++ b/ng2-components/ng2-alfresco-login/i18n/it.json @@ -1,11 +1,19 @@ { - "title" : "Benvenuto", - "login" : "Autenticazione", - "username" : "Nome utente", - "password" : "Password", - "input-required-message": "Campo obbligatorio", - "input-min-message": "Inserire un nome utente di 4 caratteri minimo.", - "login-button": "Accedi", - "login-error-message": "Nome utente o password non validi", - "login-success-message": "Login effettuata con successo" + "LOGIN": { + "LABEL": { + "LOGIN": "Autenticazione", + "USERNAME": "Nome utente", + "PASSWORD": "Password" + }, + "MESSAGES": { + "USERNAME-REQUIRED": "Campo obbligatorio", + "USERNAME-MIN": "Inserire un nome utente di minimo 4 caratteri.", + "PASSWORD-REQUIRED": "Campo obbligatorio", + "LOGIN-ERROR": "Nome utente o password non validi", + "LOGIN-SUCCESS": "Login effettuata con successo" + }, + "BUTTON": { + "LOGIN": "Accedi" + } + } } \ No newline at end of file diff --git a/ng2-components/ng2-alfresco-login/src/components/alfresco-login.html b/ng2-components/ng2-alfresco-login/src/components/alfresco-login.html index 890fa96c7d..5469bbc3c1 100644 --- a/ng2-components/ng2-alfresco-login/src/components/alfresco-login.html +++ b/ng2-components/ng2-alfresco-login/src/components/alfresco-login.html @@ -1,11 +1,11 @@
-

{{'login' | translate }}

+

{{'LOGIN.LABEL.LOGIN' | translate }}

- + {{formError.username | translate }} @@ -13,7 +13,7 @@
- + {{formError.password | translate }} @@ -21,9 +21,9 @@
- -
{{'login-error-message' | translate }}
-
{{'login-success-message' | translate }}
+ +
{{'LOGIN.MESSAGES.LOGIN-ERROR' | translate }}
+
{{'LOGIN.MESSAGES.LOGIN-SUCCESS' | translate }}
diff --git a/ng2-components/ng2-alfresco-login/src/components/alfresco-login.ts b/ng2-components/ng2-alfresco-login/src/components/alfresco-login.ts index 9712c0270a..a301c20dd8 100644 --- a/ng2-components/ng2-alfresco-login/src/components/alfresco-login.ts +++ b/ng2-components/ng2-alfresco-login/src/components/alfresco-login.ts @@ -73,11 +73,11 @@ export class AlfrescoLoginComponent { this._message = { 'username': { - 'required': 'input-required-message', - 'minlength': 'input-min-message' + 'required': 'LOGIN.MESSAGES.USERNAME-REQUIRED', + 'minlength': 'LOGIN.MESSAGES.USERNAME-MIN' }, 'password': { - 'required': 'input-required-message' + 'required': 'LOGIN.MESSAGES.PASSWORD-REQUIRED' } }; this.translationInit(translate);