Use proper casing for i18n locales (#1998)

This commit is contained in:
Jeff
2026-05-11 19:42:07 -07:00
committed by GitHub
parent e49e488b4c
commit e2a1d813a9
224 changed files with 17323 additions and 18474 deletions
@@ -155,9 +155,9 @@ const AlbumPropertyMapping: ItemDetailRow<Album>[] = [
label: 'filter.explicitStatus',
render: (album, t) =>
album.explicitStatus === ExplicitStatus.EXPLICIT
? t('common.explicit', { postProcess: 'sentenceCase' })
? t('common.explicit')
: album.explicitStatus === ExplicitStatus.CLEAN
? t('common.clean', { postProcess: 'sentenceCase' })
? t('common.clean')
: null,
},
{ label: 'filter.isCompilation', render: (album) => BoolField(album.isCompilation || false) },
@@ -309,9 +309,9 @@ const SongPropertyMapping: ItemDetailRow<Song>[] = [
label: 'filter.explicitStatus',
render: (song, t) =>
song.explicitStatus === ExplicitStatus.EXPLICIT
? t('common.explicit', { postProcess: 'sentenceCase' })
? t('common.explicit')
: song.explicitStatus === ExplicitStatus.CLEAN
? t('common.clean', { postProcess: 'sentenceCase' })
? t('common.clean')
: null,
},
{ count: 2, label: 'entity.genre', render: FormatGenre },
@@ -379,7 +379,7 @@ const handleTags = (item: Album | Song, t: TFunction) => {
if (tags.length) {
return [
<Table.Tr key="tags">
<Table.Th>{t('common.tags', { postProcess: 'sentenceCase' })}</Table.Th>
<Table.Th>{t('common.tags')}</Table.Th>
<Table.Td>{tags.length}</Table.Td>
</Table.Tr>,
].concat(tags);
@@ -406,11 +406,7 @@ const handleParticipants = (item: Album | Song, t: TFunction) => {
if (participants.length) {
return [
<Table.Tr key="participants">
<Table.Th>
{t('common.additionalParticipants', {
postProcess: 'sentenceCase',
})}
</Table.Th>
<Table.Th>{t('common.additionalParticipants')}</Table.Th>
<Table.Td>{participants.length}</Table.Td>
</Table.Tr>,
].concat(participants);
@@ -431,9 +427,7 @@ export const ItemDetailsModal = ({ item, items }: ItemDetailsModalProps) => {
const selectData = useMemo(() => {
return allItems.map((it, index) => ({
label:
it.name ||
`${t('common.item', { defaultValue: 'Item', postProcess: 'sentenceCase' })} ${index + 1}`,
label: it.name || `${t('common.item', { defaultValue: 'Item' })} ${index + 1}`,
value: String(index),
}));
}, [allItems, t]);
@@ -27,9 +27,7 @@ export const SongPath = ({ path }: SongPathProps) => {
<Tooltip
label={t(
copied ? 'page.itemDetail.copiedPath' : 'page.itemDetail.copyPath',
{
postProcess: 'sentenceCase',
},
{},
)}
withinPortal
>
@@ -40,19 +38,14 @@ export const SongPath = ({ path }: SongPathProps) => {
)}
</CopyButton>
{util && (
<Tooltip
label={t('page.itemDetail.openFile', { postProcess: 'sentenceCase' })}
withinPortal
>
<Tooltip label={t('page.itemDetail.openFile')} withinPortal>
<ActionIcon
icon="externalLink"
onClick={() => {
util.openItem(path).catch((error) => {
toast.error({
message: (error as Error).message,
title: t('error.openError', {
postProcess: 'sentenceCase',
}),
title: t('error.openError'),
});
});
}}