Simplify label translations in columns

Closes #8922
pull/8925/head
Bogdan 1 year ago
parent 385c7971bb
commit 69b621b13a

@ -18,23 +18,17 @@ import styles from './ImportMovieSelectFolder.css';
const rootFolderColumns = [
{
name: 'path',
get label() {
return translate('Path');
},
label: () => translate('Path'),
isVisible: true
},
{
name: 'freeSpace',
get label() {
return translate('FreeSpace');
},
label: () => translate('FreeSpace'),
isVisible: true
},
{
name: 'unmappedFolders',
get label() {
return translate('UnmappedFolders');
},
label: () => translate('UnmappedFolders'),
isVisible: true
},
{

@ -20,16 +20,12 @@ import styles from './FileBrowserModalContent.css';
const columns = [
{
name: 'type',
get label() {
return translate('Type');
},
label: () => translate('Type'),
isVisible: true
},
{
name: 'name',
get label() {
return translate('Name');
},
label: () => translate('Name'),
isVisible: true
}
];

@ -111,7 +111,7 @@ class DiscoverMovieHeader extends Component {
isSortable={isSortable}
{...otherProps}
>
{label}
{typeof label === 'function' ? label() : label}
</VirtualTableHeaderCell>
);
})

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

@ -71,48 +71,36 @@ type OnSelectedChangeCallback = React.ComponentProps<
const COLUMNS = [
{
name: 'relativePath',
get label() {
return translate('RelativePath');
},
label: () => translate('RelativePath'),
isSortable: true,
isVisible: true,
},
{
name: 'movie',
get label() {
return translate('Movie');
},
label: () => translate('Movie'),
isSortable: true,
isVisible: true,
},
{
name: 'releaseGroup',
get label() {
return translate('ReleaseGroup');
},
label: () => translate('ReleaseGroup'),
isVisible: true,
},
{
name: 'quality',
get label() {
return translate('Quality');
},
label: () => translate('Quality'),
isSortable: true,
isVisible: true,
},
{
name: 'languages',
get label() {
return translate('Languages');
},
label: () => translate('Languages'),
isSortable: true,
isVisible: true,
},
{
name: 'size',
get label() {
return translate('Size');
},
label: () => translate('Size'),
isSortable: true,
isVisible: true,
},
@ -139,22 +127,16 @@ const COLUMNS = [
const importModeOptions = [
{
key: 'chooseImportMode',
get value() {
return translate('ChooseImportMode');
},
value: () => translate('ChooseImportMode'),
disabled: true,
},
{
key: 'move',
get value() {
return translate('MoveFiles');
},
value: () => translate('MoveFiles'),
},
{
key: 'copy',
get value() {
return translate('HardlinkCopyFiles');
},
value: () => translate('HardlinkCopyFiles'),
},
];

@ -29,30 +29,22 @@ import styles from './SelectMovieModalContent.css';
const columns = [
{
name: 'title',
get label() {
return translate('Title');
},
label: () => translate('Title'),
isVisible: true,
},
{
name: 'year',
get label() {
return translate('Year');
},
label: () => translate('Year'),
isVisible: true,
},
{
name: 'imdbId',
get label() {
return translate('ImdbId');
},
label: () => translate('ImdbId'),
isVisible: true,
},
{
name: 'tmdbId',
get label() {
return translate('TmdbId');
},
label: () => translate('TmdbId'),
isVisible: true,
},
];

@ -30,7 +30,7 @@ function SelectMovieModalTableHeader(props: SelectMovieModalTableHeaderProps) {
}
name={name}
>
{label}
{typeof label === 'function' ? label() : label}
</VirtualTableHeaderCell>
);
})}

@ -13,17 +13,13 @@ import styles from './InteractiveSearchContent.css';
const columns = [
{
name: 'protocol',
get label() {
return translate('Source');
},
label: () => translate('Source'),
isSortable: true,
isVisible: true
},
{
name: 'age',
get label() {
return translate('Age');
},
label: () => translate('Age'),
isSortable: true,
isVisible: true
},
@ -43,66 +39,50 @@ const columns = [
},
{
name: 'title',
get label() {
return translate('Title');
},
label: () => translate('Title'),
isSortable: true,
isVisible: true
},
{
name: 'indexer',
get label() {
return translate('Indexer');
},
label: () => translate('Indexer'),
isSortable: true,
isVisible: true
},
{
name: 'history',
get label() {
return translate('History');
},
label: () => translate('History'),
isSortable: true,
fixedSortDirection: sortDirections.ASCENDING,
isVisible: true
},
{
name: 'size',
get label() {
return translate('Size');
},
label: () => translate('Size'),
isSortable: true,
isVisible: true
},
{
name: 'peers',
get label() {
return translate('Peers');
},
label: () => translate('Peers'),
isSortable: true,
isVisible: true
},
{
name: 'languages',
get label() {
return translate('Language');
},
label: () => translate('Language'),
isSortable: true,
isVisible: true
},
{
name: 'qualityWeight',
get label() {
return translate('Quality');
},
label: () => translate('Quality'),
isSortable: true,
isVisible: true
},
{
name: 'customFormat',
get label() {
return translate('Formats');
},
label: () => translate('Formats'),
isSortable: true,
isVisible: true
},

@ -10,23 +10,17 @@ import styles from './MovieTitlesTableContent.css';
const columns = [
{
name: 'altTitle',
get label() {
return translate('AlternativeTitle');
},
label: () => translate('AlternativeTitle'),
isVisible: true
},
{
name: 'language',
get label() {
return translate('Language');
},
label: () => translate('Language'),
isVisible: true
},
{
name: 'sourceType',
get label() {
return translate('Type');
},
label: () => translate('Type'),
isVisible: true
}
];

@ -17,30 +17,22 @@ const columns = [
},
{
name: 'sourceTitle',
get label() {
return translate('SourceTitle');
},
label: () => translate('SourceTitle'),
isVisible: true
},
{
name: 'languages',
get label() {
return translate('Languages');
},
label: () => translate('Languages'),
isVisible: true
},
{
name: 'quality',
get label() {
return translate('Quality');
},
label: () => translate('Quality'),
isVisible: true
},
{
name: 'customFormats',
get label() {
return translate('CustomFormats');
},
label: () => translate('CustomFormats'),
isSortable: false,
isVisible: true
},
@ -55,9 +47,7 @@ const columns = [
},
{
name: 'date',
get label() {
return translate('Date');
},
label: () => translate('Date'),
isVisible: true
},
{

@ -166,7 +166,7 @@ function MovieIndexSelectFooter() {
isDisabled={!anySelected || isOrganizingMovies}
onPress={onOrganizePress}
>
{translate('Rename Files')}
{translate('RenameFiles')}
</SpinnerButton>
<SpinnerButton

@ -11,58 +11,42 @@ import styles from './MovieFileEditorTableContent.css';
const columns = [
{
name: 'title',
get label() {
return translate('RelativePath');
},
label: () => translate('RelativePath'),
isVisible: true
},
{
name: 'videoCodec',
get label() {
return translate('VideoCodec');
},
label: () => translate('VideoCodec'),
isVisible: true
},
{
name: 'audioInfo',
get label() {
return translate('AudioInfo');
},
label: () => translate('AudioInfo'),
isVisible: true
},
{
name: 'size',
get label() {
return translate('Size');
},
label: () => translate('Size'),
isVisible: true
},
{
name: 'languages',
get label() {
return translate('Languages');
},
label: () => translate('Languages'),
isVisible: true
},
{
name: 'quality',
get label() {
return translate('Quality');
},
label: () => translate('Quality'),
isVisible: true
},
{
name: 'releaseGroup',
get label() {
return translate('ReleaseGroup');
},
label: () => translate('ReleaseGroup'),
isVisible: true
},
{
name: 'quality.customFormats',
get label() {
return translate('Formats');
},
label: () => translate('Formats'),
isVisible: true
},
{

@ -11,23 +11,17 @@ import styles from './ExtraFileTableContent.css';
const columns = [
{
name: 'relativePath',
get label() {
return translate('RelativePath');
},
label: () => translate('RelativePath'),
isVisible: true
},
{
name: 'extension',
get label() {
return translate('Extension');
},
label: () => translate('Extension'),
isVisible: true
},
{
name: 'type',
get label() {
return translate('Type');
},
label: () => translate('Type'),
isVisible: true
},
{

@ -13,23 +13,17 @@ import RootFolderRow from './RootFolderRow';
const rootFolderColumns = [
{
name: 'path',
get label() {
return translate('Path');
},
label: () => translate('Path'),
isVisible: true,
},
{
name: 'freeSpace',
get label() {
return translate('FreeSpace');
},
label: () => translate('FreeSpace'),
isVisible: true,
},
{
name: 'unmappedFolders',
get label() {
return translate('UnmappedFolders');
},
label: () => translate('UnmappedFolders'),
isVisible: true,
},
{

@ -36,49 +36,37 @@ type OnSelectedChangeCallback = React.ComponentProps<
const COLUMNS = [
{
name: 'name',
get label() {
return translate('Name');
},
label: () => translate('Name'),
isSortable: true,
isVisible: true,
},
{
name: 'implementation',
get label() {
return translate('Implementation');
},
label: () => translate('Implementation'),
isSortable: true,
isVisible: true,
},
{
name: 'enable',
get label() {
return translate('Enabled');
},
label: () => translate('Enabled'),
isSortable: true,
isVisible: true,
},
{
name: 'priority',
get label() {
return translate('Priority');
},
label: () => translate('Priority'),
isSortable: true,
isVisible: true,
},
{
name: 'removeCompletedDownloads',
get label() {
return translate('RemoveCompleted');
},
label: () => translate('RemoveCompleted'),
isSortable: true,
isVisible: true,
},
{
name: 'removeFailedDownloads',
get label() {
return translate('RemoveFailed');
},
label: () => translate('RemoveFailed'),
isSortable: true,
isVisible: true,
},

@ -36,49 +36,37 @@ type OnSelectedChangeCallback = React.ComponentProps<
const COLUMNS = [
{
name: 'name',
get label() {
return translate('Name');
},
label: () => translate('Name'),
isSortable: true,
isVisible: true,
},
{
name: 'implementation',
get label() {
return translate('Implementation');
},
label: () => translate('Implementation'),
isSortable: true,
isVisible: true,
},
{
name: 'qualityProfileId',
get label() {
return translate('QualityProfile');
},
label: () => translate('QualityProfile'),
isSortable: true,
isVisible: true,
},
{
name: 'rootFolderPath',
get label() {
return translate('RootFolder');
},
label: () => translate('RootFolder'),
isSortable: true,
isVisible: true,
},
{
name: 'enableAuto',
get label() {
return translate('AutomaticAdd');
},
label: () => translate('AutomaticAdd'),
isSortable: true,
isVisible: true,
},
{
name: 'tags',
get label() {
return translate('Tags');
},
label: () => translate('Tags'),
isSortable: true,
isVisible: true,
},

@ -36,57 +36,43 @@ type OnSelectedChangeCallback = React.ComponentProps<
const COLUMNS = [
{
name: 'name',
get label() {
return translate('Name');
},
label: () => translate('Name'),
isSortable: true,
isVisible: true,
},
{
name: 'implementation',
get label() {
return translate('Implementation');
},
label: () => translate('Implementation'),
isSortable: true,
isVisible: true,
},
{
name: 'enableRss',
get label() {
return translate('EnableRSS');
},
label: () => translate('EnableRSS'),
isSortable: true,
isVisible: true,
},
{
name: 'enableAutomaticSearch',
get label() {
return translate('EnableAutomaticSearch');
},
label: () => translate('EnableAutomaticSearch'),
isSortable: true,
isVisible: true,
},
{
name: 'enableInteractiveSearch',
get label() {
return translate('EnableInteractiveSearch');
},
label: () => translate('EnableInteractiveSearch'),
isSortable: true,
isVisible: true,
},
{
name: 'priority',
get label() {
return translate('Priority');
},
label: () => translate('Priority'),
isSortable: true,
isVisible: true,
},
{
name: 'tags',
get label() {
return translate('Tags');
},
label: () => translate('Tags'),
isSortable: true,
isVisible: true,
},

@ -21,21 +21,17 @@ const columns = [
},
{
name: 'name',
get label() {
return translate('Name');
},
label: () => translate('Name'),
isVisible: true
},
{
name: 'size',
label: 'Size',
label: () => translate('Size'),
isVisible: true
},
{
name: 'time',
get label() {
return translate('Time');
},
label: () => translate('Time'),
isVisible: true
},
{

@ -19,16 +19,12 @@ import LogFilesTableRow from './LogFilesTableRow';
const columns = [
{
name: 'filename',
get label() {
return translate('Filename');
},
label: () => translate('Filename'),
isVisible: true
},
{
name: 'lastWriteTime',
get label() {
return translate('LastWriteTime');
},
label: () => translate('LastWriteTime'),
isVisible: true
},
{

@ -15,23 +15,17 @@ import styles from './DiskSpace.css';
const columns = [
{
name: 'path',
get label() {
return translate('Location');
},
label: () => translate('Location'),
isVisible: true
},
{
name: 'freeSpace',
get label() {
return translate('FreeSpace');
},
label: () => translate('FreeSpace'),
isVisible: true
},
{
name: 'totalSpace',
get label() {
return translate('TotalSpace');
},
label: () => translate('TotalSpace'),
isVisible: true
},
{

@ -94,16 +94,12 @@ const columns = [
},
{
name: 'message',
get label() {
return translate('Message');
},
label: () => translate('Message'),
isVisible: true
},
{
name: 'actions',
get label() {
return translate('Actions');
},
label: () => translate('Actions'),
isVisible: true
}
];

@ -10,44 +10,32 @@ import QueuedTaskRowConnector from './QueuedTaskRowConnector';
const columns = [
{
name: 'trigger',
get label() {
return translate('Trigger');
},
label: () => translate('Trigger'),
isVisible: true
},
{
name: 'commandName',
get label() {
return translate('Name');
},
label: () => translate('Name'),
isVisible: true
},
{
name: 'queued',
get label() {
return translate('Queued');
},
label: () => translate('Queued'),
isVisible: true
},
{
name: 'started',
get label() {
return translate('Started');
},
label: () => translate('Started'),
isVisible: true
},
{
name: 'ended',
get label() {
return translate('Ended');
},
label: () => translate('Ended'),
isVisible: true
},
{
name: 'duration',
get label() {
return translate('Duration');
},
label: () => translate('Duration'),
isVisible: true
},
{

@ -10,37 +10,27 @@ import ScheduledTaskRowConnector from './ScheduledTaskRowConnector';
const columns = [
{
name: 'name',
get label() {
return translate('Name');
},
label: () => translate('Name'),
isVisible: true
},
{
name: 'interval',
get label() {
return translate('Interval');
},
label: () => translate('Interval'),
isVisible: true
},
{
name: 'lastExecution',
get label() {
return translate('LastExecution');
},
label: () => translate('LastExecution'),
isVisible: true
},
{
name: 'lastDuration',
get label() {
return translate('LastDuration');
},
label: () => translate('LastDuration'),
isVisible: true
},
{
name: 'nextExecution',
get label() {
return translate('NextExecution');
},
label: () => translate('NextExecution'),
isVisible: true
},
{

Loading…
Cancel
Save