Skip to content

Commit

Permalink
[ADF-5178] - add translation for filters (#5843)
Browse files Browse the repository at this point in the history
  • Loading branch information
VitoAlbano committed Jul 8, 2020
1 parent 1e4e58a commit 529aea7
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 26 deletions.
34 changes: 11 additions & 23 deletions demo-shell/src/app.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -451,22 +451,22 @@
"categories": [
{
"id": "queryName",
"name": "Name",
"name": "SEARCH.SEARCH_HEADER.FILTERS.NAME.TITLE",
"columnKey": "name",
"enabled": true,
"component": {
"selector": "text",
"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": {
Expand All @@ -476,52 +476,40 @@
"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": {
"selector": "check-list",
"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]"
}
]
Expand All @@ -530,7 +518,7 @@
},
{
"id": "createdDateRange",
"name": "Created Date (range)",
"name": "SEARCH.SEARCH_HEADER.FILTERS.DATE.TITLE",
"columnKey": "createdAt",
"enabled": true,
"component": {
Expand Down
23 changes: 22 additions & 1 deletion lib/content-services/src/lib/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<mat-menu #filter="matMenu" class="adf-filter-menu">
<div (click)="onMenuClick($event)" class="adf-filter-container">
<div class="adf-filter-title">{{ 'SEARCH.SEARCH_HEADER.TITLE' | translate }}</div>
<div class="adf-filter-title">{{ category?.name | translate }}</div>
<adf-search-widget-container
(keydown.enter)="onApply()"
[id]="category?.id"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<mat-form-field>
<input
matInput
[placeholder]="settings?.placeholder"
placeholder="{{ settings?.placeholder | translate }}"
[(ngModel)]="value"
(change)="onChangedHandler($event)">
<button mat-button *ngIf="value" matSuffix mat-icon-button (click)="reset()">
Expand Down

0 comments on commit 529aea7

Please sign in to comment.