mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-13 08:33:58 -07: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 { icons } from 'Helpers/Props';
|
||||||
import { executeCommand } from 'Store/Actions/commandActions';
|
import { executeCommand } from 'Store/Actions/commandActions';
|
||||||
import formatBytes from 'Utilities/Number/formatBytes';
|
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 translate from 'Utilities/String/translate';
|
||||||
import AlbumsCell from './AlbumsCell';
|
import AlbumsCell from './AlbumsCell';
|
||||||
import hasGrowableColumns from './hasGrowableColumns';
|
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') {
|
if (name === 'metadataProfileId') {
|
||||||
return (
|
return (
|
||||||
<VirtualTableRowCell key={name} className={styles[name]}>
|
<VirtualTableRowCell key={name} className={styles[name]}>
|
||||||
|
@ -243,7 +235,7 @@ function ArtistIndexRow(props: ArtistIndexRowProps) {
|
||||||
if (name === 'monitorNewItems') {
|
if (name === 'monitorNewItems') {
|
||||||
return (
|
return (
|
||||||
<VirtualTableRowCell key={name} className={styles[name]}>
|
<VirtualTableRowCell key={name} className={styles[name]}>
|
||||||
{titleCase(monitorNewItems)}
|
{translate(firstCharToUpper(monitorNewItems))}
|
||||||
</VirtualTableRowCell>
|
</VirtualTableRowCell>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -262,7 +254,7 @@ function ArtistIndexRow(props: ArtistIndexRowProps) {
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<VirtualTableRowCell key={name} className={styles[name]}>
|
<VirtualTableRowCell key={name} className={styles[name]}>
|
||||||
None
|
{translate('None')}
|
||||||
</VirtualTableRowCell>
|
</VirtualTableRowCell>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -281,7 +273,7 @@ function ArtistIndexRow(props: ArtistIndexRowProps) {
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<VirtualTableRowCell key={name} className={styles[name]}>
|
<VirtualTableRowCell key={name} className={styles[name]}>
|
||||||
None
|
{translate('None')}
|
||||||
</VirtualTableRowCell>
|
</VirtualTableRowCell>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -338,7 +330,7 @@ function ArtistIndexRow(props: ArtistIndexRowProps) {
|
||||||
if (name === 'path') {
|
if (name === 'path') {
|
||||||
return (
|
return (
|
||||||
<VirtualTableRowCell key={name} className={styles[name]}>
|
<VirtualTableRowCell key={name} className={styles[name]}>
|
||||||
{path}
|
<span title={path}>{path}</span>
|
||||||
</VirtualTableRowCell>
|
</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…
Add table
Add a link
Reference in a new issue