mirror of
https://github.com/jeffvli/feishin.git
synced 2026-07-12 05:30:12 +02:00
Use proper casing for i18n locales (#1998)
This commit is contained in:
@@ -30,37 +30,37 @@ export const GoToCommands = ({ handleClose, setPages, setQuery }: GoToCommandsPr
|
||||
<>
|
||||
<Command.Group>
|
||||
<Command.Item onSelect={() => goTo(AppRoute.HOME)}>
|
||||
{t('page.sidebar.home', { postProcess: 'titleCase' })}
|
||||
{t('page.sidebar.home')}
|
||||
</Command.Item>
|
||||
<Command.Item onSelect={() => goTo(AppRoute.SEARCH)}>
|
||||
{t('page.sidebar.search', { postProcess: 'titleCase' })}
|
||||
{t('page.sidebar.search')}
|
||||
</Command.Item>
|
||||
<Command.Item
|
||||
onSelect={() => {
|
||||
openSettingsModal();
|
||||
}}
|
||||
>
|
||||
{t('page.sidebar.settings', { postProcess: 'titleCase' })}
|
||||
{t('page.sidebar.settings')}
|
||||
</Command.Item>
|
||||
</Command.Group>
|
||||
<Command.Group heading="Library">
|
||||
<Command.Item onSelect={() => goTo(AppRoute.LIBRARY_ALBUMS)}>
|
||||
{t('page.sidebar.albums', { postProcess: 'titleCase' })}
|
||||
{t('page.sidebar.albums')}
|
||||
</Command.Item>
|
||||
<Command.Item onSelect={() => goTo(AppRoute.LIBRARY_SONGS)}>
|
||||
{t('page.sidebar.tracks', { postProcess: 'titleCase' })}
|
||||
{t('page.sidebar.tracks')}
|
||||
</Command.Item>
|
||||
<Command.Item onSelect={() => goTo(AppRoute.LIBRARY_ALBUM_ARTISTS)}>
|
||||
{t('page.sidebar.albumArtists', { postProcess: 'titleCase' })}
|
||||
{t('page.sidebar.albumArtists')}
|
||||
</Command.Item>
|
||||
<Command.Item onSelect={() => goTo(AppRoute.LIBRARY_GENRES)}>
|
||||
{t('page.sidebar.genres', { postProcess: 'titleCase' })}
|
||||
{t('page.sidebar.genres')}
|
||||
</Command.Item>
|
||||
<Command.Item onSelect={() => goTo(AppRoute.LIBRARY_FOLDERS)}>
|
||||
{t('page.sidebar.folders', { postProcess: 'titleCase' })}
|
||||
{t('page.sidebar.folders')}
|
||||
</Command.Item>
|
||||
<Command.Item onSelect={() => goTo(AppRoute.PLAYLISTS)}>
|
||||
{t('page.sidebar.playlists', { postProcess: 'titleCase' })}
|
||||
{t('page.sidebar.playlists')}
|
||||
</Command.Item>
|
||||
</Command.Group>
|
||||
<Command.Separator />
|
||||
|
||||
@@ -53,30 +53,22 @@ export const HomeCommands = ({
|
||||
|
||||
return (
|
||||
<>
|
||||
<Command.Group heading={t('page.globalSearch.title', { postProcess: 'titleCase' })}>
|
||||
<Command.Item
|
||||
onSelect={handleSearch}
|
||||
value={t('common.search', { postProcess: 'sentenceCase' })}
|
||||
>
|
||||
<Command.Group heading={t('page.globalSearch.title')}>
|
||||
<Command.Item onSelect={handleSearch} value={t('common.search')}>
|
||||
{query
|
||||
? t('page.globalSearch.commands.searchFor', {
|
||||
postProcess: 'sentenceCase',
|
||||
query,
|
||||
})
|
||||
: `${t('common.search', { postProcess: 'sentenceCase' })}...`}
|
||||
? t('page.globalSearch.commands.searchFor', { query })
|
||||
: `${t('common.search')}...`}
|
||||
</Command.Item>
|
||||
<Command.Item onSelect={handleCreatePlaylistModal}>
|
||||
{t('action.createPlaylist', { postProcess: 'sentenceCase' })}...
|
||||
{t('action.createPlaylist')}...
|
||||
</Command.Item>
|
||||
<Command.Item onSelect={() => setPages([...pages, CommandPalettePages.GO_TO])}>
|
||||
{t('page.globalSearch.commands.goToPage', { postProcess: 'sentenceCase' })}...
|
||||
{t('page.globalSearch.commands.goToPage')}...
|
||||
</Command.Item>
|
||||
<Command.Item
|
||||
onSelect={() => setPages([...pages, CommandPalettePages.MANAGE_SERVERS])}
|
||||
>
|
||||
{t('page.globalSearch.commands.serverCommands', {
|
||||
postProcess: 'sentenceCase',
|
||||
})}
|
||||
{t('page.globalSearch.commands.serverCommands')}
|
||||
...
|
||||
</Command.Item>
|
||||
</Command.Group>
|
||||
|
||||
@@ -69,7 +69,7 @@ export function SearchAlbumArtistsSection({
|
||||
return (
|
||||
<CollapsibleCommandGroup
|
||||
expanded={expanded}
|
||||
heading={t('entity.albumArtist', { count: 2, postProcess: 'titleCase' })}
|
||||
heading={t('entity.albumArtist', { count: 2 })}
|
||||
onToggle={onToggle}
|
||||
subtitle={
|
||||
isFetched ? (
|
||||
@@ -147,9 +147,7 @@ export function SearchAlbumArtistsSection({
|
||||
{isFetchingNextPage ? (
|
||||
<Spinner />
|
||||
) : (
|
||||
<Text size="sm">
|
||||
{t('action.viewMore', { postProcess: 'titleCase' })}
|
||||
</Text>
|
||||
<Text size="sm">{t('action.viewMore')}</Text>
|
||||
)}
|
||||
</Text>
|
||||
)}
|
||||
|
||||
@@ -69,7 +69,7 @@ export function SearchAlbumsSection({
|
||||
return (
|
||||
<CollapsibleCommandGroup
|
||||
expanded={expanded}
|
||||
heading={t('entity.album', { count: 2, postProcess: 'titleCase' })}
|
||||
heading={t('entity.album', { count: 2 })}
|
||||
onToggle={onToggle}
|
||||
subtitle={
|
||||
isFetched ? (
|
||||
@@ -148,9 +148,7 @@ export function SearchAlbumsSection({
|
||||
{isFetchingNextPage ? (
|
||||
<Spinner />
|
||||
) : (
|
||||
<Text size="sm">
|
||||
{t('action.viewMore', { postProcess: 'titleCase' })}
|
||||
</Text>
|
||||
<Text size="sm">{t('action.viewMore')}</Text>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -85,7 +85,7 @@ export const SearchHeader = ({ navigationId }: SearchHeaderProps) => {
|
||||
}}
|
||||
variant={itemType === LibraryItem.SONG ? 'filled' : 'default'}
|
||||
>
|
||||
{t('entity.track', { count: 2, postProcess: 'sentenceCase' })}
|
||||
{t('entity.track', { count: 2 })}
|
||||
</Button>
|
||||
<Button
|
||||
component={Link}
|
||||
@@ -101,7 +101,7 @@ export const SearchHeader = ({ navigationId }: SearchHeaderProps) => {
|
||||
}}
|
||||
variant={itemType === LibraryItem.ALBUM ? 'filled' : 'default'}
|
||||
>
|
||||
{t('entity.album', { count: 2, postProcess: 'sentenceCase' })}
|
||||
{t('entity.album', { count: 2 })}
|
||||
</Button>
|
||||
<Button
|
||||
component={Link}
|
||||
@@ -117,7 +117,7 @@ export const SearchHeader = ({ navigationId }: SearchHeaderProps) => {
|
||||
}}
|
||||
variant={itemType === LibraryItem.ALBUM_ARTIST ? 'filled' : 'default'}
|
||||
>
|
||||
{t('entity.artist', { count: 2, postProcess: 'sentenceCase' })}
|
||||
{t('entity.artist', { count: 2 })}
|
||||
</Button>
|
||||
</ButtonGroup>
|
||||
<ListConfigMenu {...listConfigMenuProps[itemType]} />
|
||||
|
||||
@@ -69,7 +69,7 @@ export function SearchSongsSection({
|
||||
return (
|
||||
<CollapsibleCommandGroup
|
||||
expanded={expanded}
|
||||
heading={t('entity.track', { count: 2, postProcess: 'titleCase' })}
|
||||
heading={t('entity.track', { count: 2 })}
|
||||
onToggle={onToggle}
|
||||
subtitle={
|
||||
isFetched ? (
|
||||
@@ -147,9 +147,7 @@ export function SearchSongsSection({
|
||||
{isFetchingNextPage ? (
|
||||
<Spinner />
|
||||
) : (
|
||||
<Text size="sm">
|
||||
{t('action.viewMore', { postProcess: 'titleCase' })}
|
||||
</Text>
|
||||
<Text size="sm">{t('action.viewMore')}</Text>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -25,7 +25,7 @@ export const ServerCommands = ({ handleClose, setPages, setQuery }: ServerComman
|
||||
const handleManageServersModal = useCallback(() => {
|
||||
openModal({
|
||||
children: <ServerList />,
|
||||
title: t('page.appMenu.manageServers', { postProcess: 'sentenceCase' }),
|
||||
title: t('page.appMenu.manageServers'),
|
||||
});
|
||||
handleClose();
|
||||
setQuery('');
|
||||
@@ -45,9 +45,7 @@ export const ServerCommands = ({ handleClose, setPages, setQuery }: ServerComman
|
||||
|
||||
return (
|
||||
<>
|
||||
<Command.Group
|
||||
heading={t('page.appMenu.selectServer', { postProcess: 'sentenceCase' })}
|
||||
>
|
||||
<Command.Group heading={t('page.appMenu.selectServer')}>
|
||||
{Object.keys(serverList).map((key) => (
|
||||
<Command.Item
|
||||
key={key}
|
||||
@@ -56,9 +54,9 @@ export const ServerCommands = ({ handleClose, setPages, setQuery }: ServerComman
|
||||
))}
|
||||
</Command.Group>
|
||||
{!isServerLock() && (
|
||||
<Command.Group heading={t('common.manage', { postProcess: 'sentenceCase' })}>
|
||||
<Command.Group heading={t('common.manage')}>
|
||||
<Command.Item onSelect={handleManageServersModal}>
|
||||
{t('page.appMenu.manageServers', { postProcess: 'sentenceCase' })}...
|
||||
{t('page.appMenu.manageServers')}...
|
||||
</Command.Item>
|
||||
</Command.Group>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user