diff --git a/frontend/src/AddMovie/ImportMovie/SelectFolder/ImportMovieSelectFolder.js b/frontend/src/AddMovie/ImportMovie/SelectFolder/ImportMovieSelectFolder.js index 95cb6e6c0..a633ea866 100644 --- a/frontend/src/AddMovie/ImportMovie/SelectFolder/ImportMovieSelectFolder.js +++ b/frontend/src/AddMovie/ImportMovie/SelectFolder/ImportMovieSelectFolder.js @@ -18,17 +18,23 @@ import styles from './ImportMovieSelectFolder.css'; const rootFolderColumns = [ { name: 'path', - label: translate('Path'), + get label() { + return translate('Path'); + }, isVisible: true }, { name: 'freeSpace', - label: translate('FreeSpace'), + get label() { + return translate('FreeSpace'); + }, isVisible: true }, { name: 'unmappedFolders', - label: translate('UnmappedFolders'), + get label() { + return translate('UnmappedFolders'); + }, isVisible: true }, { diff --git a/frontend/src/Collection/Overview/Options/CollectionOverviewOptionsModalContent.js b/frontend/src/Collection/Overview/Options/CollectionOverviewOptionsModalContent.js index deb3cd7a3..eda658e12 100644 --- a/frontend/src/Collection/Overview/Options/CollectionOverviewOptionsModalContent.js +++ b/frontend/src/Collection/Overview/Options/CollectionOverviewOptionsModalContent.js @@ -14,9 +14,24 @@ import { inputTypes } from 'Helpers/Props'; import translate from 'Utilities/String/translate'; const posterSizeOptions = [ - { key: 'small', value: translate('Small') }, - { key: 'medium', value: translate('Medium') }, - { key: 'large', value: translate('Large') } + { + key: 'small', + get value() { + return translate('Small'); + } + }, + { + key: 'medium', + get value() { + return translate('Medium'); + } + }, + { + key: 'large', + get value() { + return translate('Large'); + } + } ]; class CollectionOverviewOptionsModalContent extends Component { diff --git a/frontend/src/Components/FileBrowser/FileBrowserModalContent.js b/frontend/src/Components/FileBrowser/FileBrowserModalContent.js index 3bdf6793e..d4e6ef08b 100644 --- a/frontend/src/Components/FileBrowser/FileBrowserModalContent.js +++ b/frontend/src/Components/FileBrowser/FileBrowserModalContent.js @@ -20,12 +20,16 @@ import styles from './FileBrowserModalContent.css'; const columns = [ { name: 'type', - label: translate('Type'), + get label() { + return translate('Type'); + }, isVisible: true }, { name: 'name', - label: translate('Name'), + get label() { + return translate('Name'); + }, isVisible: true } ]; diff --git a/frontend/src/Components/Filter/Builder/DateFilterBuilderRowValue.js b/frontend/src/Components/Filter/Builder/DateFilterBuilderRowValue.js index fec9c9d95..9309a80ee 100644 --- a/frontend/src/Components/Filter/Builder/DateFilterBuilderRowValue.js +++ b/frontend/src/Components/Filter/Builder/DateFilterBuilderRowValue.js @@ -10,12 +10,42 @@ import { NAME } from './FilterBuilderRowValue'; import styles from './DateFilterBuilderRowValue.css'; const timeOptions = [ - { key: 'seconds', value: translate('Seconds') }, - { key: 'minutes', value: translate('Minutes') }, - { key: 'hours', value: translate('Hours') }, - { key: 'days', value: translate('Days') }, - { key: 'weeks', value: translate('Weeks') }, - { key: 'months', value: translate('Months') } + { + key: 'seconds', + get value() { + return translate('Seconds'); + } + }, + { + key: 'minutes', + get value() { + return translate('Minutes'); + } + }, + { + key: 'hours', + get value() { + return translate('Hours'); + } + }, + { + key: 'days', + get value() { + return translate('Days'); + } + }, + { + key: 'weeks', + get value() { + return translate('Weeks'); + } + }, + { + key: 'months', + get value() { + return translate('Months'); + } + } ]; function isInFilter(filterType) { diff --git a/frontend/src/Components/Filter/Builder/MinimumAvailabilityFilterBuilderRowValue.js b/frontend/src/Components/Filter/Builder/MinimumAvailabilityFilterBuilderRowValue.js index 0bf4b1d7e..bad9d42e2 100644 --- a/frontend/src/Components/Filter/Builder/MinimumAvailabilityFilterBuilderRowValue.js +++ b/frontend/src/Components/Filter/Builder/MinimumAvailabilityFilterBuilderRowValue.js @@ -3,9 +3,24 @@ import translate from 'Utilities/String/translate'; import FilterBuilderRowValue from './FilterBuilderRowValue'; const protocols = [ - { id: 'announced', name: translate('Announced') }, - { id: 'inCinemas', name: translate('InCinemas') }, - { id: 'released', name: translate('Released') } + { + id: 'announced', + get name() { + return translate('Announced'); + } + }, + { + id: 'inCinemas', + get name() { + return translate('InCinemas'); + } + }, + { + id: 'released', + get name() { + return translate('Released'); + } + } ]; function MinimumAvailabilityFilterBuilderRowValue(props) { diff --git a/frontend/src/Components/Filter/Builder/ReleaseStatusFilterBuilderRowValue.js b/frontend/src/Components/Filter/Builder/ReleaseStatusFilterBuilderRowValue.js index f1bebfe6a..a2aabae20 100644 --- a/frontend/src/Components/Filter/Builder/ReleaseStatusFilterBuilderRowValue.js +++ b/frontend/src/Components/Filter/Builder/ReleaseStatusFilterBuilderRowValue.js @@ -4,10 +4,30 @@ import FilterBuilderRowValue from './FilterBuilderRowValue'; const protocols = [ { id: 'tba', name: 'TBA' }, - { id: 'announced', name: translate('Announced') }, - { id: 'inCinemas', name: translate('InCinemas') }, - { id: 'released', name: translate('Released') }, - { id: 'deleted', name: translate('Deleted') } + { + id: 'announced', + get name() { + return translate('Announced'); + } + }, + { + id: 'inCinemas', + get name() { + return translate('InCinemas'); + } + }, + { + id: 'released', + get name() { + return translate('Released'); + } + }, + { + id: 'deleted', + get name() { + return translate('Deleted'); + } + } ]; function ReleaseStatusFilterBuilderRowValue(props) { diff --git a/frontend/src/Components/Form/AvailabilitySelectInput.js b/frontend/src/Components/Form/AvailabilitySelectInput.js index 15d620cb0..63429accf 100644 --- a/frontend/src/Components/Form/AvailabilitySelectInput.js +++ b/frontend/src/Components/Form/AvailabilitySelectInput.js @@ -4,9 +4,24 @@ import translate from 'Utilities/String/translate'; import EnhancedSelectInput from './EnhancedSelectInput'; const availabilityOptions = [ - { key: 'announced', value: translate('Announced') }, - { key: 'inCinemas', value: translate('InCinemas') }, - { key: 'released', value: translate('Released') } + { + key: 'announced', + get value() { + return translate('Announced'); + } + }, + { + key: 'inCinemas', + get value() { + return translate('InCinemas'); + } + }, + { + key: 'released', + get value() { + return translate('Released'); + } + } ]; function AvailabilitySelectInput(props) { @@ -20,7 +35,7 @@ function AvailabilitySelectInput(props) { if (includeNoChange) { values.unshift({ key: 'noChange', - value: 'No Change', + value: translate('NoChange'), disabled: true }); } diff --git a/frontend/src/Components/Form/MovieMonitoredSelectInput.js b/frontend/src/Components/Form/MovieMonitoredSelectInput.js index dcf1de0c9..d9d1d9d83 100644 --- a/frontend/src/Components/Form/MovieMonitoredSelectInput.js +++ b/frontend/src/Components/Form/MovieMonitoredSelectInput.js @@ -1,6 +1,7 @@ import PropTypes from 'prop-types'; import React from 'react'; import monitorOptions from 'Utilities/Movie/monitorOptions'; +import translate from 'Utilities/String/translate'; import SelectInput from './SelectInput'; function MovieMonitoredSelectInput(props) { @@ -14,7 +15,7 @@ function MovieMonitoredSelectInput(props) { if (includeNoChange) { values.unshift({ key: 'noChange', - value: 'No Change', + value: translate('NoChange'), disabled: true }); } diff --git a/frontend/src/Components/Form/QualityProfileSelectInputConnector.js b/frontend/src/Components/Form/QualityProfileSelectInputConnector.js index 2304a0d67..a898de4a2 100644 --- a/frontend/src/Components/Form/QualityProfileSelectInputConnector.js +++ b/frontend/src/Components/Form/QualityProfileSelectInputConnector.js @@ -5,6 +5,7 @@ import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import createSortedSectionSelector from 'Store/Selectors/createSortedSectionSelector'; import sortByName from 'Utilities/Array/sortByName'; +import translate from 'Utilities/String/translate'; import EnhancedSelectInput from './EnhancedSelectInput'; function createMapStateToProps() { @@ -24,7 +25,7 @@ function createMapStateToProps() { if (includeNoChange) { values.unshift({ key: 'noChange', - value: 'No Change', + value: translate('NoChange'), disabled: includeNoChangeDisabled }); } diff --git a/frontend/src/Components/Form/RootFolderSelectInputConnector.js b/frontend/src/Components/Form/RootFolderSelectInputConnector.js index 71afc22c2..e8436d7b2 100644 --- a/frontend/src/Components/Form/RootFolderSelectInputConnector.js +++ b/frontend/src/Components/Form/RootFolderSelectInputConnector.js @@ -3,6 +3,7 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import { addRootFolder } from 'Store/Actions/rootFolderActions'; +import translate from 'Utilities/String/translate'; import RootFolderSelectInput from './RootFolderSelectInput'; const ADD_NEW_KEY = 'addNew'; @@ -27,7 +28,7 @@ function createMapStateToProps() { if (includeNoChange) { values.unshift({ key: 'noChange', - value: 'No Change', + value: translate('NoChange'), isDisabled: includeNoChangeDisabled, isMissing: false }); diff --git a/frontend/src/Components/keyboardShortcuts.js b/frontend/src/Components/keyboardShortcuts.js index 1e9871bc6..bbd81f7a3 100644 --- a/frontend/src/Components/keyboardShortcuts.js +++ b/frontend/src/Components/keyboardShortcuts.js @@ -6,47 +6,65 @@ import translate from 'Utilities/String/translate'; export const shortcuts = { OPEN_KEYBOARD_SHORTCUTS_MODAL: { key: '?', - name: translate('OpenThisModal') + get name() { + return translate('OpenThisModal'); + } }, CLOSE_MODAL: { key: 'Esc', - name: translate('CloseCurrentModal') + get name() { + return translate('CloseCurrentModal'); + } }, ACCEPT_CONFIRM_MODAL: { key: 'Enter', - name: translate('AcceptConfirmationModal') + get name() { + return translate('AcceptConfirmationModal'); + } }, MOVIE_SEARCH_INPUT: { key: 's', - name: translate('FocusSearchBox') + get name() { + return translate('FocusSearchBox'); + } }, SAVE_SETTINGS: { key: 'mod+s', - name: translate('SaveSettings') + get name() { + return translate('SaveSettings'); + } }, SCROLL_TOP: { key: 'mod+home', - name: translate('MovieIndexScrollTop') + get name() { + return translate('MovieIndexScrollTop'); + } }, SCROLL_BOTTOM: { key: 'mod+end', - name: translate('MovieIndexScrollBottom') + get name() { + return translate('MovieIndexScrollBottom'); + } }, DETAILS_NEXT: { key: '→', - name: translate('MovieDetailsNextMovie') + get name() { + return translate('MovieDetailsNextMovie'); + } }, DETAILS_PREVIOUS: { key: '←', - name: translate('MovieDetailsPreviousMovie') + get name() { + return translate('MovieDetailsPreviousMovie'); + } } }; diff --git a/frontend/src/DiscoverMovie/Overview/Options/DiscoverMovieOverviewOptionsModalContent.js b/frontend/src/DiscoverMovie/Overview/Options/DiscoverMovieOverviewOptionsModalContent.js index fbab7b3ab..d2bedc734 100644 --- a/frontend/src/DiscoverMovie/Overview/Options/DiscoverMovieOverviewOptionsModalContent.js +++ b/frontend/src/DiscoverMovie/Overview/Options/DiscoverMovieOverviewOptionsModalContent.js @@ -14,9 +14,24 @@ import { inputTypes } from 'Helpers/Props'; import translate from 'Utilities/String/translate'; const posterSizeOptions = [ - { key: 'small', value: translate('Small') }, - { key: 'medium', value: translate('Medium') }, - { key: 'large', value: translate('Large') } + { + key: 'small', + get value() { + return translate('Small'); + } + }, + { + key: 'medium', + get value() { + return translate('Medium'); + } + }, + { + key: 'large', + get value() { + return translate('Large'); + } + } ]; class DiscoverMovieOverviewOptionsModalContent extends Component { diff --git a/frontend/src/DiscoverMovie/Posters/Options/DiscoverMoviePosterOptionsModalContent.js b/frontend/src/DiscoverMovie/Posters/Options/DiscoverMoviePosterOptionsModalContent.js index 0681277d6..1409ca06f 100644 --- a/frontend/src/DiscoverMovie/Posters/Options/DiscoverMoviePosterOptionsModalContent.js +++ b/frontend/src/DiscoverMovie/Posters/Options/DiscoverMoviePosterOptionsModalContent.js @@ -14,9 +14,24 @@ import { inputTypes } from 'Helpers/Props'; import translate from 'Utilities/String/translate'; const posterSizeOptions = [ - { key: 'small', value: translate('Small') }, - { key: 'medium', value: translate('Medium') }, - { key: 'large', value: translate('Large') } + { + key: 'small', + get value() { + return translate('Small'); + } + }, + { + key: 'medium', + get value() { + return translate('Medium'); + } + }, + { + key: 'large', + get value() { + return translate('Large'); + } + } ]; class DiscoverMoviePosterOptionsModalContent extends Component { diff --git a/frontend/src/InteractiveImport/Folder/InteractiveImportSelectFolderModalContent.tsx b/frontend/src/InteractiveImport/Folder/InteractiveImportSelectFolderModalContent.tsx index 7bb9fddfa..7de3bbf00 100644 --- a/frontend/src/InteractiveImport/Folder/InteractiveImportSelectFolderModalContent.tsx +++ b/frontend/src/InteractiveImport/Folder/InteractiveImportSelectFolderModalContent.tsx @@ -25,11 +25,15 @@ import styles from './InteractiveImportSelectFolderModalContent.css'; const recentFoldersColumns = [ { name: 'folder', - label: translate('Folder'), + get label() { + return translate('Folder'); + }, }, { name: 'lastUsed', - label: translate('LastUsed'), + get label() { + return translate('LastUsed'); + }, }, { name: 'actions', diff --git a/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContent.tsx b/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContent.tsx index e86586e1e..ca6d63e77 100644 --- a/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContent.tsx +++ b/frontend/src/InteractiveImport/Interactive/InteractiveImportModalContent.tsx @@ -71,36 +71,48 @@ type OnSelectedChangeCallback = React.ComponentProps< const COLUMNS = [ { name: 'relativePath', - label: translate('RelativePath'), + get label() { + return translate('RelativePath'); + }, isSortable: true, isVisible: true, }, { name: 'movie', - label: translate('Movie'), + get label() { + return translate('Movie'); + }, isSortable: true, isVisible: true, }, { name: 'releaseGroup', - label: translate('ReleaseGroup'), + get label() { + return translate('ReleaseGroup'); + }, isVisible: true, }, { name: 'quality', - label: translate('Quality'), + get label() { + return translate('Quality'); + }, isSortable: true, isVisible: true, }, { name: 'languages', - label: translate('Languages'), + get label() { + return translate('Languages'); + }, isSortable: true, isVisible: true, }, { name: 'size', - label: translate('Size'), + get label() { + return translate('Size'); + }, isSortable: true, isVisible: true, }, @@ -108,7 +120,9 @@ const COLUMNS = [ name: 'customFormats', label: React.createElement(Icon, { name: icons.INTERACTIVE, - title: translate('CustomFormat'), + get title() { + return translate('CustomFormat'); + }, }), isSortable: true, isVisible: true, @@ -127,11 +141,23 @@ const COLUMNS = [ const importModeOptions = [ { key: 'chooseImportMode', - value: translate('ChooseImportMode'), + get value() { + return translate('ChooseImportMode'); + }, disabled: true, }, - { key: 'move', value: translate('MoveFiles') }, - { key: 'copy', value: translate('HardlinkCopyFiles') }, + { + key: 'move', + get value() { + return translate('MoveFiles'); + }, + }, + { + key: 'copy', + get value() { + return translate('HardlinkCopyFiles'); + }, + }, ]; function isSameMovieFile( diff --git a/frontend/src/InteractiveImport/Movie/SelectMovieModalContent.tsx b/frontend/src/InteractiveImport/Movie/SelectMovieModalContent.tsx index e0fc1d43c..952f16576 100644 --- a/frontend/src/InteractiveImport/Movie/SelectMovieModalContent.tsx +++ b/frontend/src/InteractiveImport/Movie/SelectMovieModalContent.tsx @@ -29,22 +29,30 @@ import styles from './SelectMovieModalContent.css'; const columns = [ { name: 'title', - label: translate('Title'), + get label() { + return translate('Title'); + }, isVisible: true, }, { name: 'year', - label: translate('Year'), + get label() { + return translate('Year'); + }, isVisible: true, }, { name: 'imdbId', - label: translate('ImdbId'), + get label() { + return translate('ImdbId'); + }, isVisible: true, }, { name: 'tmdbId', - label: translate('TmdbId'), + get label() { + return translate('TmdbId'); + }, isVisible: true, }, ]; diff --git a/frontend/src/InteractiveSearch/InteractiveSearchContent.js b/frontend/src/InteractiveSearch/InteractiveSearchContent.js index 23451490e..fa6019f0c 100644 --- a/frontend/src/InteractiveSearch/InteractiveSearchContent.js +++ b/frontend/src/InteractiveSearch/InteractiveSearchContent.js @@ -13,13 +13,17 @@ import styles from './InteractiveSearchContent.css'; const columns = [ { name: 'protocol', - label: translate('Source'), + get label() { + return translate('Source'); + }, isSortable: true, isVisible: true }, { name: 'age', - label: translate('Age'), + get label() { + return translate('Age'); + }, isSortable: true, isVisible: true }, @@ -39,50 +43,66 @@ const columns = [ }, { name: 'title', - label: translate('Title'), + get label() { + return translate('Title'); + }, isSortable: true, isVisible: true }, { name: 'indexer', - label: translate('Indexer'), + get label() { + return translate('Indexer'); + }, isSortable: true, isVisible: true }, { name: 'history', - label: translate('History'), + get label() { + return translate('History'); + }, isSortable: true, fixedSortDirection: sortDirections.ASCENDING, isVisible: true }, { name: 'size', - label: translate('Size'), + get label() { + return translate('Size'); + }, isSortable: true, isVisible: true }, { name: 'peers', - label: translate('Peers'), + get label() { + return translate('Peers'); + }, isSortable: true, isVisible: true }, { name: 'languages', - label: translate('Language'), + get label() { + return translate('Language'); + }, isSortable: true, isVisible: true }, { name: 'qualityWeight', - label: translate('Quality'), + get label() { + return translate('Quality'); + }, isSortable: true, isVisible: true }, { name: 'customFormat', - label: translate('Formats'), + get label() { + return translate('Formats'); + }, isSortable: true, isVisible: true }, @@ -90,7 +110,9 @@ const columns = [ name: 'customFormatScore', label: React.createElement(Icon, { name: icons.SCORE, - title: translate('CustomFormatScore') + get title() { + return translate('CustomFormatScore'); + } }), isSortable: true, isVisible: true diff --git a/frontend/src/Movie/Details/Titles/MovieTitlesTableContent.js b/frontend/src/Movie/Details/Titles/MovieTitlesTableContent.js index ae0e8011b..704d44b0f 100644 --- a/frontend/src/Movie/Details/Titles/MovieTitlesTableContent.js +++ b/frontend/src/Movie/Details/Titles/MovieTitlesTableContent.js @@ -10,17 +10,23 @@ import styles from './MovieTitlesTableContent.css'; const columns = [ { name: 'altTitle', - label: translate('AlternativeTitle'), + get label() { + return translate('AlternativeTitle'); + }, isVisible: true }, { name: 'language', - label: translate('Language'), + get label() { + return translate('Language'); + }, isVisible: true }, { name: 'sourceType', - label: translate('Type'), + get label() { + return translate('Type'); + }, isVisible: true } ]; diff --git a/frontend/src/Movie/History/MovieHistoryTableContent.js b/frontend/src/Movie/History/MovieHistoryTableContent.js index 2f21a9166..39adf0183 100644 --- a/frontend/src/Movie/History/MovieHistoryTableContent.js +++ b/frontend/src/Movie/History/MovieHistoryTableContent.js @@ -17,22 +17,30 @@ const columns = [ }, { name: 'sourceTitle', - label: translate('SourceTitle'), + get label() { + return translate('SourceTitle'); + }, isVisible: true }, { name: 'languages', - label: translate('Languages'), + get label() { + return translate('Languages'); + }, isVisible: true }, { name: 'quality', - label: translate('Quality'), + get label() { + return translate('Quality'); + }, isVisible: true }, { name: 'customFormats', - label: translate('CustomFormats'), + get label() { + return translate('CustomFormats'); + }, isSortable: false, isVisible: true }, @@ -47,7 +55,9 @@ const columns = [ }, { name: 'date', - label: translate('Date'), + get label() { + return translate('Date'); + }, isVisible: true }, { diff --git a/frontend/src/Movie/Index/Overview/Options/MovieIndexOverviewOptionsModalContent.tsx b/frontend/src/Movie/Index/Overview/Options/MovieIndexOverviewOptionsModalContent.tsx index 415aa636f..4a4135a2a 100644 --- a/frontend/src/Movie/Index/Overview/Options/MovieIndexOverviewOptionsModalContent.tsx +++ b/frontend/src/Movie/Index/Overview/Options/MovieIndexOverviewOptionsModalContent.tsx @@ -15,9 +15,24 @@ import translate from 'Utilities/String/translate'; import selectOverviewOptions from '../selectOverviewOptions'; const posterSizeOptions = [ - { key: 'small', value: translate('Small') }, - { key: 'medium', value: translate('Medium') }, - { key: 'large', value: translate('Large') }, + { + key: 'small', + get value() { + return translate('Small'); + }, + }, + { + key: 'medium', + get value() { + return translate('Medium'); + }, + }, + { + key: 'large', + get value() { + return translate('Large'); + }, + }, ]; interface MovieIndexOverviewOptionsModalContentProps { diff --git a/frontend/src/Movie/Index/Posters/Options/MovieIndexPosterOptionsModalContent.tsx b/frontend/src/Movie/Index/Posters/Options/MovieIndexPosterOptionsModalContent.tsx index adab5523c..b9d0f48b1 100644 --- a/frontend/src/Movie/Index/Posters/Options/MovieIndexPosterOptionsModalContent.tsx +++ b/frontend/src/Movie/Index/Posters/Options/MovieIndexPosterOptionsModalContent.tsx @@ -15,9 +15,24 @@ import translate from 'Utilities/String/translate'; import selectPosterOptions from '../selectPosterOptions'; const posterSizeOptions = [ - { key: 'small', value: translate('Small') }, - { key: 'medium', value: translate('Medium') }, - { key: 'large', value: translate('Large') }, + { + key: 'small', + get value() { + return translate('Small'); + }, + }, + { + key: 'medium', + get value() { + return translate('Medium'); + }, + }, + { + key: 'large', + get value() { + return translate('Large'); + }, + }, ]; interface MovieIndexPosterOptionsModalContentProps { diff --git a/frontend/src/Movie/Index/Select/Edit/EditMoviesModalContent.tsx b/frontend/src/Movie/Index/Select/Edit/EditMoviesModalContent.tsx index 737f879f1..5c5019b94 100644 --- a/frontend/src/Movie/Index/Select/Edit/EditMoviesModalContent.tsx +++ b/frontend/src/Movie/Index/Select/Edit/EditMoviesModalContent.tsx @@ -29,9 +29,25 @@ interface EditMoviesModalContentProps { const NO_CHANGE = 'noChange'; const monitoredOptions = [ - { key: NO_CHANGE, value: 'No Change', disabled: true }, - { key: 'monitored', value: 'Monitored' }, - { key: 'unmonitored', value: 'Unmonitored' }, + { + key: NO_CHANGE, + get value() { + return translate('NoChange'); + }, + disabled: true, + }, + { + key: 'monitored', + get value() { + return translate('Monitored'); + }, + }, + { + key: 'unmonitored', + get value() { + return translate('Unmonitored'); + }, + }, ]; function EditMoviesModalContent(props: EditMoviesModalContentProps) { diff --git a/frontend/src/Movie/Index/Table/MovieIndexTableHeader.tsx b/frontend/src/Movie/Index/Table/MovieIndexTableHeader.tsx index 9d5977614..df838237c 100644 --- a/frontend/src/Movie/Index/Table/MovieIndexTableHeader.tsx +++ b/frontend/src/Movie/Index/Table/MovieIndexTableHeader.tsx @@ -103,7 +103,7 @@ function MovieIndexTableHeader(props: MovieIndexTableHeaderProps) { isSortable={isSortable} onSortPress={onSortPress} > - {label} + {typeof label === 'function' ? label() : label} ); })} diff --git a/frontend/src/MovieFile/Editor/MovieFileEditorTableContent.js b/frontend/src/MovieFile/Editor/MovieFileEditorTableContent.js index 26fb4a8d7..069712748 100644 --- a/frontend/src/MovieFile/Editor/MovieFileEditorTableContent.js +++ b/frontend/src/MovieFile/Editor/MovieFileEditorTableContent.js @@ -11,42 +11,58 @@ import styles from './MovieFileEditorTableContent.css'; const columns = [ { name: 'title', - label: translate('RelativePath'), + get label() { + return translate('RelativePath'); + }, isVisible: true }, { name: 'videoCodec', - label: translate('VideoCodec'), + get label() { + return translate('VideoCodec'); + }, isVisible: true }, { name: 'audioInfo', - label: translate('AudioInfo'), + get label() { + return translate('AudioInfo'); + }, isVisible: true }, { name: 'size', - label: translate('Size'), + get label() { + return translate('Size'); + }, isVisible: true }, { name: 'languages', - label: translate('Languages'), + get label() { + return translate('Languages'); + }, isVisible: true }, { name: 'quality', - label: translate('Quality'), + get label() { + return translate('Quality'); + }, isVisible: true }, { name: 'releaseGroup', - label: translate('ReleaseGroup'), + get label() { + return translate('ReleaseGroup'); + }, isVisible: true }, { name: 'quality.customFormats', - label: translate('Formats'), + get label() { + return translate('Formats'); + }, isVisible: true }, { diff --git a/frontend/src/MovieFile/Extras/ExtraFileTableContent.js b/frontend/src/MovieFile/Extras/ExtraFileTableContent.js index 829c0323d..089b0e9bc 100644 --- a/frontend/src/MovieFile/Extras/ExtraFileTableContent.js +++ b/frontend/src/MovieFile/Extras/ExtraFileTableContent.js @@ -11,17 +11,23 @@ import styles from './ExtraFileTableContent.css'; const columns = [ { name: 'relativePath', - label: translate('RelativePath'), + get label() { + return translate('RelativePath'); + }, isVisible: true }, { name: 'extension', - label: translate('Extension'), + get label() { + return translate('Extension'); + }, isVisible: true }, { name: 'type', - label: translate('Type'), + get label() { + return translate('Type'); + }, isVisible: true }, { diff --git a/frontend/src/RootFolder/RootFolders.js b/frontend/src/RootFolder/RootFolders.js index f44e8e5e1..bb1405928 100644 --- a/frontend/src/RootFolder/RootFolders.js +++ b/frontend/src/RootFolder/RootFolders.js @@ -11,17 +11,23 @@ import RootFolderRowConnector from './RootFolderRowConnector'; const rootFolderColumns = [ { name: 'path', - label: translate('Path'), + get label() { + return translate('Path'); + }, isVisible: true }, { name: 'freeSpace', - label: translate('FreeSpace'), + get label() { + return translate('FreeSpace'); + }, isVisible: true }, { name: 'unmappedFolders', - label: translate('UnmappedFolders'), + get label() { + return translate('UnmappedFolders'); + }, isVisible: true }, { diff --git a/frontend/src/Settings/General/LoggingSettings.js b/frontend/src/Settings/General/LoggingSettings.js index 4d98374f3..60b651dca 100644 --- a/frontend/src/Settings/General/LoggingSettings.js +++ b/frontend/src/Settings/General/LoggingSettings.js @@ -8,9 +8,24 @@ import { inputTypes } from 'Helpers/Props'; import translate from 'Utilities/String/translate'; const logLevelOptions = [ - { key: 'info', value: translate('Info') }, - { key: 'debug', value: translate('Debug') }, - { key: 'trace', value: translate('Trace') } + { + key: 'info', + get value() { + return translate('Info'); + } + }, + { + key: 'debug', + get value() { + return translate('Debug'); + } + }, + { + key: 'trace', + get value() { + return translate('Trace'); + } + } ]; function LoggingSettings(props) { diff --git a/frontend/src/Settings/General/SecuritySettings.js b/frontend/src/Settings/General/SecuritySettings.js index a1aa24a9d..553aa5017 100644 --- a/frontend/src/Settings/General/SecuritySettings.js +++ b/frontend/src/Settings/General/SecuritySettings.js @@ -12,15 +12,45 @@ import { icons, inputTypes, kinds } from 'Helpers/Props'; import translate from 'Utilities/String/translate'; const authenticationMethodOptions = [ - { key: 'none', value: translate('None') }, - { key: 'basic', value: translate('AuthBasic') }, - { key: 'forms', value: translate('AuthForm') } + { + key: 'none', + get value() { + return translate('None'); + } + }, + { + key: 'basic', + get value() { + return translate('AuthBasic'); + } + }, + { + key: 'forms', + get value() { + return translate('AuthForm'); + } + } ]; const certificateValidationOptions = [ - { key: 'enabled', value: translate('Enabled') }, - { key: 'disabledForLocalAddresses', value: translate('CertValidationNoLocal') }, - { key: 'disabled', value: translate('Disabled') } + { + key: 'enabled', + get value() { + return translate('Enabled'); + } + }, + { + key: 'disabledForLocalAddresses', + get value() { + return translate('CertValidationNoLocal'); + } + }, + { + key: 'disabled', + get value() { + return translate('Disabled'); + } + } ]; class SecuritySettings extends Component { diff --git a/frontend/src/Settings/MediaManagement/MediaManagement.js b/frontend/src/Settings/MediaManagement/MediaManagement.js index 74f03a54d..56831feae 100644 --- a/frontend/src/Settings/MediaManagement/MediaManagement.js +++ b/frontend/src/Settings/MediaManagement/MediaManagement.js @@ -17,21 +17,66 @@ import NamingConnector from './Naming/NamingConnector'; import AddRootFolderConnector from './RootFolder/AddRootFolderConnector'; const rescanAfterRefreshOptions = [ - { key: 'always', value: translate('Always') }, - { key: 'afterManual', value: translate('AfterManualRefresh') }, - { key: 'never', value: translate('Never') } + { + key: 'always', + get value() { + return translate('Always'); + } + }, + { + key: 'afterManual', + get value() { + return translate('AfterManualRefresh'); + } + }, + { + key: 'never', + get value() { + return translate('Never'); + } + } ]; const downloadPropersAndRepacksOptions = [ - { key: 'preferAndUpgrade', value: translate('PreferAndUpgrade') }, - { key: 'doNotUpgrade', value: translate('DoNotUpgradeAutomatically') }, - { key: 'doNotPrefer', value: translate('DoNotPrefer') } + { + key: 'preferAndUpgrade', + get value() { + return translate('PreferAndUpgrade'); + } + }, + { + key: 'doNotUpgrade', + get value() { + return translate('DoNotUpgradeAutomatically'); + } + }, + { + key: 'doNotPrefer', + get value() { + return translate('DoNotPrefer'); + } + } ]; const fileDateOptions = [ - { key: 'none', value: translate('None') }, - { key: 'cinemas', value: translate('InCinemasDate') }, - { key: 'release', value: translate('PhysicalReleaseDate') } + { + key: 'none', + get value() { + return translate('None'); + } + }, + { + key: 'cinemas', + get value() { + return translate('InCinemasDate'); + } + }, + { + key: 'release', + get value() { + return translate('PhysicalReleaseDate'); + } + } ]; class MediaManagement extends Component { diff --git a/frontend/src/Settings/MediaManagement/Naming/Naming.js b/frontend/src/Settings/MediaManagement/Naming/Naming.js index 1a64d7d8b..ee8cd7597 100644 --- a/frontend/src/Settings/MediaManagement/Naming/Naming.js +++ b/frontend/src/Settings/MediaManagement/Naming/Naming.js @@ -14,10 +14,30 @@ import NamingModal from './NamingModal'; import styles from './Naming.css'; const colonReplacementOptions = [ - { key: 'delete', value: translate('Delete') }, - { key: 'dash', value: translate('ReplaceWithDash') }, - { key: 'spaceDash', value: translate('ReplaceWithSpaceDash') }, - { key: 'spaceDashSpace', value: translate('ReplaceWithSpaceDashSpace') } + { + key: 'delete', + get value() { + return translate('Delete'); + } + }, + { + key: 'dash', + get value() { + return translate('ReplaceWithDash'); + } + }, + { + key: 'spaceDash', + get value() { + return translate('ReplaceWithSpaceDash'); + } + }, + { + key: 'spaceDashSpace', + get value() { + return translate('ReplaceWithSpaceDashSpace'); + } + } ]; class Naming extends Component { @@ -92,13 +112,17 @@ class Naming extends Component { if (examples.movieExample) { standardMovieFormatHelpTexts.push(`Movie: ${examples.movieExample}`); } else { - standardMovieFormatErrors.push({ message: translate('MovieInvalidFormat') }); + standardMovieFormatErrors.push({ get message() { + return translate('MovieInvalidFormat'); + } }); } if (examples.movieFolderExample) { movieFolderFormatHelpTexts.push(`Example: ${examples.movieFolderExample}`); } else { - movieFolderFormatErrors.push({ message: translate('InvalidFormat') }); + movieFolderFormatErrors.push({ get message() { + return translate('InvalidFormat'); + } }); } } diff --git a/frontend/src/Settings/MediaManagement/Naming/NamingModal.js b/frontend/src/Settings/MediaManagement/Naming/NamingModal.js index f5a7ca819..90445f961 100644 --- a/frontend/src/Settings/MediaManagement/Naming/NamingModal.js +++ b/frontend/src/Settings/MediaManagement/Naming/NamingModal.js @@ -23,9 +23,24 @@ const separatorOptions = [ ]; const caseOptions = [ - { key: 'title', value: translate('DefaultCase') }, - { key: 'lower', value: translate('LowerCase') }, - { key: 'upper', value: translate('UpperCase') } + { + key: 'title', + get value() { + return translate('DefaultCase'); + } + }, + { + key: 'lower', + get value() { + return translate('LowerCase'); + } + }, + { + key: 'upper', + get value() { + return translate('UpperCase'); + } + } ]; const fileNameTokens = [ diff --git a/frontend/src/Settings/Profiles/Delay/EditDelayProfileModalContent.js b/frontend/src/Settings/Profiles/Delay/EditDelayProfileModalContent.js index 3cfd95022..28d92124b 100644 --- a/frontend/src/Settings/Profiles/Delay/EditDelayProfileModalContent.js +++ b/frontend/src/Settings/Profiles/Delay/EditDelayProfileModalContent.js @@ -18,10 +18,30 @@ import translate from 'Utilities/String/translate'; import styles from './EditDelayProfileModalContent.css'; const protocolOptions = [ - { key: 'preferUsenet', value: translate('PreferUsenet') }, - { key: 'preferTorrent', value: translate('PreferTorrent') }, - { key: 'onlyUsenet', value: translate('OnlyUsenet') }, - { key: 'onlyTorrent', value: translate('OnlyTorrent') } + { + key: 'preferUsenet', + get value() { + return translate('PreferUsenet'); + } + }, + { + key: 'preferTorrent', + get value() { + return translate('PreferTorrent'); + } + }, + { + key: 'onlyUsenet', + get value() { + return translate('OnlyUsenet'); + } + }, + { + key: 'onlyTorrent', + get value() { + return translate('OnlyTorrent'); + } + } ]; function EditDelayProfileModalContent(props) { diff --git a/frontend/src/Settings/UI/UISettings.js b/frontend/src/Settings/UI/UISettings.js index 3964e46db..ed80d23fc 100644 --- a/frontend/src/Settings/UI/UISettings.js +++ b/frontend/src/Settings/UI/UISettings.js @@ -16,8 +16,18 @@ import titleCase from 'Utilities/String/titleCase'; import translate from 'Utilities/String/translate'; export const firstDayOfWeekOptions = [ - { key: 0, value: translate('Sunday') }, - { key: 1, value: translate('Monday') } + { + key: 0, + get value() { + return translate('Sunday'); + } + }, + { + key: 1, + get value() { + return translate('Monday'); + } + } ]; export const weekColumnOptions = [ diff --git a/frontend/src/Store/Actions/blocklistActions.js b/frontend/src/Store/Actions/blocklistActions.js index c1cfadb22..8eed2c70d 100644 --- a/frontend/src/Store/Actions/blocklistActions.js +++ b/frontend/src/Store/Actions/blocklistActions.js @@ -33,49 +33,49 @@ export const defaultState = { columns: [ { name: 'movies.sortTitle', - label: translate('MovieTitle'), + label: () => translate('MovieTitle'), isSortable: true, isVisible: true }, { name: 'sourceTitle', - label: translate('SourceTitle'), + label: () => translate('SourceTitle'), isSortable: true, isVisible: true }, { name: 'languages', - label: translate('Languages'), + label: () => translate('Languages'), isSortable: true, isVisible: true }, { name: 'quality', - label: translate('Quality'), + label: () => translate('Quality'), isSortable: true, isVisible: true }, { name: 'customFormats', - label: translate('Formats'), + label: () => translate('Formats'), isSortable: false, isVisible: true }, { name: 'date', - label: translate('Date'), + label: () => translate('Date'), isSortable: true, isVisible: true }, { name: 'indexer', - label: translate('Indexer'), + label: () => translate('Indexer'), isSortable: true, isVisible: false }, { name: 'actions', - columnLabel: translate('Actions'), + columnLabel: () => translate('Actions'), isVisible: true, isModifiable: false } diff --git a/frontend/src/Store/Actions/calendarActions.js b/frontend/src/Store/Actions/calendarActions.js index 08168ab93..8e353afdb 100644 --- a/frontend/src/Store/Actions/calendarActions.js +++ b/frontend/src/Store/Actions/calendarActions.js @@ -50,7 +50,7 @@ export const defaultState = { filters: [ { key: 'all', - label: translate('All'), + label: () => translate('All'), filters: [ { key: 'monitored', @@ -61,7 +61,7 @@ export const defaultState = { }, { key: 'monitored', - label: translate('MonitoredOnly'), + label: () => translate('MonitoredOnly'), filters: [ { key: 'monitored', diff --git a/frontend/src/Store/Actions/discoverMovieActions.js b/frontend/src/Store/Actions/discoverMovieActions.js index 2b1895894..2a18f793d 100644 --- a/frontend/src/Store/Actions/discoverMovieActions.js +++ b/frontend/src/Store/Actions/discoverMovieActions.js @@ -75,7 +75,7 @@ export const defaultState = { columns: [ { name: 'status', - columnLabel: translate('Status'), + columnLabel: () => translate('Status'), isSortable: true, isVisible: true, isModifiable: false @@ -89,74 +89,74 @@ export const defaultState = { }, { name: 'sortTitle', - label: translate('MovieTitle'), + label: () => translate('MovieTitle'), isSortable: true, isVisible: true, isModifiable: false }, { name: 'originalLanguage', - label: translate('OriginalLanguage'), + label: () => translate('OriginalLanguage'), isSortable: true, isVisible: false }, { name: 'collection', - label: translate('Collection'), + label: () => translate('Collection'), isSortable: true, isVisible: false }, { name: 'studio', - label: translate('Studio'), + label: () => translate('Studio'), isSortable: true, isVisible: true }, { name: 'inCinemas', - label: translate('InCinemas'), + label: () => translate('InCinemas'), isSortable: true, isVisible: true }, { name: 'physicalRelease', - label: translate('PhysicalRelease'), + label: () => translate('PhysicalRelease'), isSortable: true, isVisible: false }, { name: 'digitalRelease', - label: translate('DigitalRelease'), + label: () => translate('DigitalRelease'), isSortable: true, isVisible: false }, { name: 'runtime', - label: translate('Runtime'), + label: () => translate('Runtime'), isSortable: true, isVisible: false }, { name: 'genres', - label: translate('Genres'), + label: () => translate('Genres'), isSortable: false, isVisible: false }, { name: 'ratings', - label: translate('Ratings'), + label: () => translate('Ratings'), isSortable: true, isVisible: false }, { name: 'popularity', - label: translate('Popularity'), + label: () => translate('Popularity'), isSortable: true, isVisible: false }, { name: 'certification', - label: translate('Certification'), + label: () => translate('Certification'), isSortable: true, isVisible: false }, @@ -168,7 +168,7 @@ export const defaultState = { }, { name: 'actions', - columnLabel: translate('Actions'), + columnLabel: () => translate('Actions'), isVisible: true, isModifiable: false } @@ -227,7 +227,7 @@ export const defaultState = { filters: [ { key: 'all', - label: translate('All'), + label: () => translate('All'), filters: [] }, { @@ -253,7 +253,7 @@ export const defaultState = { filterBuilderProps: [ { name: 'status', - label: translate('ReleaseStatus'), + label: () => translate('ReleaseStatus'), type: filterBuilderTypes.EXACT, valueType: filterBuilderValueTypes.RELEASE_STATUS }, @@ -276,7 +276,7 @@ export const defaultState = { }, { name: 'collection', - label: translate('Collection'), + label: () => translate('Collection'), type: filterBuilderTypes.ARRAY, optionsSelector: function(items) { const collectionList = items.reduce((acc, movie) => { @@ -295,7 +295,7 @@ export const defaultState = { }, { name: 'originalLanguage', - label: translate('OriginalLanguage'), + label: () => translate('OriginalLanguage'), type: filterBuilderTypes.EXACT, optionsSelector: function(items) { const collectionList = items.reduce((acc, movie) => { @@ -332,7 +332,7 @@ export const defaultState = { }, { name: 'runtime', - label: translate('Runtime'), + label: () => translate('Runtime'), type: filterBuilderTypes.NUMBER }, { @@ -356,39 +356,39 @@ export const defaultState = { }, { name: 'isAvailable', - label: translate('ConsideredAvailable'), + label: () => translate('ConsideredAvailable'), type: filterBuilderTypes.EXACT, valueType: filterBuilderValueTypes.BOOL }, { name: 'minimumAvailability', - label: translate('MinimumAvailability'), + label: () => translate('MinimumAvailability'), type: filterBuilderTypes.EXACT, valueType: filterBuilderValueTypes.MINIMUM_AVAILABILITY }, { name: 'tmdbRating', - label: translate('TmdbRating'), + label: () => translate('TmdbRating'), type: filterBuilderTypes.NUMBER }, { name: 'tmdbVotes', - label: translate('TmdbVotes'), + label: () => translate('TmdbVotes'), type: filterBuilderTypes.NUMBER }, { name: 'imdbRating', - label: translate('ImdbRating'), + label: () => translate('ImdbRating'), type: filterBuilderTypes.NUMBER }, { name: 'imdbVotes', - label: translate('ImdbVotes'), + label: () => translate('ImdbVotes'), type: filterBuilderTypes.NUMBER }, { name: 'popularity', - label: translate('Popularity'), + label: () => translate('Popularity'), type: filterBuilderTypes.NUMBER }, { diff --git a/frontend/src/Store/Actions/historyActions.js b/frontend/src/Store/Actions/historyActions.js index e45d41774..46e333acd 100644 --- a/frontend/src/Store/Actions/historyActions.js +++ b/frontend/src/Store/Actions/historyActions.js @@ -32,63 +32,63 @@ export const defaultState = { columns: [ { name: 'eventType', - columnLabel: translate('EventType'), + columnLabel: () => translate('EventType'), isVisible: true, isModifiable: false }, { name: 'movies.sortTitle', - label: translate('Movie'), + label: () => translate('Movie'), isSortable: true, isVisible: true }, { name: 'languages', - label: translate('Languages'), + label: () => translate('Languages'), isSortable: true, isVisible: true }, { name: 'quality', - label: translate('Quality'), + label: () => translate('Quality'), isSortable: true, isVisible: true }, { name: 'customFormats', - label: translate('Formats'), + label: () => translate('Formats'), isSortable: false, isVisible: true }, { name: 'date', - label: translate('Date'), + label: () => translate('Date'), isSortable: true, isVisible: true }, { name: 'downloadClient', - label: translate('DownloadClient'), + label: () => translate('DownloadClient'), isVisible: false }, { name: 'indexer', - label: translate('Indexer'), + label: () => translate('Indexer'), isVisible: false }, { name: 'releaseGroup', - label: translate('ReleaseGroup'), + label: () => translate('ReleaseGroup'), isVisible: false }, { name: 'sourceTitle', - label: translate('SourceTitle'), + label: () => translate('SourceTitle'), isVisible: false }, { name: 'customFormatScore', - columnLabel: translate('CustomFormatScore'), + columnLabel: () => translate('CustomFormatScore'), label: React.createElement(Icon, { name: icons.SCORE, title: 'Custom format score' @@ -97,7 +97,7 @@ export const defaultState = { }, { name: 'details', - columnLabel: translate('Details'), + columnLabel: () => translate('Details'), isVisible: true, isModifiable: false } @@ -108,12 +108,12 @@ export const defaultState = { filters: [ { key: 'all', - label: translate('All'), + label: () => translate('All'), filters: [] }, { key: 'grabbed', - label: translate('Grabbed'), + label: () => translate('Grabbed'), filters: [ { key: 'eventType', @@ -124,7 +124,7 @@ export const defaultState = { }, { key: 'imported', - label: translate('Imported'), + label: () => translate('Imported'), filters: [ { key: 'eventType', @@ -135,7 +135,7 @@ export const defaultState = { }, { key: 'failed', - label: translate('Failed'), + label: () => translate('Failed'), filters: [ { key: 'eventType', @@ -146,7 +146,7 @@ export const defaultState = { }, { key: 'deleted', - label: translate('Deleted'), + label: () => translate('Deleted'), filters: [ { key: 'eventType', @@ -157,7 +157,7 @@ export const defaultState = { }, { key: 'renamed', - label: translate('Renamed'), + label: () => translate('Renamed'), filters: [ { key: 'eventType', @@ -168,7 +168,7 @@ export const defaultState = { }, { key: 'ignored', - label: translate('Ignored'), + label: () => translate('Ignored'), filters: [ { key: 'eventType', diff --git a/frontend/src/Store/Actions/movieActions.js b/frontend/src/Store/Actions/movieActions.js index 636adcb77..36d5bdb5e 100644 --- a/frontend/src/Store/Actions/movieActions.js +++ b/frontend/src/Store/Actions/movieActions.js @@ -23,12 +23,12 @@ export const section = 'movies'; export const filters = [ { key: 'all', - label: translate('All'), + label: () => translate('All'), filters: [] }, { key: 'monitored', - label: translate('MonitoredOnly'), + label: () => translate('MonitoredOnly'), filters: [ { key: 'monitored', @@ -39,7 +39,7 @@ export const filters = [ }, { key: 'unmonitored', - label: translate('Unmonitored'), + label: () => translate('Unmonitored'), filters: [ { key: 'monitored', @@ -50,7 +50,7 @@ export const filters = [ }, { key: 'missing', - label: translate('Missing'), + label: () => translate('Missing'), filters: [ { key: 'monitored', @@ -66,7 +66,7 @@ export const filters = [ }, { key: 'wanted', - label: translate('Wanted'), + label: () => translate('Wanted'), filters: [ { key: 'monitored', @@ -87,7 +87,7 @@ export const filters = [ }, { key: 'cutoffunmet', - label: translate('CutoffUnmet'), + label: () => translate('CutoffUnmet'), filters: [ { key: 'monitored', diff --git a/frontend/src/Store/Actions/movieCollectionActions.js b/frontend/src/Store/Actions/movieCollectionActions.js index 55af73570..c83c4b762 100644 --- a/frontend/src/Store/Actions/movieCollectionActions.js +++ b/frontend/src/Store/Actions/movieCollectionActions.js @@ -60,12 +60,12 @@ export const defaultState = { filters: [ { key: 'all', - label: translate('All'), + label: () => translate('All'), filters: [] }, { key: 'missing', - label: translate('Missing'), + label: () => translate('Missing'), filters: [ { key: 'missingMovies', @@ -76,7 +76,7 @@ export const defaultState = { }, { key: 'complete', - label: translate('Complete'), + label: () => translate('Complete'), filters: [ { key: 'missingMovies', @@ -112,29 +112,29 @@ export const defaultState = { filterBuilderProps: [ { name: 'title', - label: translate('Title'), + label: () => translate('Title'), type: filterBuilderTypes.STRING }, { name: 'monitored', - label: translate('Monitored'), + label: () => translate('Monitored'), type: filterBuilderTypes.EXACT, valueType: filterBuilderValueTypes.BOOL }, { name: 'qualityProfileId', - label: translate('QualityProfile'), + label: () => translate('QualityProfile'), type: filterBuilderTypes.EXACT, valueType: filterBuilderValueTypes.QUALITY_PROFILE }, { name: 'rootFolderPath', - label: translate('RootFolder'), + label: () => translate('RootFolder'), type: filterBuilderTypes.STRING }, { name: 'genres', - label: translate('Genres'), + label: () => translate('Genres'), type: filterBuilderTypes.ARRAY, optionsSelector: function(items) { const genreList = items.reduce((acc, collection) => { @@ -160,7 +160,7 @@ export const defaultState = { }, { name: 'totalMovies', - label: translate('TotalMovies'), + label: () => translate('TotalMovies'), type: filterBuilderTypes.NUMBER } ] diff --git a/frontend/src/Store/Actions/movieIndexActions.js b/frontend/src/Store/Actions/movieIndexActions.js index c2f84b379..60d5f0fe9 100644 --- a/frontend/src/Store/Actions/movieIndexActions.js +++ b/frontend/src/Store/Actions/movieIndexActions.js @@ -65,153 +65,153 @@ export const defaultState = { }, { name: 'status', - columnLabel: translate('ReleaseStatus'), + columnLabel: () => translate('ReleaseStatus'), isSortable: true, isVisible: true, isModifiable: false }, { name: 'sortTitle', - label: translate('MovieTitle'), + label: () => translate('MovieTitle'), isSortable: true, isVisible: true, isModifiable: false }, { name: 'originalTitle', - label: translate('OriginalTitle'), + label: () => translate('OriginalTitle'), isSortable: true, isVisible: false }, { name: 'collection', - label: translate('Collection'), + label: () => translate('Collection'), isSortable: true, isVisible: false }, { name: 'studio', - label: translate('Studio'), + label: () => translate('Studio'), isSortable: true, isVisible: true }, { name: 'qualityProfileId', - label: translate('QualityProfile'), + label: () => translate('QualityProfile'), isSortable: true, isVisible: true }, { name: 'originalLanguage', - label: translate('OriginalLanguage'), + label: () => translate('OriginalLanguage'), isSortable: true, isVisible: false }, { name: 'added', - label: translate('Added'), + label: () => translate('Added'), isSortable: true, isVisible: false }, { name: 'year', - label: translate('Year'), + label: () => translate('Year'), isSortable: true, isVisible: false }, { name: 'inCinemas', - label: translate('InCinemas'), + label: () => translate('InCinemas'), isSortable: true, isVisible: false }, { name: 'digitalRelease', - label: translate('DigitalRelease'), + label: () => translate('DigitalRelease'), isSortable: true, isVisible: false }, { name: 'physicalRelease', - label: translate('PhysicalRelease'), + label: () => translate('PhysicalRelease'), isSortable: true, isVisible: false }, { name: 'runtime', - label: translate('Runtime'), + label: () => translate('Runtime'), isSortable: true, isVisible: false }, { name: 'minimumAvailability', - label: translate('MinAvailability'), + label: () => translate('MinAvailability'), isSortable: true, isVisible: false }, { name: 'path', - label: translate('Path'), + label: () => translate('Path'), isSortable: true, isVisible: false }, { name: 'sizeOnDisk', - label: translate('SizeOnDisk'), + label: () => translate('SizeOnDisk'), isSortable: true, isVisible: false }, { name: 'genres', - label: translate('Genres'), + label: () => translate('Genres'), isSortable: false, isVisible: false }, { name: 'movieStatus', - label: translate('Status'), + label: () => translate('Status'), isSortable: true, isVisible: true }, { name: 'tmdbRating', - label: translate('TmdbRating'), + label: () => translate('TmdbRating'), isSortable: true, isVisible: false }, { name: 'rottenTomatoesRating', - label: translate('RottenTomatoesRating'), + label: () => translate('RottenTomatoesRating'), isSortable: true, isVisible: false }, { name: 'imdbRating', - label: translate('ImdbRating'), + label: () => translate('ImdbRating'), isSortable: true, isVisible: false }, { name: 'popularity', - label: translate('Popularity'), + label: () => translate('Popularity'), isSortable: true, isVisible: false }, { name: 'certification', - label: translate('Certification'), + label: () => translate('Certification'), isSortable: true, isVisible: false }, { name: 'tags', - label: translate('Tags'), + label: () => translate('Tags'), isSortable: false, isVisible: false }, { name: 'actions', - columnLabel: translate('Actions'), + columnLabel: () => translate('Actions'), isVisible: true, isModifiable: false } @@ -265,35 +265,35 @@ export const defaultState = { filterBuilderProps: [ { name: 'monitored', - label: translate('Monitored'), + label: () => translate('Monitored'), type: filterBuilderTypes.EXACT, valueType: filterBuilderValueTypes.BOOL }, { name: 'isAvailable', - label: translate('ConsideredAvailable'), + label: () => translate('ConsideredAvailable'), type: filterBuilderTypes.EXACT, valueType: filterBuilderValueTypes.BOOL }, { name: 'minimumAvailability', - label: translate('MinimumAvailability'), + label: () => translate('MinimumAvailability'), type: filterBuilderTypes.EXACT, valueType: filterBuilderValueTypes.MINIMUM_AVAILABILITY }, { name: 'title', - label: translate('Title'), + label: () => translate('Title'), type: filterBuilderTypes.STRING }, { name: 'originalTitle', - label: translate('OriginalTitle'), + label: () => translate('OriginalTitle'), type: filterBuilderTypes.STRING }, { name: 'originalLanguage', - label: translate('OriginalLanguage'), + label: () => translate('OriginalLanguage'), type: filterBuilderTypes.EXACT, optionsSelector: function(items) { const collectionList = items.reduce((acc, movie) => { @@ -312,13 +312,13 @@ export const defaultState = { }, { name: 'status', - label: translate('ReleaseStatus'), + label: () => translate('ReleaseStatus'), type: filterBuilderTypes.EXACT, valueType: filterBuilderValueTypes.RELEASE_STATUS }, { name: 'studio', - label: translate('Studio'), + label: () => translate('Studio'), type: filterBuilderTypes.EXACT, optionsSelector: function(items) { const tagList = items.reduce((acc, movie) => { @@ -337,7 +337,7 @@ export const defaultState = { }, { name: 'collection', - label: translate('Collection'), + label: () => translate('Collection'), type: filterBuilderTypes.ARRAY, optionsSelector: function(items) { const collectionList = items.reduce((acc, movie) => { @@ -356,58 +356,58 @@ export const defaultState = { }, { name: 'qualityProfileId', - label: translate('QualityProfile'), + label: () => translate('QualityProfile'), type: filterBuilderTypes.EXACT, valueType: filterBuilderValueTypes.QUALITY_PROFILE }, { name: 'added', - label: translate('Added'), + label: () => translate('Added'), type: filterBuilderTypes.DATE, valueType: filterBuilderValueTypes.DATE }, { name: 'year', - label: translate('Year'), + label: () => translate('Year'), type: filterBuilderTypes.NUMBER }, { name: 'inCinemas', - label: translate('InCinemas'), + label: () => translate('InCinemas'), type: filterBuilderTypes.DATE, valueType: filterBuilderValueTypes.DATE }, { name: 'physicalRelease', - label: translate('PhysicalRelease'), + label: () => translate('PhysicalRelease'), type: filterBuilderTypes.DATE, valueType: filterBuilderValueTypes.DATE }, { name: 'digitalRelease', - label: translate('DigitalRelease'), + label: () => translate('DigitalRelease'), type: filterBuilderTypes.DATE, valueType: filterBuilderValueTypes.DATE }, { name: 'runtime', - label: translate('Runtime'), + label: () => translate('Runtime'), type: filterBuilderTypes.NUMBER }, { name: 'path', - label: translate('Path'), + label: () => translate('Path'), type: filterBuilderTypes.STRING }, { name: 'sizeOnDisk', - label: translate('SizeOnDisk'), + label: () => translate('SizeOnDisk'), type: filterBuilderTypes.NUMBER, valueType: filterBuilderValueTypes.BYTES }, { name: 'genres', - label: translate('Genres'), + label: () => translate('Genres'), type: filterBuilderTypes.ARRAY, optionsSelector: function(items) { const genreList = items.reduce((acc, movie) => { @@ -426,37 +426,37 @@ export const defaultState = { }, { name: 'tmdbRating', - label: translate('TmdbRating'), + label: () => translate('TmdbRating'), type: filterBuilderTypes.NUMBER }, { name: 'tmdbVotes', - label: translate('TmdbVotes'), + label: () => translate('TmdbVotes'), type: filterBuilderTypes.NUMBER }, { name: 'imdbRating', - label: translate('ImdbRating'), + label: () => translate('ImdbRating'), type: filterBuilderTypes.NUMBER }, { name: 'rottenTomatoesRating', - label: translate('RottenTomatoesRating'), + label: () => translate('RottenTomatoesRating'), type: filterBuilderTypes.NUMBER }, { name: 'imdbVotes', - label: translate('ImdbVotes'), + label: () => translate('ImdbVotes'), type: filterBuilderTypes.NUMBER }, { name: 'popularity', - label: translate('Popularity'), + label: () => translate('Popularity'), type: filterBuilderTypes.NUMBER }, { name: 'certification', - label: translate('Certification'), + label: () => translate('Certification'), type: filterBuilderTypes.EXACT, optionsSelector: function(items) { const certificationList = items.reduce((acc, movie) => { @@ -475,7 +475,7 @@ export const defaultState = { }, { name: 'tags', - label: translate('Tags'), + label: () => translate('Tags'), type: filterBuilderTypes.ARRAY, valueType: filterBuilderValueTypes.TAG } diff --git a/frontend/src/Store/Actions/queueActions.js b/frontend/src/Store/Actions/queueActions.js index ccbf9d519..d47c3c7a2 100644 --- a/frontend/src/Store/Actions/queueActions.js +++ b/frontend/src/Store/Actions/queueActions.js @@ -61,32 +61,32 @@ export const defaultState = { columns: [ { name: 'status', - columnLabel: translate('Status'), + columnLabel: () => translate('Status'), isSortable: true, isVisible: true, isModifiable: false }, { name: 'movies.sortTitle', - label: translate('Movie'), + label: () => translate('Movie'), isSortable: true, isVisible: true }, { name: 'languages', - label: translate('Languages'), + label: () => translate('Languages'), isSortable: true, isVisible: true }, { name: 'quality', - label: translate('Quality'), + label: () => translate('Quality'), isSortable: true, isVisible: true }, { name: 'customFormats', - label: translate('Formats'), + label: () => translate('Formats'), isSortable: false, isVisible: true }, @@ -101,61 +101,61 @@ export const defaultState = { }, { name: 'protocol', - label: translate('Protocol'), + label: () => translate('Protocol'), isSortable: true, isVisible: false }, { name: 'indexer', - label: translate('Indexer'), + label: () => translate('Indexer'), isSortable: true, isVisible: false }, { name: 'downloadClient', - label: translate('DownloadClient'), + label: () => translate('DownloadClient'), isSortable: true, isVisible: false }, { name: 'size', - label: translate('Size'), + label: () => translate('Size'), isSortable: true, isVisible: false }, { name: 'title', - label: translate('ReleaseTitle'), + label: () => translate('ReleaseTitle'), isSortable: true, isVisible: false }, { name: 'year', - label: translate('Year'), + label: () => translate('Year'), isSortable: true, isVisible: true }, { name: 'outputPath', - label: translate('OutputPath'), + label: () => translate('OutputPath'), isSortable: false, isVisible: false }, { name: 'estimatedCompletionTime', - label: translate('Timeleft'), + label: () => translate('Timeleft'), isSortable: true, isVisible: true }, { name: 'progress', - label: translate('Progress'), + label: () => translate('Progress'), isSortable: true, isVisible: true }, { name: 'actions', - columnLabel: translate('Actions'), + columnLabel: () => translate('Actions'), isVisible: true, isModifiable: false } diff --git a/frontend/src/Store/Actions/releaseActions.js b/frontend/src/Store/Actions/releaseActions.js index 4e43a80fc..8c8b151f3 100644 --- a/frontend/src/Store/Actions/releaseActions.js +++ b/frontend/src/Store/Actions/releaseActions.js @@ -72,7 +72,7 @@ export const defaultState = { filters: [ { key: 'all', - label: translate('All'), + label: () => translate('All'), filters: [] } ], @@ -140,51 +140,51 @@ export const defaultState = { filterBuilderProps: [ { name: 'title', - label: translate('Title'), + label: () => translate('Title'), type: filterBuilderTypes.STRING }, { name: 'age', - label: translate('Age'), + label: () => translate('Age'), type: filterBuilderTypes.NUMBER }, { name: 'protocol', - label: translate('Protocol'), + label: () => translate('Protocol'), type: filterBuilderTypes.EXACT, valueType: filterBuilderValueTypes.PROTOCOL }, { name: 'indexerId', - label: translate('Indexer'), + label: () => translate('Indexer'), type: filterBuilderTypes.EXACT, valueType: filterBuilderValueTypes.INDEXER }, { name: 'size', - label: translate('Size'), + label: () => translate('Size'), type: filterBuilderTypes.NUMBER, valueType: filterBuilderValueTypes.BYTES }, { name: 'seeders', - label: translate('Seeders'), + label: () => translate('Seeders'), type: filterBuilderTypes.NUMBER }, { name: 'peers', - label: translate('Peers'), + label: () => translate('Peers'), type: filterBuilderTypes.NUMBER }, { name: 'quality', - label: translate('Quality'), + label: () => translate('Quality'), type: filterBuilderTypes.EXACT, valueType: filterBuilderValueTypes.QUALITY }, { name: 'languages', - label: translate('Languages'), + label: () => translate('Languages'), type: filterBuilderTypes.ARRAY, optionsSelector: function(items) { const genreList = items.reduce((acc, release) => { @@ -203,12 +203,12 @@ export const defaultState = { }, { name: 'customFormatScore', - label: translate('CustomFormatScore'), + label: () => translate('CustomFormatScore'), type: filterBuilderTypes.NUMBER }, { name: 'rejectionCount', - label: translate('RejectionCount'), + label: () => translate('RejectionCount'), type: filterBuilderTypes.NUMBER } ], diff --git a/frontend/src/Store/Actions/systemActions.js b/frontend/src/Store/Actions/systemActions.js index 4910e462d..92360b589 100644 --- a/frontend/src/Store/Actions/systemActions.js +++ b/frontend/src/Store/Actions/systemActions.js @@ -82,34 +82,34 @@ export const defaultState = { columns: [ { name: 'level', - columnLabel: translate('Level'), + columnLabel: () => translate('Level'), isSortable: false, isVisible: true, isModifiable: false }, { name: 'time', - label: translate('Time'), + label: () => translate('Time'), isSortable: true, isVisible: true, isModifiable: false }, { name: 'logger', - label: translate('Component'), + label: () => translate('Component'), isSortable: false, isVisible: true, isModifiable: false }, { name: 'message', - label: translate('Message'), + label: () => translate('Message'), isVisible: true, isModifiable: false }, { name: 'actions', - columnLabel: translate('Actions'), + columnLabel: () => translate('Actions'), isSortable: true, isVisible: true, isModifiable: false @@ -121,12 +121,12 @@ export const defaultState = { filters: [ { key: 'all', - label: translate('All'), + label: () => translate('All'), filters: [] }, { key: 'info', - label: translate('Info'), + label: () => translate('Info'), filters: [ { key: 'level', @@ -137,7 +137,7 @@ export const defaultState = { }, { key: 'warn', - label: translate('Warn'), + label: () => translate('Warn'), filters: [ { key: 'level', @@ -148,7 +148,7 @@ export const defaultState = { }, { key: 'error', - label: translate('Error'), + label: () => translate('Error'), filters: [ { key: 'level', diff --git a/frontend/src/System/Backup/Backups.js b/frontend/src/System/Backup/Backups.js index e94bcf7ac..6e6752cd2 100644 --- a/frontend/src/System/Backup/Backups.js +++ b/frontend/src/System/Backup/Backups.js @@ -21,7 +21,9 @@ const columns = [ }, { name: 'name', - label: translate('Name'), + get label() { + return translate('Name'); + }, isVisible: true }, { @@ -31,7 +33,9 @@ const columns = [ }, { name: 'time', - label: translate('Time'), + get label() { + return translate('Time'); + }, isVisible: true }, { diff --git a/frontend/src/System/Logs/Files/LogFiles.js b/frontend/src/System/Logs/Files/LogFiles.js index 20ee3bc95..1220dc0fe 100644 --- a/frontend/src/System/Logs/Files/LogFiles.js +++ b/frontend/src/System/Logs/Files/LogFiles.js @@ -19,12 +19,16 @@ import LogFilesTableRow from './LogFilesTableRow'; const columns = [ { name: 'filename', - label: translate('Filename'), + get label() { + return translate('Filename'); + }, isVisible: true }, { name: 'lastWriteTime', - label: translate('LastWriteTime'), + get label() { + return translate('LastWriteTime'); + }, isVisible: true }, { diff --git a/frontend/src/System/Status/DiskSpace/DiskSpace.js b/frontend/src/System/Status/DiskSpace/DiskSpace.js index cd9fd643c..24deb7eae 100644 --- a/frontend/src/System/Status/DiskSpace/DiskSpace.js +++ b/frontend/src/System/Status/DiskSpace/DiskSpace.js @@ -15,17 +15,23 @@ import styles from './DiskSpace.css'; const columns = [ { name: 'path', - label: translate('Location'), + get label() { + return translate('Location'); + }, isVisible: true }, { name: 'freeSpace', - label: translate('FreeSpace'), + get label() { + return translate('FreeSpace'); + }, isVisible: true }, { name: 'totalSpace', - label: translate('TotalSpace'), + get label() { + return translate('TotalSpace'); + }, isVisible: true }, { diff --git a/frontend/src/System/Status/Health/Health.js b/frontend/src/System/Status/Health/Health.js index 05fc822da..7a6bd7089 100644 --- a/frontend/src/System/Status/Health/Health.js +++ b/frontend/src/System/Status/Health/Health.js @@ -94,12 +94,16 @@ const columns = [ }, { name: 'message', - label: translate('Message'), + get label() { + return translate('Message'); + }, isVisible: true }, { name: 'actions', - label: translate('Actions'), + get label() { + return translate('Actions'); + }, isVisible: true } ]; diff --git a/frontend/src/System/Tasks/Queued/QueuedTasks.js b/frontend/src/System/Tasks/Queued/QueuedTasks.js index 4274542a7..ac209f5b3 100644 --- a/frontend/src/System/Tasks/Queued/QueuedTasks.js +++ b/frontend/src/System/Tasks/Queued/QueuedTasks.js @@ -10,32 +10,44 @@ import QueuedTaskRowConnector from './QueuedTaskRowConnector'; const columns = [ { name: 'trigger', - label: translate('Trigger'), + get label() { + return translate('Trigger'); + }, isVisible: true }, { name: 'commandName', - label: translate('Name'), + get label() { + return translate('Name'); + }, isVisible: true }, { name: 'queued', - label: translate('Queued'), + get label() { + return translate('Queued'); + }, isVisible: true }, { name: 'started', - label: translate('Started'), + get label() { + return translate('Started'); + }, isVisible: true }, { name: 'ended', - label: translate('Ended'), + get label() { + return translate('Ended'); + }, isVisible: true }, { name: 'duration', - label: translate('Duration'), + get label() { + return translate('Duration'); + }, isVisible: true }, { diff --git a/frontend/src/System/Tasks/Scheduled/ScheduledTasks.js b/frontend/src/System/Tasks/Scheduled/ScheduledTasks.js index 8dbe5c08b..c1b17122d 100644 --- a/frontend/src/System/Tasks/Scheduled/ScheduledTasks.js +++ b/frontend/src/System/Tasks/Scheduled/ScheduledTasks.js @@ -10,27 +10,37 @@ import ScheduledTaskRowConnector from './ScheduledTaskRowConnector'; const columns = [ { name: 'name', - label: translate('Name'), + get label() { + return translate('Name'); + }, isVisible: true }, { name: 'interval', - label: translate('Interval'), + get label() { + return translate('Interval'); + }, isVisible: true }, { name: 'lastExecution', - label: translate('LastExecution'), + get label() { + return translate('LastExecution'); + }, isVisible: true }, { name: 'lastDuration', - label: translate('LastDuration'), + get label() { + return translate('LastDuration'); + }, isVisible: true }, { name: 'nextExecution', - label: translate('NextExecution'), + get label() { + return translate('NextExecution'); + }, isVisible: true }, { diff --git a/frontend/src/Utilities/Movie/monitorOptions.js b/frontend/src/Utilities/Movie/monitorOptions.js index db2c519b8..efcbc1595 100644 --- a/frontend/src/Utilities/Movie/monitorOptions.js +++ b/frontend/src/Utilities/Movie/monitorOptions.js @@ -1,9 +1,24 @@ import translate from 'Utilities/String/translate'; const monitorOptions = [ - { key: 'movieOnly', value: translate('MovieOnly') }, - { key: 'movieAndCollection', value: translate('MovieAndCollection') }, - { key: 'none', value: translate('None') } + { + key: 'movieOnly', + get value() { + return translate('MovieOnly'); + } + }, + { + key: 'movieAndCollection', + get value() { + return translate('MovieAndCollection'); + } + }, + { + key: 'none', + get value() { + return translate('None'); + } + } ]; export default monitorOptions; diff --git a/src/NzbDrone.Core/Localization/Core/ro.json b/src/NzbDrone.Core/Localization/Core/ro.json index 65e3e8317..fe70aa6d9 100644 --- a/src/NzbDrone.Core/Localization/Core/ro.json +++ b/src/NzbDrone.Core/Localization/Core/ro.json @@ -13,6 +13,8 @@ "Delete": "Șterge", "DelayProfiles": "Profile de întârziere", "Day": "Zi", + "ResetDefinitions": "Resetare definitii", + "ResetQualityDefinitions": "Resetare definitii de calitate", "Dates": "Date", "Date": "Dată", "CustomFormatsSettingsSummary": "Formate personalizate și setări",