mirror of
https://github.com/strapi/strapi.git
synced 2025-09-06 23:28:02 +00:00
Translate filters
Signed-off-by: soupette <cyril@strapi.io>
This commit is contained in:
parent
58c10d34e2
commit
05dbb95e40
@ -2,9 +2,11 @@ import React from 'react';
|
||||
import { Box, Tag } from '@strapi/parts';
|
||||
import { Close } from '@strapi/icons';
|
||||
import { useQueryParams } from '@strapi/helper-plugin';
|
||||
import { useIntl } from 'react-intl';
|
||||
|
||||
const FilterList = () => {
|
||||
const [{ query }, setQuery] = useQueryParams();
|
||||
const { formatMessage } = useIntl();
|
||||
|
||||
const handleClick = filter => {
|
||||
const nextFilters = query.filters.$and.filter(f => {
|
||||
@ -28,7 +30,13 @@ const FilterList = () => {
|
||||
// eslint-disable-next-line react/no-array-index-key
|
||||
<Box key={`${name}-${i}`} padding={1} onClick={() => handleClick(filter)}>
|
||||
<Tag icon={<Close />}>
|
||||
{name} {filterType} {value}
|
||||
{name}
|
||||
{formatMessage({
|
||||
id: `components.FilterOptions.FILTER_TYPES.${filterType}`,
|
||||
defaultMessage: filterType,
|
||||
})}
|
||||
|
||||
{value}
|
||||
</Tag>
|
||||
</Box>
|
||||
);
|
||||
|
@ -336,8 +336,9 @@
|
||||
"components.AutoReloadBlocker.header": "Reload feature is required for this plugin.",
|
||||
"components.TableHeader.sort": "Sort on {label}",
|
||||
"components.ErrorBoundary.title": "Something went wrong...",
|
||||
"components.FilterOptions.FILTER_TYPES.=": "is",
|
||||
"components.FilterOptions.FILTER_TYPES._contains": "contains",
|
||||
"components.FilterOptions.FILTER_TYPES.$eq": "is",
|
||||
"components.FilterOptions.FILTER_TYPES.$ne": "is not",
|
||||
"components.FilterOptions.FILTER_TYPES.$contains": "contains",
|
||||
"components.FilterOptions.FILTER_TYPES._containss": "contains (case sensitive)",
|
||||
"components.FilterOptions.FILTER_TYPES._gt": "is greater than",
|
||||
"components.FilterOptions.FILTER_TYPES._gte": "is greater than or equal to",
|
||||
@ -345,7 +346,6 @@
|
||||
"components.FilterOptions.FILTER_TYPES._lt": "is lower than",
|
||||
"components.FilterOptions.FILTER_TYPES._lte": "is lower than or equal to",
|
||||
"components.FilterOptions.FILTER_TYPES._ncontains": "does not contain",
|
||||
"components.FilterOptions.FILTER_TYPES._ne": "is not",
|
||||
"components.FilterOptions.FILTER_TYPES._nin": "doesn't match any value in the array of values",
|
||||
"components.Input.error.attribute.key.taken": "This value already exists",
|
||||
"components.Input.error.attribute.sameKeyAndName": "Can't be equal",
|
||||
|
Loading…
x
Reference in New Issue
Block a user