From 06e45bb29e93cb0394dc01a9dcf014d807182a87 Mon Sep 17 00:00:00 2001 From: davidcanonieto Date: Fri, 21 Dec 2018 19:07:30 +0100 Subject: [PATCH] [ADF-3777] Add localization to About Page on Demo Shell (#4094) --- demo-shell/resources/i18n/en.json | 12 +++++++ .../app/components/about/about.component.html | 16 ++++----- lib/core/about/about.component.html | 2 +- lib/core/about/about.component.ts | 36 +++++++++---------- lib/core/i18n/en.json | 28 +++++++++++++++ 5 files changed, 67 insertions(+), 27 deletions(-) diff --git a/demo-shell/resources/i18n/en.json b/demo-shell/resources/i18n/en.json index 677df061c4..6afad3d402 100644 --- a/demo-shell/resources/i18n/en.json +++ b/demo-shell/resources/i18n/en.json @@ -279,5 +279,17 @@ }, "TASK_LIST_CLOUD_DEMO": { "CUSTOMIZE_FILTERS": "Customise your filter" + }, + "ABOUT": { + "TITLE": "Plugins", + "TABLE_HEADERS": { + "ID": "ID", + "NAME": "Name", + "VERSION": "Version", + "VENDOR": "Vendor", + "LICENSE": "License", + "RUNTIME": "Runtime", + "DESCRIPTION": "Description" + } } } diff --git a/demo-shell/src/app/components/about/about.component.html b/demo-shell/src/app/components/about/about.component.html index 71ce0074a2..0bd13a53e3 100644 --- a/demo-shell/src/app/components/about/about.component.html +++ b/demo-shell/src/app/components/about/about.component.html @@ -1,45 +1,45 @@ -

Plugins

+

{{ 'ABOUT.TITLE' | translate }}

- ID + {{ 'ABOUT.TABLE_HEADERS.ID' | translate }} {{element.$id}} - Name + {{ 'ABOUT.TABLE_HEADERS.NAME' | translate }} {{element.$name}} - Version + {{ 'ABOUT.TABLE_HEADERS.VERSION' | translate }} {{element.$version}} - Vendor + {{ 'ABOUT.TABLE_HEADERS.VENDOR' | translate }} {{element.$vendor}} - License + {{ 'ABOUT.TABLE_HEADERS.LICENSE' | translate }} {{element.$license}} - Runtime + {{ 'ABOUT.TABLE_HEADERS.RUNTIME' | translate }} {{element.$runtime}} - Description + {{ 'ABOUT.TABLE_HEADERS.DESCRIPTION' | translate }} {{element.$description}} diff --git a/lib/core/about/about.component.html b/lib/core/about/about.component.html index 60753db1c8..7dfac38db3 100644 --- a/lib/core/about/about.component.html +++ b/lib/core/about/about.component.html @@ -11,7 +11,7 @@ -

Product Versions

+

{{ 'ABOUT.VERSIONS.TITLE' | translate }}

{{ 'ABOUT.VERSIONS.PROCESS_SERVICE' | translate }}

{{ bpmVersion.edition }} diff --git a/lib/core/about/about.component.ts b/lib/core/about/about.component.ts index a37b39f77d..0d92e33ffe 100644 --- a/lib/core/about/about.component.ts +++ b/lib/core/about/about.component.ts @@ -56,30 +56,30 @@ export class AboutComponent implements OnInit { this.ecmVersion = ecmVers; this.modules = new ObjectDataTableAdapter(this.ecmVersion.modules, [ - { type: 'text', key: 'id', title: 'ID', sortable: true }, - { type: 'text', key: 'title', title: 'Title', sortable: true }, - { type: 'text', key: 'version', title: 'Description', sortable: true }, - { type: 'text', key: 'installDate', title: 'Install Date', sortable: true }, - { type: 'text', key: 'installState', title: 'Install State', sortable: true }, - { type: 'text', key: 'versionMin', title: 'Version Minor', sortable: true }, - { type: 'text', key: 'versionMax', title: 'Version Max', sortable: true } + { type: 'text', key: 'id', title: 'ABOUT.TABLE_HEADERS.MODULES.ID', sortable: true }, + { type: 'text', key: 'title', title: 'ABOUT.TABLE_HEADERS.MODULES.TITLE', sortable: true }, + { type: 'text', key: 'version', title: 'ABOUT.TABLE_HEADERS.MODULES.DESCRIPTION', sortable: true }, + { type: 'text', key: 'installDate', title: 'ABOUT.TABLE_HEADERS.MODULES.INSTALL_DATE', sortable: true }, + { type: 'text', key: 'installState', title: 'ABOUT.TABLE_HEADERS.MODULES.INSTALL_STATE', sortable: true }, + { type: 'text', key: 'versionMin', title: 'ABOUT.TABLE_HEADERS.MODULES.VERSION_MIN', sortable: true }, + { type: 'text', key: 'versionMax', title: 'ABOUT.TABLE_HEADERS.MODULES.VERSION_MAX', sortable: true } ]); this.status = new ObjectDataTableAdapter([this.ecmVersion.status], [ - { type: 'text', key: 'isReadOnly', title: 'ReadOnly', sortable: true }, - { type: 'text', key: 'isAuditEnabled', title: 'Is Audit Enable', sortable: true }, - { type: 'text', key: 'isQuickShareEnabled', title: 'Is quick shared enable', sortable: true }, - { type: 'text', key: 'isThumbnailGenerationEnabled', title: 'Thumbnail Generation', sortable: true } + { type: 'text', key: 'isReadOnly', title: 'ABOUT.TABLE_HEADERS.STATUS.READ_ONLY', sortable: true }, + { type: 'text', key: 'isAuditEnabled', title: 'ABOUT.TABLE_HEADERS.STATUS.AUDIT_ENABLED', sortable: true }, + { type: 'text', key: 'isQuickShareEnabled', title: 'ABOUT.TABLE_HEADERS.STATUS.QUICK_SHARE_ENABLED', sortable: true }, + { type: 'text', key: 'isThumbnailGenerationEnabled', title: 'ABOUT.TABLE_HEADERS.STATUS.THUMBNAIL_ENABLED', sortable: true } ]); this.license = new ObjectDataTableAdapter([this.ecmVersion.license], [ - { type: 'text', key: 'issuedAt', title: 'Issued At', sortable: true }, - { type: 'text', key: 'expiresAt', title: 'Expires At', sortable: true }, - { type: 'text', key: 'remainingDays', title: 'Remaining Days', sortable: true }, - { type: 'text', key: 'holder', title: 'Holder', sortable: true }, - { type: 'text', key: 'mode', title: 'Mode', sortable: true }, - { type: 'text', key: 'isClusterEnabled', title: 'Is Cluster Enabled', sortable: true }, - { type: 'text', key: 'isCryptodocEnabled', title: 'Is Cryptodoc Enable', sortable: true } + { type: 'text', key: 'issuedAt', title: 'ABOUT.TABLE_HEADERS.LICENSE.ISSUES_AT', sortable: true }, + { type: 'text', key: 'expiresAt', title: 'ABOUT.TABLE_HEADERS.LICENSE.EXPIRES_AT', sortable: true }, + { type: 'text', key: 'remainingDays', title: 'ABOUT.TABLE_HEADERS.LICENSE.REMAINING_DAYS', sortable: true }, + { type: 'text', key: 'holder', title: 'ABOUT.TABLE_HEADERS.LICENSE.HOLDER', sortable: true }, + { type: 'text', key: 'mode', title: 'ABOUT.TABLE_HEADERS.LICENSE.MODE', sortable: true }, + { type: 'text', key: 'isClusterEnabled', title: 'ABOUT.TABLE_HEADERS.LICENSE.CLUSTER_ENABLED', sortable: true }, + { type: 'text', key: 'isCryptodocEnabled', title: 'ABOUT.TABLE_HEADERS.LICENSE.CRYPTODOC_ENABLED', sortable: true } ]); }); } diff --git a/lib/core/i18n/en.json b/lib/core/i18n/en.json index 7c81415a8c..c995ca2b5d 100644 --- a/lib/core/i18n/en.json +++ b/lib/core/i18n/en.json @@ -336,6 +336,7 @@ "PROCESS_SERVICE_HOST": "Alfresco Process Services URL: {{ value }}" }, "VERSIONS": { + "TITLE": "Product Versions", "CONTENT_SERVICE": "ECM", "PROCESS_SERVICE": "BPM", "LABELS": { @@ -353,6 +354,33 @@ "PACKAGES": { "TITLE": "Packages", "DESCRIPTION": "Current project is using the following ADF libraries:" + }, + "TABLE_HEADERS": { + "MODULES": { + "ID": "ID", + "TITLE": "Title", + "DESCRIPTION": "Description", + "INSTALL_DATE": "Install Date", + "INSTALL_STATE": "Install State", + "VERSION_MIN": "Version Minor", + "VERSION_MAX": "Version Max" + }, + "STATUS": { + "READ_ONLY": "ReadOnly", + "AUDIT_ENABLED": "Is Audit Enabled", + "QUICK_SHARE_ENABLED": "Is Quick Shared Enabled", + "THUMBNAIL_ENABLED": "Thumbnail Generation" + }, + "LICENSE": { + "ISSUES_AT": "Issued At", + "EXPIRES_AT": "Expires At", + "REMAINING_DAYS": "Remaining Days", + "HOLDER": "Holder", + "MODE": "Mode", + "CLUSTER_ENABLED": "Is Cluster Enabled", + "CRYPTODOC_ENABLED": "Is Cryptodoc Enabled" + } } + } }