mirror of
https://github.com/austinried/subtracks.git
synced 2025-12-28 09:19:27 +01:00
fix plurals falling back to en when no count
This commit is contained in:
parent
c78fc65279
commit
e6e997e4b5
@ -17,8 +17,6 @@ const LibraryTopTabNavigator = withSuspense(() => {
|
|||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
const marginTop = useSafeAreaInsets().top
|
const marginTop = useSafeAreaInsets().top
|
||||||
|
|
||||||
console.log('Albums:', t('resources.album.name', { count: 2 }))
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tab.Navigator
|
<Tab.Navigator
|
||||||
tabBarOptions={{
|
tabBarOptions={{
|
||||||
|
|||||||
@ -21,7 +21,7 @@ const NowPlayingNavigator = withSuspense(() => {
|
|||||||
name="queue"
|
name="queue"
|
||||||
component={NowPlayingQueue}
|
component={NowPlayingQueue}
|
||||||
options={{
|
options={{
|
||||||
title: t('resources.queue.name'),
|
title: t('resources.queue.name', { count: 1 }),
|
||||||
headerStyle: {
|
headerStyle: {
|
||||||
backgroundColor: colors.gradient.high,
|
backgroundColor: colors.gradient.high,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -30,17 +30,19 @@ const NowPlayingHeader = withSuspenseMemo<{
|
|||||||
const queueContextType = useStore(store => store.queueContextType)
|
const queueContextType = useStore(store => store.queueContextType)
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
|
|
||||||
|
console.log(t('resources.album.name', { count: 1 }))
|
||||||
|
|
||||||
if (!track) {
|
if (!track) {
|
||||||
return <></>
|
return <></>
|
||||||
}
|
}
|
||||||
|
|
||||||
let contextName: string
|
let contextName: string
|
||||||
if (queueContextType === 'album') {
|
if (queueContextType === 'album') {
|
||||||
contextName = t('resources.album.name')
|
contextName = t('resources.album.name', { count: 1 })
|
||||||
} else if (queueContextType === 'artist') {
|
} else if (queueContextType === 'artist') {
|
||||||
contextName = t('resources.song.lists.artistTopSongs')
|
contextName = t('resources.song.lists.artistTopSongs')
|
||||||
} else if (queueContextType === 'playlist') {
|
} else if (queueContextType === 'playlist') {
|
||||||
contextName = t('resources.playlist.name')
|
contextName = t('resources.playlist.name', { count: 1 })
|
||||||
} else if (queueContextType === 'song') {
|
} else if (queueContextType === 'song') {
|
||||||
contextName = t('search.nowPlayingContext')
|
contextName = t('search.nowPlayingContext')
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user