Add label translations in columns

This commit is contained in:
Bogdan 2023-08-01 09:18:29 +03:00 committed by Mark McDowall
parent 67dc898797
commit e8855c312d
10 changed files with 62 additions and 49 deletions

View File

@ -13,18 +13,19 @@ import Scroller from 'Components/Scroller/Scroller';
import Table from 'Components/Table/Table';
import TableBody from 'Components/Table/TableBody';
import { kinds, scrollDirections } from 'Helpers/Props';
import translate from 'Utilities/String/translate';
import FileBrowserRow from './FileBrowserRow';
import styles from './FileBrowserModalContent.css';
const columns = [
{
name: 'type',
label: 'Type',
label: () => translate('Type'),
isVisible: true
},
{
name: 'name',
label: 'Name',
label: () => translate('Name'),
isVisible: true
}
];

View File

@ -6,6 +6,7 @@ import LoadingIndicator from 'Components/Loading/LoadingIndicator';
import Table from 'Components/Table/Table';
import TableBody from 'Components/Table/TableBody';
import { icons, kinds } from 'Helpers/Props';
import translate from 'Utilities/String/translate';
import EpisodeHistoryRow from './EpisodeHistoryRow';
const columns = [
@ -15,41 +16,41 @@ const columns = [
},
{
name: 'sourceTitle',
label: 'Source Title',
label: () => translate('SourceTitle'),
isVisible: true
},
{
name: 'languages',
label: 'Languages',
label: () => translate('Languages'),
isVisible: true
},
{
name: 'quality',
label: 'Quality',
label: () => translate('Quality'),
isVisible: true
},
{
name: 'date',
label: 'Date',
label: () => translate('Date'),
isVisible: true
},
{
name: 'details',
label: 'Details',
label: () => translate('Details'),
isVisible: true
},
{
name: 'customFormatScore',
label: React.createElement(Icon, {
name: icons.SCORE,
title: 'Custom format score'
title: () => translate('CustomFormatScore')
}),
isSortable: true,
isVisible: true
},
{
name: 'actions',
label: 'Actions',
label: () => translate('Actions'),
isVisible: true
}
];

View File

@ -6,6 +6,7 @@ import Table from 'Components/Table/Table';
import TableBody from 'Components/Table/TableBody';
import { kinds, sizes } from 'Helpers/Props';
import QualityProfileNameConnector from 'Settings/Profiles/Quality/QualityProfileNameConnector';
import translate from 'Utilities/String/translate';
import EpisodeAiringConnector from './EpisodeAiringConnector';
import EpisodeFileRow from './EpisodeFileRow';
import styles from './EpisodeSummary.css';
@ -13,31 +14,31 @@ import styles from './EpisodeSummary.css';
const columns = [
{
name: 'path',
label: 'Path',
label: () => translate('Path'),
isSortable: false,
isVisible: true
},
{
name: 'size',
label: 'Size',
label: () => translate('Size'),
isSortable: false,
isVisible: true
},
{
name: 'languages',
label: 'Languages',
label: () => translate('Languages'),
isSortable: false,
isVisible: true
},
{
name: 'quality',
label: 'Quality',
label: () => translate('Quality'),
isSortable: false,
isVisible: true
},
{
name: 'customFormats',
label: 'Formats',
label: () => translate('Formats'),
isSortable: false,
isVisible: true
},

View File

@ -25,6 +25,7 @@ import createClientSideCollectionSelector from 'Store/Selectors/createClientSide
import { CheckInputChanged } from 'typings/inputs';
import { SelectStateInputProps } from 'typings/props';
import getErrorMessage from 'Utilities/Object/getErrorMessage';
import translate from 'Utilities/String/translate';
import getSelectedIds from 'Utilities/Table/getSelectedIds';
import SelectEpisodeRow from './SelectEpisodeRow';
import styles from './SelectEpisodeModalContent.css';
@ -38,12 +39,12 @@ const columns = [
},
{
name: 'title',
label: 'Title',
label: () => translate('Title'),
isVisible: true,
},
{
name: 'airDate',
label: 'Air Date',
label: () => translate('AirDate'),
isVisible: true,
},
];

View File

@ -25,11 +25,11 @@ import styles from './InteractiveImportSelectFolderModalContent.css';
const recentFoldersColumns = [
{
name: 'folder',
label: 'Folder',
label: () => translate('Folder'),
},
{
name: 'lastUsed',
label: 'Last Used',
label: () => translate('LastUsed'),
},
{
name: 'actions',

View File

@ -59,6 +59,7 @@ import { SortCallback } from 'typings/callbacks';
import { SelectStateInputProps } from 'typings/props';
import getErrorMessage from 'Utilities/Object/getErrorMessage';
import hasDifferentItems from 'Utilities/Object/hasDifferentItems';
import translate from 'Utilities/String/translate';
import getSelectedIds from 'Utilities/Table/getSelectedIds';
import InteractiveImportRow from './InteractiveImportRow';
import styles from './InteractiveImportModalContent.css';
@ -82,46 +83,46 @@ type OnSelectedChangeCallback = React.ComponentProps<
const COLUMNS = [
{
name: 'relativePath',
label: 'Relative Path',
label: () => translate('RelativePath'),
isSortable: true,
isVisible: true,
},
{
name: 'series',
label: 'Series',
label: () => translate('Series'),
isSortable: true,
isVisible: true,
},
{
name: 'season',
label: 'Season',
label: () => translate('Season'),
isVisible: true,
},
{
name: 'episodes',
label: 'Episode(s)',
label: () => translate('Episodes'),
isVisible: true,
},
{
name: 'releaseGroup',
label: 'Release Group',
label: () => translate('ReleaseGroup'),
isVisible: true,
},
{
name: 'quality',
label: 'Quality',
label: () => translate('Quality'),
isSortable: true,
isVisible: true,
},
{
name: 'languages',
label: 'Languages',
label: () => translate('Languages'),
isSortable: true,
isVisible: true,
},
{
name: 'size',
label: 'Size',
label: () => translate('Size'),
isSortable: true,
isVisible: true,
},
@ -129,7 +130,7 @@ const COLUMNS = [
name: 'customFormats',
label: React.createElement(Icon, {
name: icons.INTERACTIVE,
title: 'Custom Format',
title: () => translate('CustomFormatScore'),
}),
isSortable: true,
isVisible: true,

View File

@ -8,6 +8,7 @@ import Table from 'Components/Table/Table';
import TableBody from 'Components/Table/TableBody';
import { align, icons, sortDirections } from 'Helpers/Props';
import getErrorMessage from 'Utilities/Object/getErrorMessage';
import translate from 'Utilities/String/translate';
import InteractiveSearchFilterModalConnector from './InteractiveSearchFilterModalConnector';
import InteractiveSearchRow from './InteractiveSearchRow';
import styles from './InteractiveSearch.css';
@ -15,49 +16,49 @@ import styles from './InteractiveSearch.css';
const columns = [
{
name: 'protocol',
label: 'Source',
label: () => translate('Source'),
isSortable: true,
isVisible: true
},
{
name: 'age',
label: 'Age',
label: () => translate('Age'),
isSortable: true,
isVisible: true
},
{
name: 'title',
label: 'Title',
label: () => translate('Title'),
isSortable: true,
isVisible: true
},
{
name: 'indexer',
label: 'Indexer',
label: () => translate('Indexer'),
isSortable: true,
isVisible: true
},
{
name: 'size',
label: 'Size',
label: () => translate('Size'),
isSortable: true,
isVisible: true
},
{
name: 'peers',
label: 'Peers',
label: () => translate('Peers'),
isSortable: true,
isVisible: true
},
{
name: 'languageWeight',
label: 'Languages',
label: () => translate('Languages'),
isSortable: true,
isVisible: true
},
{
name: 'qualityWeight',
label: 'Quality',
label: () => translate('Quality'),
isSortable: true,
isVisible: true
},
@ -65,7 +66,7 @@ const columns = [
name: 'customFormatScore',
label: React.createElement(Icon, {
name: icons.SCORE,
title: 'Custom format score'
title: () => translate('CustomFormatScore')
}),
isSortable: true,
isVisible: true
@ -74,7 +75,7 @@ const columns = [
name: 'rejections',
label: React.createElement(Icon, {
name: icons.DANGER,
title: 'Rejections'
title: () => translate('Rejections')
}),
isSortable: true,
fixedSortDirection: sortDirections.ASCENDING,

View File

@ -12,6 +12,7 @@ import Table from 'Components/Table/Table';
import TableBody from 'Components/Table/TableBody';
import { icons, kinds } from 'Helpers/Props';
import SeasonNumber from 'Season/SeasonNumber';
import translate from 'Utilities/String/translate';
import SeriesHistoryRowConnector from './SeriesHistoryRowConnector';
const columns = [
@ -21,46 +22,46 @@ const columns = [
},
{
name: 'episode',
label: 'Episode',
label: () => translate('Episode'),
isVisible: true
},
{
name: 'sourceTitle',
label: 'Source Title',
label: () => translate('SourceTitle'),
isVisible: true
},
{
name: 'languages',
label: 'Languages',
label: () => translate('Languages'),
isVisible: true
},
{
name: 'quality',
label: 'Quality',
label: () => translate('Quality'),
isVisible: true
},
{
name: 'date',
label: 'Date',
label: () => translate('Date'),
isVisible: true
},
{
name: 'details',
label: 'Details',
label: () => translate('Details'),
isVisible: true
},
{
name: 'customFormatScore',
label: React.createElement(Icon, {
name: icons.SCORE,
title: 'Custom format score'
title: () => translate('CustomFormatScore')
}),
isSortable: true,
isVisible: true
},
{
name: 'actions',
label: 'Actions',
label: () => translate('Actions'),
isVisible: true
}
];

View File

@ -182,7 +182,7 @@ SeriesHistoryRow.propTypes = {
id: PropTypes.number.isRequired,
eventType: PropTypes.string.isRequired,
sourceTitle: PropTypes.string.isRequired,
languages: PropTypes.object.isRequired,
languages: PropTypes.arrayOf(PropTypes.object),
quality: PropTypes.object.isRequired,
qualityCutoffNotMet: PropTypes.bool.isRequired,
customFormats: PropTypes.arrayOf(PropTypes.object),

View File

@ -139,6 +139,7 @@
"FeatureRequests": "Feature Requests",
"Filename": "Filename",
"Fixed": "Fixed",
"Folder": "Folder",
"Formats": "Formats",
"Forums": "Forums",
"FreeSpace": "Free Space",
@ -182,12 +183,14 @@
"Indexers": "Indexers",
"Info": "Info",
"InstallLatest": "Install Latest",
"InteractiveImport": "Interactive Import",
"Interval": "Interval",
"Language": "Language",
"Language that Sonarr will use for UI": "Language that Sonarr will use for UI",
"Languages": "Languages",
"LastDuration": "Last Duration",
"LastExecution": "Last Execution",
"LastUsed": "Last Used",
"LastWriteTime": "Last Write Time",
"LatestSeason": "Latest Season",
"LiberaWebchat": "Libera Webchat",
@ -217,6 +220,7 @@
"MonitoredOnly": "Monitored Only",
"MoreInfo": "More Info",
"MountHealthCheckMessage": "Mount containing a series path is mounted read-only: ",
"MoveAutomatically": "Move Automatically",
"MultiSeason": "Multi-Season",
"Name": "Name",
"Negate": "Negate",
@ -333,12 +337,14 @@
"SceneNumbering": "Scene Numbering",
"Scheduled": "Scheduled",
"SearchForMonitoredEpisodes": "Search for monitored episodes",
"Season": "Season",
"SeasonCount": "Season Count",
"SeasonFolder": "Season Folder",
"SeasonNumber": "Season Number",
"SeasonPack": "Season Pack",
"Seasons": "Seasons",
"Seeders": "Seeders",
"SelectFolder": "Select Folder",
"Series": "Series",
"SeriesEditor": "Series Editor",
"SeriesTitle": "Series Title",