mirror of
https://github.com/lidarr/Lidarr
synced 2025-01-03 05:25:10 +00:00
Add some translations for artist table index
This commit is contained in:
parent
09e9162aa6
commit
49883d0e30
4 changed files with 47 additions and 32 deletions
|
@ -24,7 +24,7 @@ import TagListConnector from 'Components/TagListConnector';
|
|||
import { icons } from 'Helpers/Props';
|
||||
import { executeCommand } from 'Store/Actions/commandActions';
|
||||
import formatBytes from 'Utilities/Number/formatBytes';
|
||||
import titleCase from 'Utilities/String/titleCase';
|
||||
import firstCharToUpper from 'Utilities/String/firstCharToUpper';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import AlbumsCell from './AlbumsCell';
|
||||
import hasGrowableColumns from './hasGrowableColumns';
|
||||
|
@ -224,14 +224,6 @@ function ArtistIndexRow(props: ArtistIndexRowProps) {
|
|||
);
|
||||
}
|
||||
|
||||
if (name === 'qualityProfileId') {
|
||||
return (
|
||||
<VirtualTableRowCell key={name} className={styles[name]}>
|
||||
{qualityProfile.name}
|
||||
</VirtualTableRowCell>
|
||||
);
|
||||
}
|
||||
|
||||
if (name === 'metadataProfileId') {
|
||||
return (
|
||||
<VirtualTableRowCell key={name} className={styles[name]}>
|
||||
|
@ -243,7 +235,7 @@ function ArtistIndexRow(props: ArtistIndexRowProps) {
|
|||
if (name === 'monitorNewItems') {
|
||||
return (
|
||||
<VirtualTableRowCell key={name} className={styles[name]}>
|
||||
{titleCase(monitorNewItems)}
|
||||
{translate(firstCharToUpper(monitorNewItems))}
|
||||
</VirtualTableRowCell>
|
||||
);
|
||||
}
|
||||
|
@ -262,7 +254,7 @@ function ArtistIndexRow(props: ArtistIndexRowProps) {
|
|||
}
|
||||
return (
|
||||
<VirtualTableRowCell key={name} className={styles[name]}>
|
||||
None
|
||||
{translate('None')}
|
||||
</VirtualTableRowCell>
|
||||
);
|
||||
}
|
||||
|
@ -281,7 +273,7 @@ function ArtistIndexRow(props: ArtistIndexRowProps) {
|
|||
}
|
||||
return (
|
||||
<VirtualTableRowCell key={name} className={styles[name]}>
|
||||
None
|
||||
{translate('None')}
|
||||
</VirtualTableRowCell>
|
||||
);
|
||||
}
|
||||
|
@ -338,7 +330,7 @@ function ArtistIndexRow(props: ArtistIndexRowProps) {
|
|||
if (name === 'path') {
|
||||
return (
|
||||
<VirtualTableRowCell key={name} className={styles[name]}>
|
||||
{path}
|
||||
<span title={path}>{path}</span>
|
||||
</VirtualTableRowCell>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
import React from 'react';
|
||||
import FilterBuilderRowValue from './FilterBuilderRowValue';
|
||||
|
||||
const options = [
|
||||
{ id: 'all', name: 'All Albums' },
|
||||
{ id: 'new', name: 'New' },
|
||||
{ id: 'none', name: 'None' }
|
||||
];
|
||||
|
||||
function MonitorNewItemsFilterBuilderRowValue(props) {
|
||||
return (
|
||||
<FilterBuilderRowValue
|
||||
tagList={options}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default MonitorNewItemsFilterBuilderRowValue;
|
|
@ -0,0 +1,33 @@
|
|||
import React from 'react';
|
||||
import FilterBuilderRowValueProps from 'Components/Filter/Builder/FilterBuilderRowValueProps';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import FilterBuilderRowValue from './FilterBuilderRowValue';
|
||||
|
||||
const options = [
|
||||
{
|
||||
id: 'all',
|
||||
get name() {
|
||||
return translate('AllAlbums');
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'new',
|
||||
get name() {
|
||||
return translate('New');
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'none',
|
||||
get name() {
|
||||
return translate('None');
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
function MonitorNewItemsFilterBuilderRowValue(
|
||||
props: FilterBuilderRowValueProps
|
||||
) {
|
||||
return <FilterBuilderRowValue tagList={options} {...props} />;
|
||||
}
|
||||
|
||||
export default MonitorNewItemsFilterBuilderRowValue;
|
9
frontend/src/Utilities/String/firstCharToUpper.js
Normal file
9
frontend/src/Utilities/String/firstCharToUpper.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
function firstCharToUpper(input) {
|
||||
if (!input) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return [].map.call(input, (char, i) => (i ? char : char.toUpperCase())).join('');
|
||||
}
|
||||
|
||||
export default firstCharToUpper;
|
Loading…
Reference in a new issue