Skip to content

Commit

Permalink
Add simplified translations
Browse files Browse the repository at this point in the history
  • Loading branch information
mynameisbogdan committed Aug 11, 2023
1 parent 894a594 commit abaf39d
Show file tree
Hide file tree
Showing 8 changed files with 135 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,39 @@ import { inputTypes } from 'Helpers/Props';
import translate from 'Utilities/String/translate';

const nameOptions = [
{ key: 'firstLast', value: translate('NameFirstLast') },
{ key: 'lastFirst', value: translate('NameLastFirst') }
{
key: 'firstLast',
get value() {
return translate('NameFirstLast');
}
},
{
key: 'lastFirst',
get value() {
return translate('NameLastFirst');
}
}
];

const posterSizeOptions = [
{ key: 'small', value: 'Small' },
{ key: 'medium', value: 'Medium' },
{ key: 'large', value: 'Large' }
{
key: 'small',
get value() {
return translate('Small');
}
},
{
key: 'medium',
get value() {
return translate('Medium');
}
},
{
key: 'large',
get value() {
return translate('Large');
}
}
];

class AuthorIndexOverviewOptionsModalContent extends Component {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,45 @@ import { inputTypes } from 'Helpers/Props';
import translate from 'Utilities/String/translate';

const posterSizeOptions = [
{ key: 'small', value: 'Small' },
{ key: 'medium', value: 'Medium' },
{ key: 'large', value: 'Large' }
{
key: 'small',
get value() {
return translate('Small');
}
},
{
key: 'medium',
get value() {
return translate('Medium');
}
},
{
key: 'large',
get value() {
return translate('Large');
}
}
];

const nameOptions = [
{ key: 'no', value: translate('NoName') },
{ key: 'firstLast', value: translate('NameFirstLast') },
{ key: 'lastFirst', value: translate('NameLastFirst') }
{
key: 'no',
get value() {
return translate('NoName');
}
},
{
key: 'firstLast',
get value() {
return translate('NameFirstLast');
}
},
{
key: 'lastFirst',
get value() {
return translate('NameLastFirst');
}
}
];

class AuthorIndexPosterOptionsModalContent extends Component {
Expand Down
14 changes: 12 additions & 2 deletions frontend/src/Author/Index/Table/AuthorIndexTableOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,18 @@ import { inputTypes } from 'Helpers/Props';
import translate from 'Utilities/String/translate';

const nameOptions = [
{ key: 'firstLast', value: translate('NameFirstLast') },
{ key: 'lastFirst', value: translate('NameLastFirst') }
{
key: 'firstLast',
get value() {
return translate('NameFirstLast');
}
},
{
key: 'lastFirst',
get value() {
return translate('NameLastFirst');
}
}
];

class AuthorIndexTableOptions extends Component {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const columns = [
name: 'customFormats',
label: React.createElement(Icon, {
name: icons.INTERACTIVE,
title: translate('CustomFormat')
title: () => translate('CustomFormat')
}),
isSortable: true,
isVisible: true
Expand All @@ -91,9 +91,9 @@ const filterExistingFilesOptions = {
};

const importModeOptions = [
{ key: 'chooseImportMode', value: translate('ChooseImportMethod'), disabled: true },
{ key: 'move', value: translate('MoveFiles') },
{ key: 'copy', value: translate('HardlinkCopyFiles') }
{ key: 'chooseImportMode', value: () => translate('ChooseImportMethod'), disabled: true },
{ key: 'move', value: () => translate('MoveFiles') },
{ key: 'copy', value: () => translate('HardlinkCopyFiles') }
];

const SELECT = 'select';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/InteractiveSearch/InteractiveSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const columns = [
name: 'customFormatScore',
label: React.createElement(Icon, {
name: icons.SCORE,
title: translate('CustomFormatScore')
title: () => translate('CustomFormatScore')
}),
isSortable: true,
isVisible: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const COLUMNS = [
},
{
name: 'metadataProfileId',
label: translate('MetadataProfile'),
label: () => translate('MetadataProfile'),
isSortable: true,
isVisible: true,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,51 @@ import { inputTypes, kinds } from 'Helpers/Props';
import translate from 'Utilities/String/translate';

const writeAudioTagOptions = [
{ key: 'no', value: translate('WriteTagsNo') },
{ key: 'sync', value: translate('WriteTagsSync') },
{ key: 'allFiles', value: translate('WriteTagsAll') },
{ key: 'newFiles', value: translate('WriteTagsNew') }
{
key: 'no',
get value() {
return translate('WriteTagsNo');
}
},
{
key: 'sync',
get value() {
return translate('WriteTagsSync');
}
},
{
key: 'allFiles',
get value() {
return translate('WriteTagsAll');
}
},
{
key: 'newFiles',
get value() {
return translate('WriteTagsNew');
}
}
];

const writeBookTagOptions = [
{ key: 'sync', value: translate('WriteTagsSync') },
{ key: 'allFiles', value: translate('WriteTagsAll') },
{ key: 'newFiles', value: translate('WriteTagsNew') }
{
key: 'sync',
get value() {
return translate('WriteTagsSync');
}
},
{
key: 'allFiles',
get value() {
return translate('WriteTagsAll');
}
},
{
key: 'newFiles',
get value() {
return translate('WriteTagsNew');
}
}
];

function MetadataProvider(props) {
Expand Down
9 changes: 9 additions & 0 deletions src/NzbDrone.Core/Localization/Core/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"Automatic": "Automatic",
"AutomaticAdd": "Automatic Add",
"AutomaticallySwitchEdition": "Automatically Switch Edition",
"Backup": "Backup",
"BackupFolderHelpText": "Relative paths will be under Readarr's AppData directory",
"BackupIntervalHelpText": "Interval to backup the Readarr DB and settings",
"BackupNow": "Backup Now",
Expand Down Expand Up @@ -91,6 +92,7 @@
"BookTitle": "Book Title",
"Books": "Books",
"BooksTotal": "Books ({0})",
"Bookshelf": "Bookshelf",
"Branch": "Branch",
"BypassIfAboveCustomFormatScore": "Bypass if Above Custom Format Score",
"BypassIfAboveCustomFormatScoreHelpText": "Enable bypass when release has a score higher than the configured minimum custom format score",
Expand Down Expand Up @@ -298,6 +300,7 @@
"EntityName": "Entity Name",
"ErrorLoadingContents": "Error loading contents",
"ErrorLoadingPreviews": "Error loading previews",
"Events": "Events",
"Exception": "Exception",
"ExistingBooks": "Existing Books",
"ExistingItems": "Existing Items",
Expand Down Expand Up @@ -434,6 +437,9 @@
"ItsEasyToAddANewAuthorOrBookJustStartTypingTheNameOfTheItemYouWantToAdd": "It's easy to add a New Author or Book just start typing the name of the item you want to add",
"Label": "Label",
"Language": "Language",
"Large": "Large",
"LastDuration": "Last Duration",
"LastExecution": "Last Execution",
"LastWriteTime": "Last Write Time",
"LatestBook": "Latest Book",
"LaunchBrowserHelpText": " Open a web browser and navigate to Readarr homepage on app start.",
Expand Down Expand Up @@ -482,6 +488,7 @@
"MediaManagement": "Media Management",
"MediaManagementSettings": "Media Management Settings",
"MediaManagementSettingsSummary": "Naming, file management settings and root folders",
"Medium": "Medium",
"Message": "Message",
"Metadata": "Metadata",
"MetadataConsumers": "Metadata Consumers",
Expand Down Expand Up @@ -547,6 +554,7 @@
"Negated": "Negated",
"New": "New",
"NewBooks": "New Books",
"NextExecution": "Next Execution",
"No": "No",
"NoBackupsAreAvailable": "No backups are available",
"NoChange": "No Change",
Expand Down Expand Up @@ -834,6 +842,7 @@
"SkipRedownload": "Skip Redownload",
"SkipRedownloadHelpText": "Prevents Readarr from trying download alternative releases for the removed items",
"SkipSecondarySeriesBooks": "Skip secondary series books",
"Small": "Small",
"SmartReplace": "Smart Replace",
"SorryThatAuthorCannotBeFound": "Sorry, that author cannot be found.",
"SorryThatBookCannotBeFound": "Sorry, that book cannot be found.",
Expand Down

0 comments on commit abaf39d

Please sign in to comment.