mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-26 22:46:37 -04:00
Localization framework
This commit is contained in:
@@ -8,6 +8,7 @@ import ModalFooter from 'Components/Modal/ModalFooter';
|
||||
import ModalHeader from 'Components/Modal/ModalHeader';
|
||||
import Scroller from 'Components/Scroller/Scroller';
|
||||
import { scrollDirections } from 'Helpers/Props';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import SelectAuthorRow from './SelectAuthorRow';
|
||||
import styles from './SelectAuthorModalContent.css';
|
||||
|
||||
@@ -55,7 +56,7 @@ class SelectAuthorModalContent extends Component {
|
||||
>
|
||||
<TextInput
|
||||
className={styles.filterInput}
|
||||
placeholder="Filter author"
|
||||
placeholder={translate('FilterPlaceHolder')}
|
||||
name="filter"
|
||||
value={filter}
|
||||
autoFocus={true}
|
||||
|
||||
@@ -11,6 +11,7 @@ import Scroller from 'Components/Scroller/Scroller';
|
||||
import Table from 'Components/Table/Table';
|
||||
import TableBody from 'Components/Table/TableBody';
|
||||
import { scrollDirections } from 'Helpers/Props';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import SelectBookRow from './SelectBookRow';
|
||||
import styles from './SelectBookModalContent.css';
|
||||
|
||||
@@ -84,7 +85,7 @@ class SelectBookModalContent extends Component {
|
||||
}
|
||||
<TextInput
|
||||
className={styles.filterInput}
|
||||
placeholder="Filter book"
|
||||
placeholder={translate('FilterPlaceHolder')}
|
||||
name="filter"
|
||||
value={filter}
|
||||
autoFocus={true}
|
||||
|
||||
@@ -5,6 +5,7 @@ import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellCo
|
||||
import TableRowCell from 'Components/Table/Cells/TableRowCell';
|
||||
import TableRow from 'Components/Table/TableRow';
|
||||
import { kinds, sizes } from 'Helpers/Props';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import styles from './SelectBookRow.css';
|
||||
|
||||
function getBookCountKind(monitored, bookFileCount, bookCount) {
|
||||
@@ -85,7 +86,7 @@ class SelectBookRow extends Component {
|
||||
key={name}
|
||||
>
|
||||
<Label
|
||||
title={`${totalBookCount} books total. ${bookFileCount} books with files.`}
|
||||
title={translate('TotalBookCountBooksTotalBookFileCountBooksWithFilesInterp', [totalBookCount, bookFileCount])}
|
||||
kind={getBookCountKind(monitored, bookFileCount, bookCount)}
|
||||
size={sizes.MEDIUM}
|
||||
>
|
||||
|
||||
@@ -5,6 +5,7 @@ import RelativeDateCellConnector from 'Components/Table/Cells/RelativeDateCellCo
|
||||
import TableRowCell from 'Components/Table/Cells/TableRowCell';
|
||||
import TableRowButton from 'Components/Table/TableRowButton';
|
||||
import { icons } from 'Helpers/Props';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import styles from './RecentFolderRow.css';
|
||||
|
||||
class RecentFolderRow extends Component {
|
||||
@@ -44,7 +45,7 @@ class RecentFolderRow extends Component {
|
||||
|
||||
<TableRowCell className={styles.actions}>
|
||||
<IconButton
|
||||
title="Remove"
|
||||
title={translate('Remove')}
|
||||
name={icons.REMOVE}
|
||||
onPress={this.onRemovePress}
|
||||
/>
|
||||
|
||||
@@ -15,6 +15,7 @@ import SelectAuthorModal from 'InteractiveImport/Author/SelectAuthorModal';
|
||||
import SelectBookModal from 'InteractiveImport/Book/SelectBookModal';
|
||||
import SelectQualityModal from 'InteractiveImport/Quality/SelectQualityModal';
|
||||
import formatBytes from 'Utilities/Number/formatBytes';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import InteractiveImportRowCellPlaceholder from './InteractiveImportRowCellPlaceholder';
|
||||
import styles from './InteractiveImportRow.css';
|
||||
|
||||
@@ -211,7 +212,7 @@ class InteractiveImportRow extends Component {
|
||||
|
||||
<TableRowCellButton
|
||||
isDisabled={!allowAuthorChange}
|
||||
title={allowAuthorChange ? 'Click to change author' : undefined}
|
||||
title={allowAuthorChange ? translate('AllowAuthorChangeClickToChangeAuthor') : undefined}
|
||||
onPress={this.onSelectAuthorPress}
|
||||
>
|
||||
{
|
||||
@@ -221,7 +222,7 @@ class InteractiveImportRow extends Component {
|
||||
|
||||
<TableRowCellButton
|
||||
isDisabled={!author}
|
||||
title={author ? 'Click to change book' : undefined}
|
||||
title={author ? translate('AuthorClickToChangeBook') : undefined}
|
||||
onPress={this.onSelectBookPress}
|
||||
>
|
||||
{
|
||||
@@ -231,7 +232,7 @@ class InteractiveImportRow extends Component {
|
||||
|
||||
<TableRowCellButton
|
||||
className={styles.quality}
|
||||
title="Click to change quality"
|
||||
title={translate('ClickToChangeQuality')}
|
||||
onPress={this.onSelectQualityPress}
|
||||
>
|
||||
{
|
||||
@@ -262,7 +263,7 @@ class InteractiveImportRow extends Component {
|
||||
kind={kinds.DANGER}
|
||||
/>
|
||||
}
|
||||
title="Release Rejected"
|
||||
title={translate('ReleaseRejected')}
|
||||
body={
|
||||
<ul>
|
||||
{
|
||||
@@ -284,12 +285,12 @@ class InteractiveImportRow extends Component {
|
||||
|
||||
<ConfirmModal
|
||||
isOpen={isDetailsModalOpen}
|
||||
title="File Details"
|
||||
title={translate('FileDetails')}
|
||||
message={fileDetails}
|
||||
size={sizes.LARGE}
|
||||
kind={kinds.DEFAULT}
|
||||
hideCancelButton={true}
|
||||
confirmLabel="Close"
|
||||
confirmLabel={translate('Close')}
|
||||
onConfirm={this.onDetailsModalClose}
|
||||
onCancel={this.onDetailsModalClose}
|
||||
/>
|
||||
|
||||
@@ -11,6 +11,7 @@ import ModalContent from 'Components/Modal/ModalContent';
|
||||
import ModalFooter from 'Components/Modal/ModalFooter';
|
||||
import ModalHeader from 'Components/Modal/ModalHeader';
|
||||
import { inputTypes, kinds } from 'Helpers/Props';
|
||||
import translate from 'Utilities/String/translate';
|
||||
|
||||
class SelectQualityModalContent extends Component {
|
||||
|
||||
@@ -91,14 +92,18 @@ class SelectQualityModalContent extends Component {
|
||||
|
||||
{
|
||||
!isFetching && !!error &&
|
||||
<div>Unable to load qualities</div>
|
||||
<div>
|
||||
{translate('UnableToLoadQualities')}
|
||||
</div>
|
||||
}
|
||||
|
||||
{
|
||||
isPopulated && !error &&
|
||||
<Form>
|
||||
<FormGroup>
|
||||
<FormLabel>Quality</FormLabel>
|
||||
<FormLabel>
|
||||
{translate('Quality')}
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.SELECT}
|
||||
@@ -110,7 +115,9 @@ class SelectQualityModalContent extends Component {
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>Proper</FormLabel>
|
||||
<FormLabel>
|
||||
{translate('Proper')}
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
@@ -121,7 +128,9 @@ class SelectQualityModalContent extends Component {
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>Real</FormLabel>
|
||||
<FormLabel>
|
||||
{translate('Real')}
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
|
||||
Reference in New Issue
Block a user