[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
This commit is contained in:
Suzana Dirla
2019-03-27 15:35:11 +02:00
committed by Denys Vuika
parent 9744c1618e
commit 927e5232da
22 changed files with 77 additions and 55 deletions

View File

@@ -18,7 +18,7 @@
"application": { "application": {
"name": "Alfresco Content Application", "name": "Alfresco Content Application",
"logo": "assets/images/alfresco-logo-flower.svg", "logo": "assets/images/alfresco-logo-flower.svg",
"copyright": "© 2017 - 2019 Alfresco Software, Inc. All rights reserved." "copyright": "APP.COPYRIGHT"
}, },
"headerColor": "#2196F3", "headerColor": "#2196F3",
"languagePicker": false, "languagePicker": false,
@@ -263,21 +263,21 @@
"expanded": true, "expanded": true,
"mincount": 0, "mincount": 0,
"queries": [ "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]" "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]" "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]" "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]" "query": "cm:modified:[NOW/DAY-1YEAR TO NOW/DAY+1DAY]"
} }
] ]
@@ -291,16 +291,16 @@
"selector": "check-list", "selector": "check-list",
"settings": { "settings": {
"options": [ "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]" "value": "content.size:[1048576 TO 52428800]"
}, },
{ {
"name": "Large", "name": "SEARCH.CATEGORIES.SIZE_OPTIONS.LARGE",
"value": "content.size:<52428800 TO 524288000]" "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]" }
] ]
} }
} }

View File

@@ -85,7 +85,7 @@ export const APP_ROUTES: Routes = [
path: '', path: '',
component: LibrariesComponent, component: LibrariesComponent,
data: { data: {
title: 'APP.BROWSE.LIBRARIES.TITLE', title: 'APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.TITLE',
sortingPreferenceKey: 'libraries' sortingPreferenceKey: 'libraries'
} }
}, },
@@ -93,7 +93,7 @@ export const APP_ROUTES: Routes = [
path: ':folderId', path: ':folderId',
component: FilesComponent, component: FilesComponent,
data: { data: {
title: 'APP.BROWSE.LIBRARIES.TITLE', title: 'APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.TITLE',
sortingPreferenceKey: 'libraries-files' sortingPreferenceKey: 'libraries-files'
} }
}, },

View File

@@ -38,6 +38,7 @@ import { Store } from '@ngrx/store';
import { AppStore } from '../../../store/states/app.state'; import { AppStore } from '../../../store/states/app.state';
import { NavigateToParentFolder } from '../../../store/actions'; import { NavigateToParentFolder } from '../../../store/actions';
import { ContentApiService } from '../../../services/content-api.service'; import { ContentApiService } from '../../../services/content-api.service';
import { TranslationService } from '@alfresco/adf-core';
@Component({ @Component({
selector: 'aca-location-link', selector: 'aca-location-link',
@@ -74,7 +75,8 @@ export class LocationLinkComponent implements OnInit {
constructor( constructor(
private store: Store<AppStore>, private store: Store<AppStore>,
private contentApi: ContentApiService private contentApi: ContentApiService,
private translationService: TranslationService
) {} ) {}
goToLocation() { goToLocation() {
@@ -106,7 +108,7 @@ export class LocationLinkComponent implements OnInit {
// for admin users // for admin users
if (elements.length === 1 && elements[0] === 'Company Home') { if (elements.length === 1 && elements[0] === 'Company Home') {
return of('Personal Files'); return of('APP.BROWSE.PERSONAL.TITLE');
} }
// for non-admin users // for non-admin users
@@ -115,7 +117,7 @@ export class LocationLinkComponent implements OnInit {
elements[0] === 'Company Home' && elements[0] === 'Company Home' &&
elements[1] === 'User Homes' elements[1] === 'User Homes'
) { ) {
return of('Personal Files'); return of('APP.BROWSE.PERSONAL.TITLE');
} }
const result = elements[elements.length - 1]; const result = elements[elements.length - 1];
@@ -151,9 +153,15 @@ export class LocationLinkComponent implements OnInit {
let result: string = null; let result: string = null;
const elements = path.elements.map(e => Object.assign({}, e)); 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') { if (elements[0].name === 'Company Home') {
elements[0].name = 'Personal Files'; elements[0].name = personalFiles;
if (elements.length > 2) { if (elements.length > 2) {
if (elements[1].name === 'Sites') { if (elements[1].name === 'Sites') {
@@ -164,14 +172,14 @@ export class LocationLinkComponent implements OnInit {
elements[0].name = elements[0].name =
node.properties['cm:title'] || node.name || fragment.name; node.properties['cm:title'] || node.name || fragment.name;
elements.splice(1, 1); elements.splice(1, 1);
elements.unshift({ id: null, name: 'File Libraries' }); elements.unshift({ id: null, name: fileLibraries });
result = elements.map(e => e.name).join('/'); result = elements.map(e => e.name).join('/');
this.nodeLocation$.next(result); this.nodeLocation$.next(result);
}, },
() => { () => {
elements.splice(0, 2); elements.splice(0, 2);
elements.unshift({ id: null, name: 'File Libraries' }); elements.unshift({ id: null, name: fileLibraries });
elements.splice(2, 1); elements.splice(2, 1);
result = elements.map(e => e.name).join('/'); result = elements.map(e => e.name).join('/');
@@ -182,7 +190,7 @@ export class LocationLinkComponent implements OnInit {
if (elements[1].name === 'User Homes') { if (elements[1].name === 'User Homes') {
elements.splice(0, 3); elements.splice(0, 3);
elements.unshift({ id: null, name: 'Personal Files' }); elements.unshift({ id: null, name: personalFiles });
} }
} }
} }

View File

@@ -1,5 +1,5 @@
<adf-login <adf-login
[copyrightText]="'application.copyright' | adfAppConfig" [copyrightText]="'application.copyright' | adfAppConfig | translate"
providers="ECM" providers="ECM"
successRoute="/personal-files" successRoute="/personal-files"
[logoImageUrl]="'./assets/images/alfresco-logo.svg'" [logoImageUrl]="'./assets/images/alfresco-logo.svg'"

View File

@@ -11,8 +11,7 @@
<div class="line"> <div class="line">
{{ 'APP.BROWSE.SEARCH.CUSTOM_ROW.MODIFIED' | translate }}: {{ 'APP.BROWSE.SEARCH.CUSTOM_ROW.MODIFIED' | translate }}:
{{ modifiedAt | date: 'medium' }} {{ modifiedAt | date: 'medium' }}
{{ 'APP.BROWSE.SEARCH.CUSTOM_ROW.BY_USER' | translate: { user: user } }}
by <span> {{ user }} </span>
<span *ngIf="size" <span *ngIf="size"
>| {{ 'APP.BROWSE.SEARCH.CUSTOM_ROW.SIZE' | translate }}: >| {{ 'APP.BROWSE.SEARCH.CUSTOM_ROW.SIZE' | translate }}:

View File

@@ -77,7 +77,7 @@
} }
}, },
"LIBRARIES": { "LIBRARIES": {
"TITLE": "مكتباتي", "TITLE": "مكتبات الملفات",
"DESCRIPTION": "الوصول إلى مكتبات الملفات", "DESCRIPTION": "الوصول إلى مكتبات الملفات",
"SIDENAV_LINK": { "SIDENAV_LINK": {
"LABEL": "مكتبات الملفات", "LABEL": "مكتبات الملفات",
@@ -484,4 +484,4 @@
} }
} }
} }
} }

View File

@@ -77,7 +77,7 @@
} }
}, },
"LIBRARIES": { "LIBRARIES": {
"TITLE": "Moje knihovny", "TITLE": "Knihovny souborů",
"DESCRIPTION": "Přejít na knihovny souborů", "DESCRIPTION": "Přejít na knihovny souborů",
"SIDENAV_LINK": { "SIDENAV_LINK": {
"LABEL": "Knihovny souborů", "LABEL": "Knihovny souborů",
@@ -484,4 +484,4 @@
} }
} }
} }
} }

View File

@@ -77,7 +77,7 @@
} }
}, },
"LIBRARIES": { "LIBRARIES": {
"TITLE": "Mine biblioteker", "TITLE": "Filbiblioteker",
"DESCRIPTION": "Adgang til filbiblioteker", "DESCRIPTION": "Adgang til filbiblioteker",
"SIDENAV_LINK": { "SIDENAV_LINK": {
"LABEL": "Filbiblioteker", "LABEL": "Filbiblioteker",
@@ -484,4 +484,4 @@
} }
} }
} }
} }

View File

@@ -77,7 +77,7 @@
} }
}, },
"LIBRARIES": { "LIBRARIES": {
"TITLE": "Meine Bibliotheken", "TITLE": "Dateibibliotheken",
"DESCRIPTION": "Auf Dateibibliotheken zugreifen", "DESCRIPTION": "Auf Dateibibliotheken zugreifen",
"SIDENAV_LINK": { "SIDENAV_LINK": {
"LABEL": "Dateibibliotheken", "LABEL": "Dateibibliotheken",
@@ -484,4 +484,4 @@
} }
} }
} }
} }

View File

@@ -1,5 +1,6 @@
{ {
"APP": { "APP": {
"COPYRIGHT": "© 2017 - 2019 Alfresco Software, Inc. All rights reserved.",
"ABOUT": { "ABOUT": {
"VERSION": "Version:", "VERSION": "Version:",
"PLUGINS": { "PLUGINS": {
@@ -77,7 +78,7 @@
} }
}, },
"LIBRARIES": { "LIBRARIES": {
"TITLE": "My Libraries", "TITLE": "File Libraries",
"DESCRIPTION": "Access File Libraries", "DESCRIPTION": "Access File Libraries",
"SIDENAV_LINK": { "SIDENAV_LINK": {
"LABEL": "File Libraries", "LABEL": "File Libraries",
@@ -164,6 +165,7 @@
"FOUND_ONE_RESULT": "{{ number }} result found", "FOUND_ONE_RESULT": "{{ number }} result found",
"CUSTOM_ROW": { "CUSTOM_ROW": {
"MODIFIED": "Modified", "MODIFIED": "Modified",
"BY_USER": "by {{ user }}",
"LOCATION": "Location", "LOCATION": "Location",
"SIZE": "Size" "SIZE": "Size"
}, },
@@ -456,7 +458,20 @@
"CATEGORIES": { "CATEGORIES": {
"MODIFIED_DATE": "Modified date", "MODIFIED_DATE": "Modified date",
"SIZE": "Size", "SIZE": "Size",
"SIZE_OPTIONS": {
"SMALL": "Small",
"MEDIUM": "Medium",
"LARGE": "Large",
"HUGE": "Huge"
},
"CREATED_DATE": "Created date" "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": { "CORE": {

View File

@@ -77,7 +77,7 @@
} }
}, },
"LIBRARIES": { "LIBRARIES": {
"TITLE": "Mis bibliotecas", "TITLE": "Bibliotecas de ficheros",
"DESCRIPTION": "Acceder a bibliotecas de ficheros", "DESCRIPTION": "Acceder a bibliotecas de ficheros",
"SIDENAV_LINK": { "SIDENAV_LINK": {
"LABEL": "Bibliotecas de ficheros", "LABEL": "Bibliotecas de ficheros",
@@ -484,4 +484,4 @@
} }
} }
} }
} }

View File

@@ -77,7 +77,7 @@
} }
}, },
"LIBRARIES": { "LIBRARIES": {
"TITLE": "Omat kirjastot", "TITLE": "Tiedostokirjastot",
"DESCRIPTION": "Käytä tiedostokirjastoja", "DESCRIPTION": "Käytä tiedostokirjastoja",
"SIDENAV_LINK": { "SIDENAV_LINK": {
"LABEL": "Tiedostokirjastot", "LABEL": "Tiedostokirjastot",
@@ -484,4 +484,4 @@
} }
} }
} }
} }

View File

@@ -77,7 +77,7 @@
} }
}, },
"LIBRARIES": { "LIBRARIES": {
"TITLE": "Mes bibliothèques", "TITLE": "Bibliothèques de fichiers",
"DESCRIPTION": "Accéder aux bibliothèques de fichiers", "DESCRIPTION": "Accéder aux bibliothèques de fichiers",
"SIDENAV_LINK": { "SIDENAV_LINK": {
"LABEL": "Bibliothèques de fichiers", "LABEL": "Bibliothèques de fichiers",
@@ -484,4 +484,4 @@
} }
} }
} }
} }

View File

@@ -77,7 +77,7 @@
} }
}, },
"LIBRARIES": { "LIBRARIES": {
"TITLE": "Le mie raccolte", "TITLE": "Raccolte file",
"DESCRIPTION": "Accedi alle raccolte di file", "DESCRIPTION": "Accedi alle raccolte di file",
"SIDENAV_LINK": { "SIDENAV_LINK": {
"LABEL": "Raccolte file", "LABEL": "Raccolte file",
@@ -484,4 +484,4 @@
} }
} }
} }
} }

View File

@@ -77,7 +77,7 @@
} }
}, },
"LIBRARIES": { "LIBRARIES": {
"TITLE": "あなたのライブラリ", "TITLE": "ファイルライブラリ",
"DESCRIPTION": "ファイルライブラリにアクセスします", "DESCRIPTION": "ファイルライブラリにアクセスします",
"SIDENAV_LINK": { "SIDENAV_LINK": {
"LABEL": "ファイルライブラリ", "LABEL": "ファイルライブラリ",
@@ -484,4 +484,4 @@
} }
} }
} }
} }

View File

@@ -77,7 +77,7 @@
} }
}, },
"LIBRARIES": { "LIBRARIES": {
"TITLE": "Mine biblioteker", "TITLE": "Filbiblioteker",
"DESCRIPTION": "Gå til filbiblioteker", "DESCRIPTION": "Gå til filbiblioteker",
"SIDENAV_LINK": { "SIDENAV_LINK": {
"LABEL": "Filbiblioteker", "LABEL": "Filbiblioteker",
@@ -484,4 +484,4 @@
} }
} }
} }
} }

View File

@@ -77,7 +77,7 @@
} }
}, },
"LIBRARIES": { "LIBRARIES": {
"TITLE": "Mijn bibliotheken", "TITLE": "Bestandsbibliotheken",
"DESCRIPTION": "Toegang krijgen tot bestandsbibliotheken", "DESCRIPTION": "Toegang krijgen tot bestandsbibliotheken",
"SIDENAV_LINK": { "SIDENAV_LINK": {
"LABEL": "Bestandsbibliotheken", "LABEL": "Bestandsbibliotheken",
@@ -484,4 +484,4 @@
} }
} }
} }
} }

View File

@@ -77,7 +77,7 @@
} }
}, },
"LIBRARIES": { "LIBRARIES": {
"TITLE": "Moje biblioteki", "TITLE": "Biblioteki plików",
"DESCRIPTION": "Uzyskaj dostęp do bibliotek plików", "DESCRIPTION": "Uzyskaj dostęp do bibliotek plików",
"SIDENAV_LINK": { "SIDENAV_LINK": {
"LABEL": "Biblioteki plików", "LABEL": "Biblioteki plików",
@@ -484,4 +484,4 @@
} }
} }
} }
} }

View File

@@ -77,7 +77,7 @@
} }
}, },
"LIBRARIES": { "LIBRARIES": {
"TITLE": "Minhas bibliotecas", "TITLE": "Bibliotecas de arquivos",
"DESCRIPTION": "Acessar bibliotecas de arquivos", "DESCRIPTION": "Acessar bibliotecas de arquivos",
"SIDENAV_LINK": { "SIDENAV_LINK": {
"LABEL": "Bibliotecas de arquivos", "LABEL": "Bibliotecas de arquivos",
@@ -484,4 +484,4 @@
} }
} }
} }
} }

View File

@@ -77,7 +77,7 @@
} }
}, },
"LIBRARIES": { "LIBRARIES": {
"TITLE": "Мои библиотеки", "TITLE": "Библиотеки файлов",
"DESCRIPTION": "Библиотеки файлов доступа", "DESCRIPTION": "Библиотеки файлов доступа",
"SIDENAV_LINK": { "SIDENAV_LINK": {
"LABEL": "Библиотеки файлов", "LABEL": "Библиотеки файлов",
@@ -484,4 +484,4 @@
} }
} }
} }
} }

View File

@@ -77,7 +77,7 @@
} }
}, },
"LIBRARIES": { "LIBRARIES": {
"TITLE": "Mina bibliotek", "TITLE": "Filbibliotek",
"DESCRIPTION": "Gå till filbibliotek", "DESCRIPTION": "Gå till filbibliotek",
"SIDENAV_LINK": { "SIDENAV_LINK": {
"LABEL": "Filbibliotek", "LABEL": "Filbibliotek",
@@ -484,4 +484,4 @@
} }
} }
} }
} }

View File

@@ -77,7 +77,7 @@
} }
}, },
"LIBRARIES": { "LIBRARIES": {
"TITLE": "我的库", "TITLE": "文件库",
"DESCRIPTION": "访问文件库", "DESCRIPTION": "访问文件库",
"SIDENAV_LINK": { "SIDENAV_LINK": {
"LABEL": "文件库", "LABEL": "文件库",
@@ -484,4 +484,4 @@
} }
} }
} }
} }