mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-21 22:04:31 -04:00
Localization framework
This commit is contained in:
@@ -6,6 +6,7 @@ import IconButton from 'Components/Link/IconButton';
|
||||
import SpinnerIconButton from 'Components/Link/SpinnerIconButton';
|
||||
import VirtualTableRowCell from 'Components/Table/Cells/VirtualTableRowCell';
|
||||
import { icons } from 'Helpers/Props';
|
||||
import translate from 'Utilities/String/translate';
|
||||
|
||||
class AuthorIndexActionsCell extends Component {
|
||||
|
||||
@@ -65,14 +66,14 @@ class AuthorIndexActionsCell extends Component {
|
||||
>
|
||||
<SpinnerIconButton
|
||||
name={icons.REFRESH}
|
||||
title="Refresh Author"
|
||||
title={translate('RefreshAuthor')}
|
||||
isSpinning={isRefreshingAuthor}
|
||||
onPress={onRefreshAuthorPress}
|
||||
/>
|
||||
|
||||
<IconButton
|
||||
name={icons.EDIT}
|
||||
title="Edit Author"
|
||||
title={translate('EditAuthor')}
|
||||
onPress={this.onEditAuthorPress}
|
||||
/>
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ import TagListConnector from 'Components/TagListConnector';
|
||||
import { icons } from 'Helpers/Props';
|
||||
import getProgressBarKind from 'Utilities/Author/getProgressBarKind';
|
||||
import formatBytes from 'Utilities/Number/formatBytes';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import AuthorStatusCell from './AuthorStatusCell';
|
||||
import hasGrowableColumns from './hasGrowableColumns';
|
||||
import styles from './AuthorIndexRow.css';
|
||||
@@ -278,7 +279,7 @@ class AuthorIndexRow extends Component {
|
||||
kind={getProgressBarKind(status, monitored, progress)}
|
||||
showText={true}
|
||||
text={`${bookFileCount} / ${bookCount}`}
|
||||
title={`${bookFileCount} / ${bookCount} (Total: ${totalBookCount})`}
|
||||
title={translate('BookFileCountBookCountTotalTotalBookCountInterp', [bookFileCount, bookCount, totalBookCount])}
|
||||
width={125}
|
||||
/>
|
||||
</VirtualTableRowCell>
|
||||
@@ -356,7 +357,7 @@ class AuthorIndexRow extends Component {
|
||||
>
|
||||
<SpinnerIconButton
|
||||
name={icons.REFRESH}
|
||||
title="Refresh Author"
|
||||
title={translate('RefreshAuthor')}
|
||||
isSpinning={isRefreshingAuthor}
|
||||
onPress={onRefreshAuthorPress}
|
||||
/>
|
||||
@@ -366,7 +367,7 @@ class AuthorIndexRow extends Component {
|
||||
<SpinnerIconButton
|
||||
className={styles.action}
|
||||
name={icons.SEARCH}
|
||||
title="Search for monitored books"
|
||||
title={translate('SearchForMonitoredBooks')}
|
||||
isSpinning={isSearchingAuthor}
|
||||
onPress={onSearchPress}
|
||||
/>
|
||||
@@ -374,7 +375,7 @@ class AuthorIndexRow extends Component {
|
||||
|
||||
<IconButton
|
||||
name={icons.EDIT}
|
||||
title="Edit Author"
|
||||
title={translate('EditAuthor')}
|
||||
onPress={this.onEditAuthorPress}
|
||||
/>
|
||||
</VirtualTableRowCell>
|
||||
|
||||
@@ -4,6 +4,7 @@ import FormGroup from 'Components/Form/FormGroup';
|
||||
import FormInputGroup from 'Components/Form/FormInputGroup';
|
||||
import FormLabel from 'Components/Form/FormLabel';
|
||||
import { inputTypes } from 'Helpers/Props';
|
||||
import translate from 'Utilities/String/translate';
|
||||
|
||||
class AuthorIndexTableOptions extends Component {
|
||||
|
||||
@@ -64,25 +65,29 @@ class AuthorIndexTableOptions extends Component {
|
||||
return (
|
||||
<Fragment>
|
||||
<FormGroup>
|
||||
<FormLabel>Show Banners</FormLabel>
|
||||
<FormLabel>
|
||||
{translate('ShowBanners')}
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="showBanners"
|
||||
value={showBanners}
|
||||
helpText="Show banners instead of names"
|
||||
helpText={translate('ShowBannersHelpText')}
|
||||
onChange={this.onTableOptionChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>Show Search</FormLabel>
|
||||
<FormLabel>
|
||||
{translate('ShowSearch')}
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="showSearchAction"
|
||||
value={showSearchAction}
|
||||
helpText="Show search button on hover"
|
||||
helpText={translate('ShowSearchActionHelpText')}
|
||||
onChange={this.onTableOptionChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
@@ -3,6 +3,7 @@ import React from 'react';
|
||||
import Icon from 'Components/Icon';
|
||||
import VirtualTableRowCell from 'Components/Table/Cells/TableRowCell';
|
||||
import { icons } from 'Helpers/Props';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import styles from './AuthorStatusCell.css';
|
||||
|
||||
function AuthorStatusCell(props) {
|
||||
@@ -22,13 +23,13 @@ function AuthorStatusCell(props) {
|
||||
<Icon
|
||||
className={styles.statusIcon}
|
||||
name={monitored ? icons.MONITORED : icons.UNMONITORED}
|
||||
title={monitored ? 'Author is monitored' : 'Author is unmonitored'}
|
||||
title={monitored ? translate('MonitoredAuthorIsMonitored') : translate('MonitoredAuthorIsUnmonitored')}
|
||||
/>
|
||||
|
||||
<Icon
|
||||
className={styles.statusIcon}
|
||||
name={status === 'ended' ? icons.AUTHOR_ENDED : icons.AUTHOR_CONTINUING}
|
||||
title={status === 'ended' ? 'Deceased' : 'Continuing'}
|
||||
title={status === 'ended' ? translate('StatusEndedDeceased') : translate('StatusEndedContinuing')}
|
||||
/>
|
||||
</Component>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user