From 7fc3bebc91db217a1c24ab2d01ebbc5bf03c918e Mon Sep 17 00:00:00 2001 From: fireph <443370+fireph@users.noreply.github.com> Date: Fri, 5 Apr 2024 23:10:42 -0700 Subject: [PATCH] New: Footnote to indicate some renaming tokens support truncation --- .../MediaManagement/Naming/NamingModal.js | 55 ++++++++++++------- src/NzbDrone.Core/Localization/Core/en.json | 3 + 2 files changed, 39 insertions(+), 19 deletions(-) diff --git a/frontend/src/Settings/MediaManagement/Naming/NamingModal.js b/frontend/src/Settings/MediaManagement/Naming/NamingModal.js index f873ec1d9..eec2449cd 100644 --- a/frontend/src/Settings/MediaManagement/Naming/NamingModal.js +++ b/frontend/src/Settings/MediaManagement/Naming/NamingModal.js @@ -80,19 +80,19 @@ const fileNameTokens = [ ]; const seriesTokens = [ - { token: '{Series Title}', example: 'The Series Title\'s!' }, - { token: '{Series CleanTitle}', example: 'The Series Title\'s!' }, - { token: '{Series TitleYear}', example: 'The Series Title\'s! (2010)' }, - { token: '{Series CleanTitleYear}', example: 'The Series Title\'s! 2010' }, - { token: '{Series TitleWithoutYear}', example: 'The Series Title\'s!' }, - { token: '{Series CleanTitleWithoutYear}', example: 'The Series Title\'s!' }, - { token: '{Series TitleThe}', example: 'Series Title\'s!, The' }, - { token: '{Series CleanTitleThe}', example: 'Series Title\'s!, The' }, - { token: '{Series TitleTheYear}', example: 'Series Title\'s!, The (2010)' }, - { token: '{Series CleanTitleTheYear}', example: 'Series Title\'s!, The 2010' }, - { token: '{Series TitleTheWithoutYear}', example: 'Series Title\'s!, The' }, - { token: '{Series CleanTitleTheWithoutYear}', example: 'Series Title\'s!, The' }, - { token: '{Series TitleFirstCharacter}', example: 'S' }, + { token: '{Series Title}', example: 'The Series Title\'s!', footNote: 1 }, + { token: '{Series CleanTitle}', example: 'The Series Title\'s!', footNote: 1 }, + { token: '{Series TitleYear}', example: 'The Series Title\'s! (2010)', footNote: 1 }, + { token: '{Series CleanTitleYear}', example: 'The Series Title\'s! 2010', footNote: 1 }, + { token: '{Series TitleWithoutYear}', example: 'The Series Title\'s!', footNote: 1 }, + { token: '{Series CleanTitleWithoutYear}', example: 'The Series Title\'s!', footNote: 1 }, + { token: '{Series TitleThe}', example: 'Series Title\'s!, The', footNote: 1 }, + { token: '{Series CleanTitleThe}', example: 'Series Title\'s!, The', footNote: 1 }, + { token: '{Series TitleTheYear}', example: 'Series Title\'s!, The (2010)', footNote: 1 }, + { token: '{Series CleanTitleTheYear}', example: 'Series Title\'s!, The 2010', footNote: 1 }, + { token: '{Series TitleTheWithoutYear}', example: 'Series Title\'s!, The', footNote: 1 }, + { token: '{Series CleanTitleTheWithoutYear}', example: 'Series Title\'s!, The', footNote: 1 }, + { token: '{Series TitleFirstCharacter}', example: 'S', footNote: 1 }, { token: '{Series Year}', example: '2010' } ]; @@ -124,8 +124,8 @@ const absoluteTokens = [ ]; const episodeTitleTokens = [ - { token: '{Episode Title}', example: 'Episode\'s Title' }, - { token: '{Episode CleanTitle}', example: 'Episodes Title' } + { token: '{Episode Title}', example: 'Episode\'s Title', footNote: 1 }, + { token: '{Episode CleanTitle}', example: 'Episodes Title', footNote: 1 } ]; const qualityTokens = [ @@ -149,7 +149,7 @@ const mediaInfoTokens = [ ]; const otherTokens = [ - { token: '{Release Group}', example: 'Rls Grp' }, + { token: '{Release Group}', example: 'Rls Grp', footNote: 1 }, { token: '{Custom Formats}', example: 'iNTERNAL' }, { token: '{Custom Format:FormatName}', example: 'AMZN' } ]; @@ -305,7 +305,7 @@ class NamingModal extends Component {
{ - seriesTokens.map(({ token, example }) => { + seriesTokens.map(({ token, example, footNote }) => { return ( + +
+ + +
@@ -451,7 +457,7 @@ class NamingModal extends Component {
{ - episodeTitleTokens.map(({ token, example }) => { + episodeTitleTokens.map(({ token, example, footNote }) => { return ( +
+ + +
@@ -523,7 +534,7 @@ class NamingModal extends Component {
{ - otherTokens.map(({ token, example }) => { + otherTokens.map(({ token, example, footNote }) => { return ( + +
+ + +
diff --git a/src/NzbDrone.Core/Localization/Core/en.json b/src/NzbDrone.Core/Localization/Core/en.json index 983284b25..b41d10d93 100644 --- a/src/NzbDrone.Core/Localization/Core/en.json +++ b/src/NzbDrone.Core/Localization/Core/en.json @@ -636,6 +636,7 @@ "EpisodeRequested": "Episode Requested", "EpisodeSearchResultsLoadError": "Unable to load results for this episode search. Try again later", "EpisodeTitle": "Episode Title", + "EpisodeTitleFootNote": "Optionally control truncation to a maximum number of bytes including ellipsis (`...`). Truncating from the end (e.g. `{Episode Title:30}`) or the beginning (e.g. `{Episode Title:-30}`) are both supported. Episode titles will be automatically truncated to file system limitations if necessary.", "EpisodeTitleRequired": "Episode Title Required", "EpisodeTitleRequiredHelpText": "Prevent importing for up to 48 hours if the episode title is in the naming format and the episode title is TBA", "Episodes": "Episodes", @@ -1590,6 +1591,7 @@ "RelativePath": "Relative Path", "Release": "Release", "ReleaseGroup": "Release Group", + "ReleaseGroupFootNote": "Optionally control truncation to a maximum number of bytes including ellipsis (`...`). Truncating from the end (e.g. `{Release Group:30}`) or the beginning (e.g. `{Release Group:-30}`) are both supported.`).", "ReleaseGroups": "Release Groups", "ReleaseHash": "Release Hash", "ReleaseProfile": "Release Profile", @@ -1780,6 +1782,7 @@ "SelectSeries": "Select Series", "SendAnonymousUsageData": "Send Anonymous Usage Data", "Series": "Series", + "SeriesFootNote": "Optionally control truncation to a maximum number of bytes including ellipsis (`...`). Truncating from the end (e.g. `{Series Title:30}`) or the beginning (e.g. `{Series Title:-30}`) are both supported.", "SeriesAndEpisodeInformationIsProvidedByTheTVDB": "Series and episode information is provided by TheTVDB.com. [Please consider supporting them]({url}) .", "SeriesCannotBeFound": "Sorry, that series cannot be found.", "SeriesDetailsCountEpisodeFiles": "{episodeFileCount} episode files",