From 07bad7754735f7ca29690010f31cbb15081006f2 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Fri, 10 Feb 2017 11:22:25 +0000 Subject: [PATCH] i18n fixes (#1614) * i18n fixes - fix issue with default (fallback) language set to browser language - fix issue with fallback language loading when browser language set to non-English locale * code and UI fixes - move document list i18n strings into own scope - replace MDL menu with @angular/material menu (fixes issue with menu items translation, not supported by MDL) - minor improvements * fix unit tests * improve i18n docs and code - provide basic documentation for Translation service - remove custom Login component localisation in favour of documentation sample - simplified i18n setup for demo shell (single path for dev/prod env) * remove unnecessary comments --- demo-shell-ng2/app/app.component.html | 8 +- demo-shell-ng2/app/app.component.ts | 10 +-- demo-shell-ng2/config/webpack.prod.js | 4 +- .../alfresco-login/i18n/en.json | 29 ------- .../alfresco-login/i18n/it.json | 28 ------ .../i18n/en.json | 0 .../i18n/it.json | 0 .../activiti-checklist.component.spec.ts | 2 +- .../activiti-people-search.component.spec.ts | 2 +- .../activiti-people.component.spec.ts | 2 +- .../activiti-start-task.component.spec.ts | 2 +- .../activiti-task-details.component.spec.ts | 2 +- .../activiti-task-header.component.spec.ts | 2 +- ng2-components/ng2-alfresco-core/README.md | 85 ++++++++++++++----- .../alfresco-translate-loader.service.ts | 5 +- .../services/alfresco-translation.service.ts | 27 ++++-- .../document-menu-action.component.css | 66 -------------- .../document-menu-action.component.html | 29 +++---- .../src/i18n/en.json | 26 ++---- .../src/i18n/ru.json | 26 ++---- 20 files changed, 127 insertions(+), 228 deletions(-) delete mode 100644 demo-shell-ng2/custom-translation/alfresco-login/i18n/en.json delete mode 100644 demo-shell-ng2/custom-translation/alfresco-login/i18n/it.json rename demo-shell-ng2/{custom-translation => resources}/i18n/en.json (100%) rename demo-shell-ng2/{custom-translation => resources}/i18n/it.json (100%) diff --git a/demo-shell-ng2/app/app.component.html b/demo-shell-ng2/app/app.component.html index aeee137ec9..467a68c3d0 100644 --- a/demo-shell-ng2/app/app.component.html +++ b/demo-shell-ng2/app/app.component.html @@ -39,14 +39,14 @@ - - - - + + + + Components