mirror of
https://github.com/jeffvli/feishin.git
synced 2026-07-08 03:30:01 +02:00
Use proper casing for i18n locales (#1998)
This commit is contained in:
@@ -203,10 +203,7 @@ export const AddToPlaylistAction = ({ items, itemType }: AddToPlaylistActionProp
|
||||
|
||||
if (allSongIds.length === 0) {
|
||||
toast.info({
|
||||
message: t('form.addToPlaylist.noneAdded', {
|
||||
playlist: playlistName,
|
||||
postProcess: 'sentenceCase',
|
||||
}),
|
||||
message: t('form.addToPlaylist.noneAdded', { playlist: playlistName }),
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -245,10 +242,7 @@ export const AddToPlaylistAction = ({ items, itemType }: AddToPlaylistActionProp
|
||||
|
||||
if (songsToAdd.length === 0) {
|
||||
toast.info({
|
||||
message: t('form.addToPlaylist.noneAdded', {
|
||||
playlist: playlistName,
|
||||
postProcess: 'sentenceCase',
|
||||
}),
|
||||
message: t('form.addToPlaylist.noneAdded', { playlist: playlistName }),
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -267,7 +261,7 @@ export const AddToPlaylistAction = ({ items, itemType }: AddToPlaylistActionProp
|
||||
onError: (err) => {
|
||||
toast.error({
|
||||
message: err.message,
|
||||
title: t('error.genericError', { postProcess: 'sentenceCase' }),
|
||||
title: t('error.genericError'),
|
||||
});
|
||||
},
|
||||
onSuccess: () => {},
|
||||
@@ -278,13 +272,12 @@ export const AddToPlaylistAction = ({ items, itemType }: AddToPlaylistActionProp
|
||||
message: t('form.addToPlaylist.success', {
|
||||
message: songsToAdd.length,
|
||||
numOfPlaylists: 1,
|
||||
postProcess: 'sentenceCase',
|
||||
}),
|
||||
});
|
||||
} catch (error) {
|
||||
toast.error({
|
||||
message: (error as Error).message,
|
||||
title: t('error.genericError', { postProcess: 'sentenceCase' }),
|
||||
title: t('error.genericError'),
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -347,7 +340,7 @@ export const AddToPlaylistAction = ({ items, itemType }: AddToPlaylistActionProp
|
||||
},
|
||||
modal: 'addToPlaylist',
|
||||
size: 'lg',
|
||||
title: t('page.contextMenu.addToPlaylist', { postProcess: 'sentenceCase' }),
|
||||
title: t('page.contextMenu.addToPlaylist'),
|
||||
});
|
||||
}, [itemType, items, t]);
|
||||
|
||||
@@ -361,12 +354,11 @@ export const AddToPlaylistAction = ({ items, itemType }: AddToPlaylistActionProp
|
||||
onKeyDown={(e) => e.stopPropagation()}
|
||||
onPointerDown={(e) => e.stopPropagation()}
|
||||
pb="xs"
|
||||
placeholder={t('common.search', { postProcess: 'sentenceCase' })}
|
||||
placeholder={t('common.search')}
|
||||
rightSection={
|
||||
<Tooltip
|
||||
label={t('form.addToPlaylist.input', {
|
||||
context: 'skipDuplicates',
|
||||
postProcess: 'titleCase',
|
||||
})}
|
||||
>
|
||||
<Checkbox
|
||||
@@ -393,7 +385,7 @@ export const AddToPlaylistAction = ({ items, itemType }: AddToPlaylistActionProp
|
||||
onSelect={handleOpenModal}
|
||||
rightIcon="arrowRightS"
|
||||
>
|
||||
{t('page.contextMenu.addToPlaylist', { postProcess: 'sentenceCase' })}
|
||||
{t('page.contextMenu.addToPlaylist')}
|
||||
</ContextMenu.Item>
|
||||
</ContextMenu.SubmenuTarget>
|
||||
<ContextMenu.SubmenuContent stickyContent={searchInput}>
|
||||
@@ -403,9 +395,7 @@ export const AddToPlaylistAction = ({ items, itemType }: AddToPlaylistActionProp
|
||||
</ContextMenu.Item>
|
||||
)}
|
||||
{playlistsQuery.isError && (
|
||||
<ContextMenu.Item disabled>
|
||||
{t('error.genericError', { postProcess: 'sentenceCase' })}
|
||||
</ContextMenu.Item>
|
||||
<ContextMenu.Item disabled>{t('error.genericError')}</ContextMenu.Item>
|
||||
)}
|
||||
{recentPlaylist && (
|
||||
<>
|
||||
@@ -421,9 +411,7 @@ export const AddToPlaylistAction = ({ items, itemType }: AddToPlaylistActionProp
|
||||
</>
|
||||
)}
|
||||
{filteredPlaylists.length === 0 && !playlistsQuery.isLoading && (
|
||||
<ContextMenu.Item disabled>
|
||||
{t('common.noResultsFromQuery', { postProcess: 'sentenceCase' })}
|
||||
</ContextMenu.Item>
|
||||
<ContextMenu.Item disabled>{t('common.noResultsFromQuery')}</ContextMenu.Item>
|
||||
)}
|
||||
{filteredPlaylists.map((playlist) => (
|
||||
<ContextMenu.Item
|
||||
|
||||
Reference in New Issue
Block a user