[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": {
"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]" }
]
}
}

View File

@@ -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'
}
},

View File

@@ -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<AppStore>,
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 });
}
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -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": {

View File

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

View File

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

View File

@@ -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",

View File

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

View File

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

View File

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

View File

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

View File

@@ -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",

View File

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

View File

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

View File

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

View File

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