From 529aea77b1ff7e0ee6cf762e0ac1fe58a73c1c9a Mon Sep 17 00:00:00 2001 From: Vito Date: Wed, 8 Jul 2020 09:10:00 +0100 Subject: [PATCH] [ADF-5178] - add translation for filters (#5843) --- demo-shell/src/app.config.json | 34 ++++++------------- lib/content-services/src/lib/i18n/en.json | 23 ++++++++++++- .../search-header.component.html | 2 +- .../search-text/search-text.component.html | 2 +- 4 files changed, 35 insertions(+), 26 deletions(-) diff --git a/demo-shell/src/app.config.json b/demo-shell/src/app.config.json index 70b878bd22..4bf4cace91 100644 --- a/demo-shell/src/app.config.json +++ b/demo-shell/src/app.config.json @@ -451,7 +451,7 @@ "categories": [ { "id": "queryName", - "name": "Name", + "name": "SEARCH.SEARCH_HEADER.FILTERS.NAME.TITLE", "columnKey": "name", "enabled": true, "component": { @@ -459,14 +459,14 @@ "settings": { "pattern": "cm:name:'(.*?)'", "field": "cm:name", - "placeholder": "Enter the name", + "placeholder": "SEARCH.SEARCH_HEADER.FILTERS.NAME.PLACEHOLDER", "searchSuffix" : "*" } } }, { "id": "checkList", - "name": "Check List", + "name": "SEARCH.SEARCH_HEADER.FILTERS.TYPE.TITLE", "columnKey":"$thumbnail", "enabled": true, "component": { @@ -476,32 +476,20 @@ "operator": "OR", "options": [ { - "name": "Folder", + "name": "SEARCH.SEARCH_HEADER.FILTERS.TYPE.FOLDER", "value": "TYPE:'cm:folder'" }, { - "name": "Document", + "name": "SEARCH.SEARCH_HEADER.FILTERS.TYPE.DOCUMENT", "value": "TYPE:'cm:content'" } ] } } }, - { - "id": "contentSizeRange", - "name": "Content Size (range)", - "enabled": true, - "component": { - "selector": "number-range", - "settings": { - "field": "cm:content.size", - "format": "[{FROM} TO {TO}]" - } - } - }, { "id": "contentSize", - "name": "SEARCH.CATEGORIES.SIZE", + "name": "SEARCH.SEARCH_HEADER.FILTERS.SIZE.TITLE", "columnKey":"content.sizeInBytes", "enabled": true, "component": { @@ -509,19 +497,19 @@ "settings": { "options": [ { - "name": "Small", + "name": "SEARCH.SEARCH_HEADER.FILTERS.SIZE.SMALL", "value": "content.size:[0 TO 1048576>" }, { - "name": "Medium", + "name": "SEARCH.SEARCH_HEADER.FILTERS.SIZE.MEDIUM", "value": "content.size:[1048576 TO 52428800]" }, { - "name": "Large", + "name": "SEARCH.SEARCH_HEADER.FILTERS.SIZE.LARGE", "value": "content.size:<52428800 TO 524288000]" }, { - "name": "Huge", + "name": "SEARCH.SEARCH_HEADER.FILTERS.SIZE.HUGE", "value": "content.size:<524288000 TO MAX]" } ] @@ -530,7 +518,7 @@ }, { "id": "createdDateRange", - "name": "Created Date (range)", + "name": "SEARCH.SEARCH_HEADER.FILTERS.DATE.TITLE", "columnKey": "createdAt", "enabled": true, "component": { diff --git a/lib/content-services/src/lib/i18n/en.json b/lib/content-services/src/lib/i18n/en.json index 55ee363603..9bfd855749 100644 --- a/lib/content-services/src/lib/i18n/en.json +++ b/lib/content-services/src/lib/i18n/en.json @@ -290,7 +290,28 @@ "TYPE": "Type", "FILTER_BY": "Filter by {{ category }}", "CLEAR": "Clear", - "APPLY": "Apply" + "APPLY": "Apply", + "FILTERS" : { + "NAME" : { + "TITLE": "Name", + "PLACEHOLDER": "Enter the name" + }, + "TYPE": { + "TITLE": "Check type", + "FOLDER": "Folder", + "DOCUMENT": "Document" + }, + "SIZE": { + "TITLE" : "Content Size (range)", + "SMALL": "Small", + "MEDIUM": "Medium", + "LARGE": "Large", + "HUGE": "Huge" + }, + "DATE" :{ + "TITLE" : "Created Date (range)" + } + } } }, "PERMISSION": { diff --git a/lib/content-services/src/lib/search/components/search-header/search-header.component.html b/lib/content-services/src/lib/search/components/search-header/search-header.component.html index 66507b5c4b..fa30b7ec6f 100644 --- a/lib/content-services/src/lib/search/components/search-header/search-header.component.html +++ b/lib/content-services/src/lib/search/components/search-header/search-header.component.html @@ -15,7 +15,7 @@
-
{{ 'SEARCH.SEARCH_HEADER.TITLE' | translate }}
+
{{ category?.name | translate }}