Add translations to history and queue custom filters

This commit is contained in:
Bogdan 2023-10-17 18:44:55 +03:00 committed by Mark McDowall
parent 6027041a4f
commit 910c403d84
3 changed files with 27 additions and 14 deletions

View File

@ -1,31 +1,44 @@
import React from 'react';
import translate from 'Utilities/String/translate';
import FilterBuilderRowValue from './FilterBuilderRowValue';
import FilterBuilderRowValueProps from './FilterBuilderRowValueProps';
const EVENT_TYPE_OPTIONS = [
{
id: 1,
name: 'Grabbed',
get name() {
return translate('Grabbed');
},
},
{
id: 3,
name: 'Imported',
get name() {
return translate('Imported');
},
},
{
id: 4,
name: 'Failed',
get name() {
return translate('Failed');
},
},
{
id: 5,
name: 'Deleted',
get name() {
return translate('Deleted');
},
},
{
id: 6,
name: 'Renamed',
get name() {
return translate('Renamed');
},
},
{
id: 7,
name: 'Ignored',
get name() {
return translate('Ignored');
},
},
];

View File

@ -190,25 +190,25 @@ export const defaultState = {
filterBuilderProps: [
{
name: 'eventType',
label: 'Event Type',
label: () => translate('EventType'),
type: filterBuilderTypes.EQUAL,
valueType: filterBuilderValueTypes.HISTORY_EVENT_TYPE
},
{
name: 'seriesIds',
label: 'Series',
label: () => translate('Series'),
type: filterBuilderTypes.EQUAL,
valueType: filterBuilderValueTypes.SERIES
},
{
name: 'quality',
label: 'Quality',
label: () => translate('Quality'),
type: filterBuilderTypes.EQUAL,
valueType: filterBuilderValueTypes.QUALITY
},
{
name: 'languages',
label: 'Languages',
label: () => translate('Languages'),
type: filterBuilderTypes.CONTAINS,
valueType: filterBuilderValueTypes.LANGUAGE
}

View File

@ -185,25 +185,25 @@ export const defaultState = {
filterBuilderProps: [
{
name: 'seriesIds',
label: 'Series',
label: () => translate('Series'),
type: filterBuilderTypes.EQUAL,
valueType: filterBuilderValueTypes.SERIES
},
{
name: 'quality',
label: 'Quality',
label: () => translate('Quality'),
type: filterBuilderTypes.EQUAL,
valueType: filterBuilderValueTypes.QUALITY
},
{
name: 'languages',
label: 'Languages',
label: () => translate('Languages'),
type: filterBuilderTypes.CONTAINS,
valueType: filterBuilderValueTypes.LANGUAGE
},
{
name: 'protocol',
label: 'Protocol',
label: () => translate('Protocol'),
type: filterBuilderTypes.EQUAL,
valueType: filterBuilderValueTypes.PROTOCOL
}