translate frontend wanted

This commit is contained in:
Stevie Robinson 2023-08-27 23:03:29 +02:00 committed by Mark McDowall
parent a0c2d420c7
commit e04f36186b
3 changed files with 36 additions and 21 deletions

View File

@ -16,6 +16,7 @@ import TablePager from 'Components/Table/TablePager';
import { align, icons, kinds } from 'Helpers/Props';
import getFilterValue from 'Utilities/Filter/getFilterValue';
import hasDifferentItems from 'Utilities/Object/hasDifferentItems';
import translate from 'Utilities/String/translate';
import getSelectedIds from 'Utilities/Table/getSelectedIds';
import removeOldSelectedState from 'Utilities/Table/removeOldSelectedState';
import selectAll from 'Utilities/Table/selectAll';
@ -147,18 +148,18 @@ class CutoffUnmet extends Component {
const isShowingMonitored = getMonitoredValue(this.props);
return (
<PageContent title="Cutoff Unmet">
<PageContent title={translate('CutoffUnmet')}>
<PageToolbar>
<PageToolbarSection>
<PageToolbarButton
label="Search Selected"
label={translate('SearchSelected')}
iconName={icons.SEARCH}
isDisabled={!itemsSelected || isSearchingForCutoffUnmetEpisodes}
onPress={this.onSearchSelectedPress}
/>
<PageToolbarButton
label={isShowingMonitored ? 'Unmonitor Selected' : 'Monitor Selected'}
label={isShowingMonitored ? translate('UnmonitorSelected') : translate('MonitorSelected')}
iconName={icons.MONITORED}
isDisabled={!itemsSelected}
isSpinning={isSaving}
@ -168,7 +169,7 @@ class CutoffUnmet extends Component {
<PageToolbarSeparator />
<PageToolbarButton
label="Search All"
label={translate('SearchAll')}
iconName={icons.SEARCH}
isDisabled={!items.length}
isSpinning={isSearchingForCutoffUnmetEpisodes}
@ -198,14 +199,14 @@ class CutoffUnmet extends Component {
{
!isFetching && error &&
<Alert kind={kinds.DANGER}>
Error fetching cutoff unmet
{translate('CutoffUnmetLoadError')}
</Alert>
}
{
isPopulated && !error && !items.length &&
<Alert kind={kinds.INFO}>
No cutoff unmet items
{translate('CutoffUnmetNoItems')}
</Alert>
}
@ -246,18 +247,18 @@ class CutoffUnmet extends Component {
<ConfirmModal
isOpen={isConfirmSearchAllCutoffUnmetModalOpen}
kind={kinds.DANGER}
title="Search for all Cutoff Unmet episodes"
title={translate('SearchForCutoffUnmet')}
message={
<div>
<div>
Are you sure you want to search for all {totalRecords} Cutoff Unmet episodes?
{translate('SearchForCutoffUnmetConfirmationCount', { totalRecords })}
</div>
<div>
This cannot be cancelled once started without restarting Sonarr or disabling all of your indexers.
{translate('MassSearchCancelWarning')}
</div>
</div>
}
confirmLabel="Search"
confirmLabel={translate('Search')}
onConfirm={this.onSearchAllCutoffUnmetConfirmed}
onCancel={this.onConfirmSearchAllCutoffUnmetModalClose}
/>

View File

@ -17,6 +17,7 @@ import { align, icons, kinds } from 'Helpers/Props';
import InteractiveImportModal from 'InteractiveImport/InteractiveImportModal';
import getFilterValue from 'Utilities/Filter/getFilterValue';
import hasDifferentItems from 'Utilities/Object/hasDifferentItems';
import translate from 'Utilities/String/translate';
import getSelectedIds from 'Utilities/Table/getSelectedIds';
import removeOldSelectedState from 'Utilities/Table/removeOldSelectedState';
import selectAll from 'Utilities/Table/selectAll';
@ -153,18 +154,18 @@ class Missing extends Component {
const isShowingMonitored = getMonitoredValue(this.props);
return (
<PageContent title="Missing">
<PageContent title={translate('Missing')}>
<PageToolbar>
<PageToolbarSection>
<PageToolbarButton
label="Search Selected"
label={translate('SearchSelected')}
iconName={icons.SEARCH}
isDisabled={!itemsSelected || isSearchingForMissingEpisodes}
onPress={this.onSearchSelectedPress}
/>
<PageToolbarButton
label={isShowingMonitored ? 'Unmonitor Selected' : 'Monitor Selected'}
label={isShowingMonitored ? translate('UnmonitorSelected') : translate('MonitorSelected')}
iconName={icons.MONITORED}
isDisabled={!itemsSelected}
isSpinning={isSaving}
@ -174,7 +175,7 @@ class Missing extends Component {
<PageToolbarSeparator />
<PageToolbarButton
label="Search All"
label={translate('SearchAll')}
iconName={icons.SEARCH}
isDisabled={!items.length}
isSpinning={isSearchingForMissingEpisodes}
@ -184,7 +185,7 @@ class Missing extends Component {
<PageToolbarSeparator />
<PageToolbarButton
label="Manual Import"
label={translate('ManualImport')}
iconName={icons.INTERACTIVE}
onPress={this.onInteractiveImportPress}
/>
@ -211,14 +212,14 @@ class Missing extends Component {
{
!isFetching && error &&
<Alert kind={kinds.DANGER}>
Error fetching missing items
{translate('MissingLoadError')}
</Alert>
}
{
isPopulated && !error && !items.length &&
<Alert kind={kinds.INFO}>
No missing items
{translate('MissingNoItems')}
</Alert>
}
@ -259,18 +260,18 @@ class Missing extends Component {
<ConfirmModal
isOpen={isConfirmSearchAllMissingModalOpen}
kind={kinds.DANGER}
title="Search for all missing episodes"
title={translate('SearchForAllMissing')}
message={
<div>
<div>
Are you sure you want to search for all {totalRecords} missing episodes?
{translate('SearchForAllMissingConfirmationCount', { totalRecords })}
</div>
<div>
This cannot be cancelled once started without restarting Sonarr or disabling all of your indexers.
{translate('MassSearchCancelWarning')}
</div>
</div>
}
confirmLabel="Search"
confirmLabel={translate('Search')}
onConfirm={this.onSearchAllMissingConfirmed}
onCancel={this.onConfirmSearchAllMissingModalClose}
/>

View File

@ -248,6 +248,8 @@
"CustomFormatsSettingsSummary": "Custom Formats and Settings",
"Cutoff": "Cutoff",
"CutoffUnmet": "Cutoff Unmet",
"CutoffUnmetLoadError": "Error loading cutoff unmet items",
"CutoffUnmetNoItems": "No cutoff unmet items",
"Daily": "Daily",
"DailyEpisodeFormat": "Daily Episode Format",
"DailyTypeDescription": "Episodes released daily or less frequently that use year-month-day (2023-08-04)",
@ -720,6 +722,7 @@
"Mapping": "Mapping",
"MarkAsFailed": "Mark as Failed",
"MarkAsFailedConfirmation": "Are you sure you want to mark '{sourceTitle}' as failed?",
"MassSearchCancelWarning": "This cannot be cancelled once started without restarting Sonarr or disabling all of your indexers.",
"MatchedToEpisodes": "Matched to Episodes",
"MatchedToSeason": "Matched to Season",
"MatchedToSeries": "Matched to Series",
@ -761,6 +764,8 @@
"MinutesThirty": "30 Minutes: {thirty}",
"Missing": "Missing",
"MissingEpisodes": "Missing Episodes",
"MissingLoadError": "Error loading missing items",
"MissingNoItems": "No missing items",
"Mixed": "Mixed",
"Mode": "Mode",
"Monday": "Monday",
@ -779,6 +784,7 @@
"MonitorMissingEpisodesDescription": "Monitor episodes that do not have files or have not aired yet",
"MonitorNone": "None",
"MonitorNoneDescription": "No episodes will be monitored",
"MonitorSelected": "Monitor Selected",
"MonitorSeries": "Monitor Series",
"MonitorSpecials": "Monitor Specials",
"MonitorSpecialsDescription": "Monitor all special episodes without changing the monitored status of other episodes",
@ -1146,14 +1152,20 @@
"Script": "Script",
"ScriptPath": "Script Path",
"Search": "Search",
"SearchAll": "Search All",
"SearchByTvdbId": "You can also search using TVDB ID of a show. eg. tvdb:71663",
"SearchFailedError": "Search failed, please try again later.",
"SearchForAllMissing": "Search for all missing episodes",
"SearchForAllMissingConfirmationCount": "Are you sure you want to search for all {totalRecords} missing episodes?",
"SearchForCutoffUnmet": "Search for all Cutoff Unmet episodes",
"SearchForCutoffUnmetConfirmationCount": "Are you sure you want to search for all {totalRecords} Cutoff Unmet episodes?",
"SearchForMissing": "Search for Missing",
"SearchForMonitoredEpisodes": "Search for monitored episodes",
"SearchForMonitoredEpisodesSeason": "Search for monitored episodes in this season",
"SearchForQuery": "Search for {query}",
"SearchIsNotSupportedWithThisIndexer": "Search is not supported with this indexer",
"SearchMonitored": "Search Monitored",
"SearchSelected": "Search Selected",
"Season": "Season",
"SeasonCount": "Season Count",
"SeasonDetails": "Season Details",
@ -1387,6 +1399,7 @@
"UnmappedFolders": "Unmapped Folders",
"UnmonitorDeletedEpisodes": "Unmonitor Deleted Episodes",
"UnmonitorDeletedEpisodesHelpText": "Episodes deleted from disk are automatically unmonitored in Sonarr",
"UnmonitorSelected": "Unmonitor Selected",
"UnmonitorSpecials": "Unmonitor Specials",
"UnmonitorSpecialsDescription": "Unmonitor all special episodes without changing the monitored status of other episodes",
"Unmonitored": "Unmonitored",