From e6e997e4b5aa1d252e70bcee595e4b03bcaebd0f Mon Sep 17 00:00:00 2001 From: austinried <4966622+austinried@users.noreply.github.com> Date: Sat, 16 Apr 2022 18:38:22 +0900 Subject: [PATCH] fix plurals falling back to en when no count --- app/navigation/LibraryTopTabNavigator.tsx | 2 -- app/navigation/RootNavigator.tsx | 2 +- app/screens/NowPlayingView.tsx | 6 ++++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/navigation/LibraryTopTabNavigator.tsx b/app/navigation/LibraryTopTabNavigator.tsx index 56f5014..f61d767 100644 --- a/app/navigation/LibraryTopTabNavigator.tsx +++ b/app/navigation/LibraryTopTabNavigator.tsx @@ -17,8 +17,6 @@ const LibraryTopTabNavigator = withSuspense(() => { const { t } = useTranslation() const marginTop = useSafeAreaInsets().top - console.log('Albums:', t('resources.album.name', { count: 2 })) - return ( { name="queue" component={NowPlayingQueue} options={{ - title: t('resources.queue.name'), + title: t('resources.queue.name', { count: 1 }), headerStyle: { backgroundColor: colors.gradient.high, }, diff --git a/app/screens/NowPlayingView.tsx b/app/screens/NowPlayingView.tsx index 5aa42bb..00bdc4d 100644 --- a/app/screens/NowPlayingView.tsx +++ b/app/screens/NowPlayingView.tsx @@ -30,17 +30,19 @@ const NowPlayingHeader = withSuspenseMemo<{ const queueContextType = useStore(store => store.queueContextType) const { t } = useTranslation() + console.log(t('resources.album.name', { count: 1 })) + if (!track) { return <> } let contextName: string if (queueContextType === 'album') { - contextName = t('resources.album.name') + contextName = t('resources.album.name', { count: 1 }) } else if (queueContextType === 'artist') { contextName = t('resources.song.lists.artistTopSongs') } else if (queueContextType === 'playlist') { - contextName = t('resources.playlist.name') + contextName = t('resources.playlist.name', { count: 1 }) } else if (queueContextType === 'song') { contextName = t('search.nowPlayingContext') }