diff --git a/frontend/src/Settings/MediaManagement/Naming/NamingModal.js b/frontend/src/Settings/MediaManagement/Naming/NamingModal.js
index 35244e64e..dec15893f 100644
--- a/frontend/src/Settings/MediaManagement/Naming/NamingModal.js
+++ b/frontend/src/Settings/MediaManagement/Naming/NamingModal.js
@@ -15,16 +15,51 @@ import NamingOption from './NamingOption';
import styles from './NamingModal.css';
const separatorOptions = [
- { key: ' ', value: 'Space ( )' },
- { key: '.', value: 'Period (.)' },
- { key: '_', value: 'Underscore (_)' },
- { key: '-', value: 'Dash (-)' }
+ {
+ key: ' ',
+ get value() {
+ return `${translate('Space')} ( )`;
+ }
+ },
+ {
+ key: '.',
+ get value() {
+ return `${translate('Period')} (.)`;
+ }
+ },
+ {
+ key: '_',
+ get value() {
+ return `${translate('Underscore')} (_)`;
+ }
+ },
+ {
+ key: '-',
+ get value() {
+ return `${translate('Dash')} (-)`;
+ }
+ }
];
const caseOptions = [
- { key: 'title', value: 'Default Case' },
- { key: 'lower', value: 'Lowercase' },
- { key: 'upper', value: 'Uppercase' }
+ {
+ key: 'title',
+ get value() {
+ return translate('DefaultCase');
+ }
+ },
+ {
+ key: 'lower',
+ get value() {
+ return translate('Lowercase');
+ }
+ },
+ {
+ key: 'upper',
+ get value() {
+ return translate('Uppercase');
+ }
+ }
];
const fileNameTokens = [
@@ -40,33 +75,23 @@ const fileNameTokens = [
const artistTokens = [
{ token: '{Artist Name}', example: 'Artist Name' },
-
+ { token: '{Artist CleanName}', example: 'Artist Name' },
{ token: '{Artist NameThe}', example: 'Artist Name, The' },
-
+ { token: '{Artist CleanNameThe}', example: 'Artist Name, The' },
{ token: '{Artist NameFirstCharacter}', example: 'A' },
-
- { token: '{Artist CleanName}', example: 'Artist Name' },
-
{ token: '{Artist Disambiguation}', example: 'Disambiguation' },
-
{ token: '{Artist Genre}', example: 'Pop' },
-
{ token: '{Artist MbId}', example: 'db92a151-1ac2-438b-bc43-b82e149ddd50' }
];
const albumTokens = [
{ token: '{Album Title}', example: 'Album Title' },
-
- { token: '{Album TitleThe}', example: 'Album Title, The' },
-
{ token: '{Album CleanTitle}', example: 'Album Title' },
-
+ { token: '{Album TitleThe}', example: 'Album Title, The' },
+ { token: '{Album CleanTitleThe}', example: 'Album Title, The' },
{ token: '{Album Type}', example: 'Album Type' },
-
{ token: '{Album Disambiguation}', example: 'Disambiguation' },
-
{ token: '{Album Genre}', example: 'Rock' },
-
{ token: '{Album MbId}', example: '082c6aff-a7cc-36e0-a960-35a578ecd937' }
];
@@ -96,8 +121,9 @@ const trackTitleTokens = [
const trackArtistTokens = [
{ token: '{Track ArtistName}', example: 'Artist Name' },
- { token: '{Track ArtistNameThe}', example: 'Artist Name, The' },
{ token: '{Track ArtistCleanName}', example: 'Artist Name' },
+ { token: '{Track ArtistNameThe}', example: 'Artist Name, The' },
+ { token: '{Track ArtistCleanNameThe}', example: 'Artist Name, The' },
{ token: '{Track ArtistMbId}', example: 'db92a151-1ac2-438b-bc43-b82e149ddd50' }
];
@@ -213,7 +239,7 @@ class NamingModal extends Component {
>
- File Name Tokens
+ {translate('FileNameTokens')}
@@ -552,7 +578,7 @@ class NamingModal extends Component {
onSelectionChange={this.onInputSelectionChange}
/>
diff --git a/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/CleanTitleTheFixture.cs b/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/CleanTitleTheFixture.cs
new file mode 100644
index 000000000..3cbfd9928
--- /dev/null
+++ b/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/CleanTitleTheFixture.cs
@@ -0,0 +1,98 @@
+using System.Collections.Generic;
+using System.Linq;
+using FizzWare.NBuilder;
+using FluentAssertions;
+using NUnit.Framework;
+using NzbDrone.Core.CustomFormats;
+using NzbDrone.Core.MediaFiles;
+using NzbDrone.Core.Music;
+using NzbDrone.Core.Organizer;
+using NzbDrone.Core.Qualities;
+using NzbDrone.Core.Test.Framework;
+
+namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
+{
+ [TestFixture]
+ public class CleanTitleTheFixture : CoreTest
+ {
+ private Artist _artist;
+ private Album _album;
+ private AlbumRelease _release;
+ private Track _track;
+ private TrackFile _trackFile;
+ private NamingConfig _namingConfig;
+
+ [SetUp]
+ public void Setup()
+ {
+ _artist = Builder
+ .CreateNew()
+ .With(s => s.Name = "Avenged Sevenfold")
+ .Build();
+
+ _album = Builder
+ .CreateNew()
+ .With(s => s.Title = "Hail to the King")
+ .Build();
+
+ _release = Builder
+ .CreateNew()
+ .With(s => s.Media = new List { new Medium { Number = 1 } })
+ .Build();
+
+ _track = Builder