From 2a6ef8bf51d190f2ff591a50bf41e96a5b5eb84c Mon Sep 17 00:00:00 2001 From: mauriziovitale84 Date: Wed, 23 Nov 2016 17:34:04 +0000 Subject: [PATCH] #1076 Fix demo shell translation --- demo-shell-ng2/app/app.component.ts | 3 ++- .../alfresco-login/i18n/en.json | 26 +++++++++++++++++++ .../alfresco-login/i18n/it.json | 25 ++++++++++++++++++ .../{ => custom-translation}/i18n/en.json | 0 .../{ => custom-translation}/i18n/it.json | 2 ++ 5 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 demo-shell-ng2/custom-translation/alfresco-login/i18n/en.json create mode 100644 demo-shell-ng2/custom-translation/alfresco-login/i18n/it.json rename demo-shell-ng2/{ => custom-translation}/i18n/en.json (100%) rename demo-shell-ng2/{ => custom-translation}/i18n/it.json (99%) diff --git a/demo-shell-ng2/app/app.component.ts b/demo-shell-ng2/app/app.component.ts index 2b1e360ca4..56fa921738 100644 --- a/demo-shell-ng2/app/app.component.ts +++ b/demo-shell-ng2/app/app.component.ts @@ -46,7 +46,8 @@ export class AppComponent { this.setProvider(); if (translate) { - translate.addTranslationFolder(); + translate.addTranslationFolder('custom', 'custom-translation/'); + // translate.addTranslationFolder('ng2-alfresco-login', 'custom-translation/alfresco-login'); } } diff --git a/demo-shell-ng2/custom-translation/alfresco-login/i18n/en.json b/demo-shell-ng2/custom-translation/alfresco-login/i18n/en.json new file mode 100644 index 0000000000..d1c2ce0f82 --- /dev/null +++ b/demo-shell-ng2/custom-translation/alfresco-login/i18n/en.json @@ -0,0 +1,26 @@ +{ + "LOGIN": { + "LOGO": "Alfresco", + "LABEL": { + "LOGIN": "Login", + "USERNAME": "Custom Username", + "PASSWORD": "Custom Password", + "REMEMBER": "Remember" + }, + "MESSAGES": { + "USERNAME-REQUIRED": "Required", + "USERNAME-MIN": "Your username needs to be at least 4 characters.", + "PASSWORD-REQUIRED": "Enter your password to sign in", + "LOGIN-ERROR-CREDENTIALS": "You have entered an invalid username or password", + "LOGIN-ERROR-PROVIDERS": "Providers cannot be undefined", + "LOGIN-SUCCESS": "Login successful" + }, + "BUTTON": { + "LOGIN": "SIGN IN" + }, + "ACTION": { + "HELP": "NEED HELP?", + "REGISTER": "REGISTER" + } + } +} diff --git a/demo-shell-ng2/custom-translation/alfresco-login/i18n/it.json b/demo-shell-ng2/custom-translation/alfresco-login/i18n/it.json new file mode 100644 index 0000000000..c274b00912 --- /dev/null +++ b/demo-shell-ng2/custom-translation/alfresco-login/i18n/it.json @@ -0,0 +1,25 @@ +{ + "LOGIN": { + "LABEL": { + "LOGIN": "Autenticazione", + "USERNAME": "Nome utente", + "PASSWORD": "Password", + "REMEMBER": "Ricordami" + }, + "MESSAGES": { + "USERNAME-REQUIRED": "Campo obbligatorio", + "USERNAME-MIN": "Inserire un nome utente di minimo 4 caratteri.", + "PASSWORD-REQUIRED": "Campo obbligatorio", + "LOGIN-ERROR-CREDENTIALS": "Nome utente o password non validi", + "LOGIN-ERROR-PROVIDERS": "Providers non può essere nullo", + "LOGIN-SUCCESS": "Login effettuata con successo" + }, + "BUTTON": { + "LOGIN": "Accedi" + }, + "ACTION": { + "HELP": "BISOGNO DI AIUTO?", + "REGISTER": "REGISTRATI" + } + } +} \ No newline at end of file diff --git a/demo-shell-ng2/i18n/en.json b/demo-shell-ng2/custom-translation/i18n/en.json similarity index 100% rename from demo-shell-ng2/i18n/en.json rename to demo-shell-ng2/custom-translation/i18n/en.json diff --git a/demo-shell-ng2/i18n/it.json b/demo-shell-ng2/custom-translation/i18n/it.json similarity index 99% rename from demo-shell-ng2/i18n/it.json rename to demo-shell-ng2/custom-translation/i18n/it.json index a1a8da6877..bd5e5efc77 100644 --- a/demo-shell-ng2/i18n/it.json +++ b/demo-shell-ng2/custom-translation/i18n/it.json @@ -20,4 +20,6 @@ } } + + }