From 927e5232da63b3daec05beec6bd5d21917757559 Mon Sep 17 00:00:00 2001 From: Suzana Dirla Date: Wed, 27 Mar 2019 15:35:11 +0200 Subject: [PATCH] [ACA-2265] All labels should be translated (#1047) * [ACA-2265] add missing translation keys * [ACA-2265] translatable copyright text * [ACA-2265] translatable 'by {{user}}' * [ACA-2265] translate special strings from location * [ACA-2265] translate special strings from location - fix failing e2e test C280499 * [ACA-2265] use translation string from 'LABEL' - fixes issue [ACA-2072] bcs. it shows "File Libraries" text on breadcrumb as on site-dropdown --- src/app.config.json | 20 ++++++++--------- src/app/app.routes.ts | 4 ++-- .../location-link/location-link.component.ts | 22 +++++++++++++------ src/app/components/login/login.component.html | 2 +- .../search-results-row.component.html | 3 +-- src/assets/i18n/ar.json | 4 ++-- src/assets/i18n/cs.json | 4 ++-- src/assets/i18n/da.json | 4 ++-- src/assets/i18n/de.json | 4 ++-- src/assets/i18n/en.json | 17 +++++++++++++- src/assets/i18n/es.json | 4 ++-- src/assets/i18n/fi.json | 4 ++-- src/assets/i18n/fr.json | 4 ++-- src/assets/i18n/it.json | 4 ++-- src/assets/i18n/ja.json | 4 ++-- src/assets/i18n/nb.json | 4 ++-- src/assets/i18n/nl.json | 4 ++-- src/assets/i18n/pl.json | 4 ++-- src/assets/i18n/pt-BR.json | 4 ++-- src/assets/i18n/ru.json | 4 ++-- src/assets/i18n/sv.json | 4 ++-- src/assets/i18n/zh-CN.json | 4 ++-- 22 files changed, 77 insertions(+), 55 deletions(-) diff --git a/src/app.config.json b/src/app.config.json index 90d9ebb3d..66dee3232 100644 --- a/src/app.config.json +++ b/src/app.config.json @@ -18,7 +18,7 @@ "application": { "name": "Alfresco Content Application", "logo": "assets/images/alfresco-logo-flower.svg", - "copyright": "© 2017 - 2019 Alfresco Software, Inc. All rights reserved." + "copyright": "APP.COPYRIGHT" }, "headerColor": "#2196F3", "languagePicker": false, @@ -263,21 +263,21 @@ "expanded": true, "mincount": 0, "queries": [ - { "label": "Today", "query": "cm:modified:[TODAY to TODAY]" }, + { "label": "SEARCH.FACET_QUERIES.TODAY", "query": "cm:modified:[TODAY to TODAY]" }, { - "label": "This week", + "label": "SEARCH.FACET_QUERIES.THIS_WEEK", "query": "cm:modified:[NOW/DAY-7DAYS TO NOW/DAY+1DAY]" }, { - "label": "This month", + "label": "SEARCH.FACET_QUERIES.THIS_MONTH", "query": "cm:modified:[NOW/DAY-1MONTH TO NOW/DAY+1DAY]" }, { - "label": "In the last 6 months", + "label": "SEARCH.FACET_QUERIES.LAST_6_MONTHS", "query": "cm:modified:[NOW/DAY-6MONTHS TO NOW/DAY+1DAY]" }, { - "label": "This year", + "label": "SEARCH.FACET_QUERIES.THIS_YEAR", "query": "cm:modified:[NOW/DAY-1YEAR TO NOW/DAY+1DAY]" } ] @@ -291,16 +291,16 @@ "selector": "check-list", "settings": { "options": [ - { "name": "Small", "value": "content.size:[0 TO 1048576>" }, + { "name": "SEARCH.CATEGORIES.SIZE_OPTIONS.SMALL", "value": "content.size:[0 TO 1048576>" }, { - "name": "Medium", + "name": "SEARCH.CATEGORIES.SIZE_OPTIONS.MEDIUM", "value": "content.size:[1048576 TO 52428800]" }, { - "name": "Large", + "name": "SEARCH.CATEGORIES.SIZE_OPTIONS.LARGE", "value": "content.size:<52428800 TO 524288000]" }, - { "name": "Huge", "value": "content.size:<524288000 TO MAX]" } + { "name": "SEARCH.CATEGORIES.SIZE_OPTIONS.HUGE", "value": "content.size:<524288000 TO MAX]" } ] } } diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts index 9e2ca6907..c9986fafe 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -85,7 +85,7 @@ export const APP_ROUTES: Routes = [ path: '', component: LibrariesComponent, data: { - title: 'APP.BROWSE.LIBRARIES.TITLE', + title: 'APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.TITLE', sortingPreferenceKey: 'libraries' } }, @@ -93,7 +93,7 @@ export const APP_ROUTES: Routes = [ path: ':folderId', component: FilesComponent, data: { - title: 'APP.BROWSE.LIBRARIES.TITLE', + title: 'APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.TITLE', sortingPreferenceKey: 'libraries-files' } }, diff --git a/src/app/components/common/location-link/location-link.component.ts b/src/app/components/common/location-link/location-link.component.ts index 6a0280d99..317f474d8 100644 --- a/src/app/components/common/location-link/location-link.component.ts +++ b/src/app/components/common/location-link/location-link.component.ts @@ -38,6 +38,7 @@ import { Store } from '@ngrx/store'; import { AppStore } from '../../../store/states/app.state'; import { NavigateToParentFolder } from '../../../store/actions'; import { ContentApiService } from '../../../services/content-api.service'; +import { TranslationService } from '@alfresco/adf-core'; @Component({ selector: 'aca-location-link', @@ -74,7 +75,8 @@ export class LocationLinkComponent implements OnInit { constructor( private store: Store, - private contentApi: ContentApiService + private contentApi: ContentApiService, + private translationService: TranslationService ) {} goToLocation() { @@ -106,7 +108,7 @@ export class LocationLinkComponent implements OnInit { // for admin users if (elements.length === 1 && elements[0] === 'Company Home') { - return of('Personal Files'); + return of('APP.BROWSE.PERSONAL.TITLE'); } // for non-admin users @@ -115,7 +117,7 @@ export class LocationLinkComponent implements OnInit { elements[0] === 'Company Home' && elements[1] === 'User Homes' ) { - return of('Personal Files'); + return of('APP.BROWSE.PERSONAL.TITLE'); } const result = elements[elements.length - 1]; @@ -151,9 +153,15 @@ export class LocationLinkComponent implements OnInit { let result: string = null; const elements = path.elements.map(e => Object.assign({}, e)); + const personalFiles = this.translationService.instant( + 'APP.BROWSE.PERSONAL.TITLE' + ); + const fileLibraries = this.translationService.instant( + 'APP.BROWSE.LIBRARIES.TITLE' + ); if (elements[0].name === 'Company Home') { - elements[0].name = 'Personal Files'; + elements[0].name = personalFiles; if (elements.length > 2) { if (elements[1].name === 'Sites') { @@ -164,14 +172,14 @@ export class LocationLinkComponent implements OnInit { elements[0].name = node.properties['cm:title'] || node.name || fragment.name; elements.splice(1, 1); - elements.unshift({ id: null, name: 'File Libraries' }); + elements.unshift({ id: null, name: fileLibraries }); result = elements.map(e => e.name).join('/'); this.nodeLocation$.next(result); }, () => { elements.splice(0, 2); - elements.unshift({ id: null, name: 'File Libraries' }); + elements.unshift({ id: null, name: fileLibraries }); elements.splice(2, 1); result = elements.map(e => e.name).join('/'); @@ -182,7 +190,7 @@ export class LocationLinkComponent implements OnInit { if (elements[1].name === 'User Homes') { elements.splice(0, 3); - elements.unshift({ id: null, name: 'Personal Files' }); + elements.unshift({ id: null, name: personalFiles }); } } } diff --git a/src/app/components/login/login.component.html b/src/app/components/login/login.component.html index 841261a95..c2dd3cdad 100644 --- a/src/app/components/login/login.component.html +++ b/src/app/components/login/login.component.html @@ -1,5 +1,5 @@ {{ 'APP.BROWSE.SEARCH.CUSTOM_ROW.MODIFIED' | translate }}: {{ modifiedAt | date: 'medium' }} - - by {{ user }} + {{ 'APP.BROWSE.SEARCH.CUSTOM_ROW.BY_USER' | translate: { user: user } }} | {{ 'APP.BROWSE.SEARCH.CUSTOM_ROW.SIZE' | translate }}: diff --git a/src/assets/i18n/ar.json b/src/assets/i18n/ar.json index 81170fa4d..822e47818 100644 --- a/src/assets/i18n/ar.json +++ b/src/assets/i18n/ar.json @@ -77,7 +77,7 @@ } }, "LIBRARIES": { - "TITLE": "مكتباتي", + "TITLE": "مكتبات الملفات", "DESCRIPTION": "الوصول إلى مكتبات الملفات", "SIDENAV_LINK": { "LABEL": "مكتبات الملفات", @@ -484,4 +484,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/assets/i18n/cs.json b/src/assets/i18n/cs.json index 2d1e9a38a..8af664d92 100644 --- a/src/assets/i18n/cs.json +++ b/src/assets/i18n/cs.json @@ -77,7 +77,7 @@ } }, "LIBRARIES": { - "TITLE": "Moje knihovny", + "TITLE": "Knihovny souborů", "DESCRIPTION": "Přejít na knihovny souborů", "SIDENAV_LINK": { "LABEL": "Knihovny souborů", @@ -484,4 +484,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/assets/i18n/da.json b/src/assets/i18n/da.json index 74a5d6354..83e6b66a2 100644 --- a/src/assets/i18n/da.json +++ b/src/assets/i18n/da.json @@ -77,7 +77,7 @@ } }, "LIBRARIES": { - "TITLE": "Mine biblioteker", + "TITLE": "Filbiblioteker", "DESCRIPTION": "Adgang til filbiblioteker", "SIDENAV_LINK": { "LABEL": "Filbiblioteker", @@ -484,4 +484,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/assets/i18n/de.json b/src/assets/i18n/de.json index ee233c81a..ef27c46ba 100644 --- a/src/assets/i18n/de.json +++ b/src/assets/i18n/de.json @@ -77,7 +77,7 @@ } }, "LIBRARIES": { - "TITLE": "Meine Bibliotheken", + "TITLE": "Dateibibliotheken", "DESCRIPTION": "Auf Dateibibliotheken zugreifen", "SIDENAV_LINK": { "LABEL": "Dateibibliotheken", @@ -484,4 +484,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 6c0e04755..c68965132 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -1,5 +1,6 @@ { "APP": { + "COPYRIGHT": "© 2017 - 2019 Alfresco Software, Inc. All rights reserved.", "ABOUT": { "VERSION": "Version:", "PLUGINS": { @@ -77,7 +78,7 @@ } }, "LIBRARIES": { - "TITLE": "My Libraries", + "TITLE": "File Libraries", "DESCRIPTION": "Access File Libraries", "SIDENAV_LINK": { "LABEL": "File Libraries", @@ -164,6 +165,7 @@ "FOUND_ONE_RESULT": "{{ number }} result found", "CUSTOM_ROW": { "MODIFIED": "Modified", + "BY_USER": "by {{ user }}", "LOCATION": "Location", "SIZE": "Size" }, @@ -456,7 +458,20 @@ "CATEGORIES": { "MODIFIED_DATE": "Modified date", "SIZE": "Size", + "SIZE_OPTIONS": { + "SMALL": "Small", + "MEDIUM": "Medium", + "LARGE": "Large", + "HUGE": "Huge" + }, "CREATED_DATE": "Created date" + }, + "FACET_QUERIES": { + "TODAY": "Today", + "THIS_WEEK": "This week", + "THIS_MONTH": "This month", + "LAST_6_MONTHS": "In the last 6 months", + "THIS_YEAR": "This year" } }, "CORE": { diff --git a/src/assets/i18n/es.json b/src/assets/i18n/es.json index 38da308f6..2311c409a 100644 --- a/src/assets/i18n/es.json +++ b/src/assets/i18n/es.json @@ -77,7 +77,7 @@ } }, "LIBRARIES": { - "TITLE": "Mis bibliotecas", + "TITLE": "Bibliotecas de ficheros", "DESCRIPTION": "Acceder a bibliotecas de ficheros", "SIDENAV_LINK": { "LABEL": "Bibliotecas de ficheros", @@ -484,4 +484,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/assets/i18n/fi.json b/src/assets/i18n/fi.json index 12a2762d4..69a88bd3c 100644 --- a/src/assets/i18n/fi.json +++ b/src/assets/i18n/fi.json @@ -77,7 +77,7 @@ } }, "LIBRARIES": { - "TITLE": "Omat kirjastot", + "TITLE": "Tiedostokirjastot", "DESCRIPTION": "Käytä tiedostokirjastoja", "SIDENAV_LINK": { "LABEL": "Tiedostokirjastot", @@ -484,4 +484,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/assets/i18n/fr.json b/src/assets/i18n/fr.json index 297418d5a..0c63e5631 100644 --- a/src/assets/i18n/fr.json +++ b/src/assets/i18n/fr.json @@ -77,7 +77,7 @@ } }, "LIBRARIES": { - "TITLE": "Mes bibliothèques", + "TITLE": "Bibliothèques de fichiers", "DESCRIPTION": "Accéder aux bibliothèques de fichiers", "SIDENAV_LINK": { "LABEL": "Bibliothèques de fichiers", @@ -484,4 +484,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/assets/i18n/it.json b/src/assets/i18n/it.json index 1bd51a2c0..8661bc27f 100644 --- a/src/assets/i18n/it.json +++ b/src/assets/i18n/it.json @@ -77,7 +77,7 @@ } }, "LIBRARIES": { - "TITLE": "Le mie raccolte", + "TITLE": "Raccolte file", "DESCRIPTION": "Accedi alle raccolte di file", "SIDENAV_LINK": { "LABEL": "Raccolte file", @@ -484,4 +484,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/assets/i18n/ja.json b/src/assets/i18n/ja.json index 97cb6c6c7..0ba0f8e0a 100644 --- a/src/assets/i18n/ja.json +++ b/src/assets/i18n/ja.json @@ -77,7 +77,7 @@ } }, "LIBRARIES": { - "TITLE": "あなたのライブラリ", + "TITLE": "ファイルライブラリ", "DESCRIPTION": "ファイルライブラリにアクセスします", "SIDENAV_LINK": { "LABEL": "ファイルライブラリ", @@ -484,4 +484,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/assets/i18n/nb.json b/src/assets/i18n/nb.json index 088ba6fcc..dc0008e88 100644 --- a/src/assets/i18n/nb.json +++ b/src/assets/i18n/nb.json @@ -77,7 +77,7 @@ } }, "LIBRARIES": { - "TITLE": "Mine biblioteker", + "TITLE": "Filbiblioteker", "DESCRIPTION": "Gå til filbiblioteker", "SIDENAV_LINK": { "LABEL": "Filbiblioteker", @@ -484,4 +484,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/assets/i18n/nl.json b/src/assets/i18n/nl.json index e8224449a..a36c75098 100644 --- a/src/assets/i18n/nl.json +++ b/src/assets/i18n/nl.json @@ -77,7 +77,7 @@ } }, "LIBRARIES": { - "TITLE": "Mijn bibliotheken", + "TITLE": "Bestandsbibliotheken", "DESCRIPTION": "Toegang krijgen tot bestandsbibliotheken", "SIDENAV_LINK": { "LABEL": "Bestandsbibliotheken", @@ -484,4 +484,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/assets/i18n/pl.json b/src/assets/i18n/pl.json index 08be18a0f..c89a4b533 100644 --- a/src/assets/i18n/pl.json +++ b/src/assets/i18n/pl.json @@ -77,7 +77,7 @@ } }, "LIBRARIES": { - "TITLE": "Moje biblioteki", + "TITLE": "Biblioteki plików", "DESCRIPTION": "Uzyskaj dostęp do bibliotek plików", "SIDENAV_LINK": { "LABEL": "Biblioteki plików", @@ -484,4 +484,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/assets/i18n/pt-BR.json b/src/assets/i18n/pt-BR.json index 51fcb4f5b..fb871726f 100644 --- a/src/assets/i18n/pt-BR.json +++ b/src/assets/i18n/pt-BR.json @@ -77,7 +77,7 @@ } }, "LIBRARIES": { - "TITLE": "Minhas bibliotecas", + "TITLE": "Bibliotecas de arquivos", "DESCRIPTION": "Acessar bibliotecas de arquivos", "SIDENAV_LINK": { "LABEL": "Bibliotecas de arquivos", @@ -484,4 +484,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/assets/i18n/ru.json b/src/assets/i18n/ru.json index 60cfc3975..59d69ef40 100644 --- a/src/assets/i18n/ru.json +++ b/src/assets/i18n/ru.json @@ -77,7 +77,7 @@ } }, "LIBRARIES": { - "TITLE": "Мои библиотеки", + "TITLE": "Библиотеки файлов", "DESCRIPTION": "Библиотеки файлов доступа", "SIDENAV_LINK": { "LABEL": "Библиотеки файлов", @@ -484,4 +484,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/assets/i18n/sv.json b/src/assets/i18n/sv.json index 6694c6872..f6a1aad31 100644 --- a/src/assets/i18n/sv.json +++ b/src/assets/i18n/sv.json @@ -77,7 +77,7 @@ } }, "LIBRARIES": { - "TITLE": "Mina bibliotek", + "TITLE": "Filbibliotek", "DESCRIPTION": "Gå till filbibliotek", "SIDENAV_LINK": { "LABEL": "Filbibliotek", @@ -484,4 +484,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/assets/i18n/zh-CN.json b/src/assets/i18n/zh-CN.json index 6833befa8..03cd2692a 100644 --- a/src/assets/i18n/zh-CN.json +++ b/src/assets/i18n/zh-CN.json @@ -77,7 +77,7 @@ } }, "LIBRARIES": { - "TITLE": "我的库", + "TITLE": "文件库", "DESCRIPTION": "访问文件库", "SIDENAV_LINK": { "LABEL": "文件库", @@ -484,4 +484,4 @@ } } } -} \ No newline at end of file +}