From e04f36186b134c3a02a925397c4714232e3c53a8 Mon Sep 17 00:00:00 2001 From: Stevie Robinson Date: Sun, 27 Aug 2023 23:03:29 +0200 Subject: [PATCH] translate frontend wanted --- .../src/Wanted/CutoffUnmet/CutoffUnmet.js | 21 +++++++++-------- frontend/src/Wanted/Missing/Missing.js | 23 ++++++++++--------- src/NzbDrone.Core/Localization/Core/en.json | 13 +++++++++++ 3 files changed, 36 insertions(+), 21 deletions(-) diff --git a/frontend/src/Wanted/CutoffUnmet/CutoffUnmet.js b/frontend/src/Wanted/CutoffUnmet/CutoffUnmet.js index 05162d8b4..a03ea8b2e 100644 --- a/frontend/src/Wanted/CutoffUnmet/CutoffUnmet.js +++ b/frontend/src/Wanted/CutoffUnmet/CutoffUnmet.js @@ -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 ( - + - Error fetching cutoff unmet + {translate('CutoffUnmetLoadError')} } { isPopulated && !error && !items.length && - No cutoff unmet items + {translate('CutoffUnmetNoItems')} } @@ -246,18 +247,18 @@ class CutoffUnmet extends Component {
- Are you sure you want to search for all {totalRecords} Cutoff Unmet episodes? + {translate('SearchForCutoffUnmetConfirmationCount', { totalRecords })}
- This cannot be cancelled once started without restarting Sonarr or disabling all of your indexers. + {translate('MassSearchCancelWarning')}
} - confirmLabel="Search" + confirmLabel={translate('Search')} onConfirm={this.onSearchAllCutoffUnmetConfirmed} onCancel={this.onConfirmSearchAllCutoffUnmetModalClose} /> diff --git a/frontend/src/Wanted/Missing/Missing.js b/frontend/src/Wanted/Missing/Missing.js index d4909b54b..4185e54e3 100644 --- a/frontend/src/Wanted/Missing/Missing.js +++ b/frontend/src/Wanted/Missing/Missing.js @@ -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 ( - + @@ -211,14 +212,14 @@ class Missing extends Component { { !isFetching && error && - Error fetching missing items + {translate('MissingLoadError')} } { isPopulated && !error && !items.length && - No missing items + {translate('MissingNoItems')} } @@ -259,18 +260,18 @@ class Missing extends Component {
- Are you sure you want to search for all {totalRecords} missing episodes? + {translate('SearchForAllMissingConfirmationCount', { totalRecords })}
- This cannot be cancelled once started without restarting Sonarr or disabling all of your indexers. + {translate('MassSearchCancelWarning')}
} - confirmLabel="Search" + confirmLabel={translate('Search')} onConfirm={this.onSearchAllMissingConfirmed} onCancel={this.onConfirmSearchAllMissingModalClose} /> diff --git a/src/NzbDrone.Core/Localization/Core/en.json b/src/NzbDrone.Core/Localization/Core/en.json index aef7a46ed..243b3e6f2 100644 --- a/src/NzbDrone.Core/Localization/Core/en.json +++ b/src/NzbDrone.Core/Localization/Core/en.json @@ -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",