mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-04-20 16:22:04 +00:00
updated tab navigator for localization
This commit is contained in:
parent
96ac361c8e
commit
cdab715463
3 changed files with 26 additions and 10 deletions
|
|
@ -11,6 +11,13 @@
|
||||||
"ok": "OK",
|
"ok": "OK",
|
||||||
"unknown": "Unknown"
|
"unknown": "Unknown"
|
||||||
},
|
},
|
||||||
|
"navigation": {
|
||||||
|
"home": "Home",
|
||||||
|
"library": "Library",
|
||||||
|
"search": "Search",
|
||||||
|
"downloads": "Downloads",
|
||||||
|
"settings": "Settings"
|
||||||
|
},
|
||||||
"addons": {
|
"addons": {
|
||||||
"title": "Addons",
|
"title": "Addons",
|
||||||
"reorder_mode": "Reorder Mode",
|
"reorder_mode": "Reorder Mode",
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,13 @@
|
||||||
"ok": "OK",
|
"ok": "OK",
|
||||||
"unknown": "Desconhecido"
|
"unknown": "Desconhecido"
|
||||||
},
|
},
|
||||||
|
"navigation": {
|
||||||
|
"home": "Início",
|
||||||
|
"library": "Biblioteca",
|
||||||
|
"search": "Buscar",
|
||||||
|
"downloads": "Downloads",
|
||||||
|
"settings": "Configurações"
|
||||||
|
},
|
||||||
"addons": {
|
"addons": {
|
||||||
"title": "Addons",
|
"title": "Addons",
|
||||||
"reorder_mode": "Modo de Reordenação",
|
"reorder_mode": "Modo de Reordenação",
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ import { SafeAreaProvider, useSafeAreaInsets } from 'react-native-safe-area-cont
|
||||||
import { useTheme } from '../contexts/ThemeContext';
|
import { useTheme } from '../contexts/ThemeContext';
|
||||||
import { PostHogProvider } from 'posthog-react-native';
|
import { PostHogProvider } from 'posthog-react-native';
|
||||||
import { ScrollToTopProvider, useScrollToTopEmitter } from '../contexts/ScrollToTopContext';
|
import { ScrollToTopProvider, useScrollToTopEmitter } from '../contexts/ScrollToTopContext';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
// Optional iOS Glass effect (expo-glass-effect) with safe fallback
|
// Optional iOS Glass effect (expo-glass-effect) with safe fallback
|
||||||
let GlassViewComp: any = null;
|
let GlassViewComp: any = null;
|
||||||
|
|
@ -545,6 +546,7 @@ const WrappedScreen: React.FC<{ Screen: React.ComponentType<any> }> = ({ Screen
|
||||||
|
|
||||||
// Tab Navigator
|
// Tab Navigator
|
||||||
const MainTabs = () => {
|
const MainTabs = () => {
|
||||||
|
const { t } = useTranslation();
|
||||||
const { currentTheme } = useTheme();
|
const { currentTheme } = useTheme();
|
||||||
const { settings } = require('../hooks/useSettings');
|
const { settings } = require('../hooks/useSettings');
|
||||||
const { useSettings: useSettingsHook } = require('../hooks/useSettings');
|
const { useSettings: useSettingsHook } = require('../hooks/useSettings');
|
||||||
|
|
@ -915,7 +917,7 @@ const MainTabs = () => {
|
||||||
name="Home"
|
name="Home"
|
||||||
component={HomeScreen}
|
component={HomeScreen}
|
||||||
options={{
|
options={{
|
||||||
title: 'Home',
|
title: t('navigation.home'),
|
||||||
tabBarIcon: () => ({ sfSymbol: 'house' }),
|
tabBarIcon: () => ({ sfSymbol: 'house' }),
|
||||||
freezeOnBlur: true,
|
freezeOnBlur: true,
|
||||||
}}
|
}}
|
||||||
|
|
@ -931,7 +933,7 @@ const MainTabs = () => {
|
||||||
name="Library"
|
name="Library"
|
||||||
component={LibraryScreen}
|
component={LibraryScreen}
|
||||||
options={{
|
options={{
|
||||||
title: 'Library',
|
title: t('navigation.library'),
|
||||||
tabBarIcon: () => ({ sfSymbol: 'heart' }),
|
tabBarIcon: () => ({ sfSymbol: 'heart' }),
|
||||||
}}
|
}}
|
||||||
listeners={({ navigation }: { navigation: any }) => ({
|
listeners={({ navigation }: { navigation: any }) => ({
|
||||||
|
|
@ -946,7 +948,7 @@ const MainTabs = () => {
|
||||||
name="Search"
|
name="Search"
|
||||||
component={SearchScreen}
|
component={SearchScreen}
|
||||||
options={{
|
options={{
|
||||||
title: 'Search',
|
title: t('navigation.search'),
|
||||||
tabBarIcon: () => ({ sfSymbol: 'magnifyingglass' }),
|
tabBarIcon: () => ({ sfSymbol: 'magnifyingglass' }),
|
||||||
}}
|
}}
|
||||||
listeners={({ navigation }: { navigation: any }) => ({
|
listeners={({ navigation }: { navigation: any }) => ({
|
||||||
|
|
@ -962,7 +964,7 @@ const MainTabs = () => {
|
||||||
name="Downloads"
|
name="Downloads"
|
||||||
component={DownloadsScreen}
|
component={DownloadsScreen}
|
||||||
options={{
|
options={{
|
||||||
title: 'Downloads',
|
title: t('navigation.downloads'),
|
||||||
tabBarIcon: () => ({ sfSymbol: 'arrow.down.circle' }),
|
tabBarIcon: () => ({ sfSymbol: 'arrow.down.circle' }),
|
||||||
}}
|
}}
|
||||||
listeners={({ navigation }: { navigation: any }) => ({
|
listeners={({ navigation }: { navigation: any }) => ({
|
||||||
|
|
@ -978,7 +980,7 @@ const MainTabs = () => {
|
||||||
name="Settings"
|
name="Settings"
|
||||||
component={SettingsScreen}
|
component={SettingsScreen}
|
||||||
options={{
|
options={{
|
||||||
title: 'Settings',
|
title: t('navigation.settings'),
|
||||||
tabBarIcon: () => ({ sfSymbol: 'gear' }),
|
tabBarIcon: () => ({ sfSymbol: 'gear' }),
|
||||||
}}
|
}}
|
||||||
listeners={({ navigation }: { navigation: any }) => ({
|
listeners={({ navigation }: { navigation: any }) => ({
|
||||||
|
|
@ -1053,7 +1055,7 @@ const MainTabs = () => {
|
||||||
name="Home"
|
name="Home"
|
||||||
component={HomeScreen}
|
component={HomeScreen}
|
||||||
options={{
|
options={{
|
||||||
tabBarLabel: 'Home',
|
tabBarLabel: t('navigation.home'),
|
||||||
tabBarIcon: ({ color, size, focused }) => (
|
tabBarIcon: ({ color, size, focused }) => (
|
||||||
<MaterialCommunityIcons name={focused ? 'home' : 'home-outline'} size={size} color={color} />
|
<MaterialCommunityIcons name={focused ? 'home' : 'home-outline'} size={size} color={color} />
|
||||||
),
|
),
|
||||||
|
|
@ -1064,7 +1066,7 @@ const MainTabs = () => {
|
||||||
name="Library"
|
name="Library"
|
||||||
component={LibraryScreen}
|
component={LibraryScreen}
|
||||||
options={{
|
options={{
|
||||||
tabBarLabel: 'Library',
|
tabBarLabel: t('navigation.library'),
|
||||||
tabBarIcon: ({ color, size, focused }) => (
|
tabBarIcon: ({ color, size, focused }) => (
|
||||||
<MaterialCommunityIcons name={focused ? 'heart' : 'heart-outline'} size={size} color={color} />
|
<MaterialCommunityIcons name={focused ? 'heart' : 'heart-outline'} size={size} color={color} />
|
||||||
),
|
),
|
||||||
|
|
@ -1074,7 +1076,7 @@ const MainTabs = () => {
|
||||||
name="Search"
|
name="Search"
|
||||||
component={SearchScreen}
|
component={SearchScreen}
|
||||||
options={{
|
options={{
|
||||||
tabBarLabel: 'Search',
|
tabBarLabel: t('navigation.search'),
|
||||||
tabBarIcon: ({ color, size }) => (
|
tabBarIcon: ({ color, size }) => (
|
||||||
<MaterialCommunityIcons name={'magnify'} size={size} color={color} />
|
<MaterialCommunityIcons name={'magnify'} size={size} color={color} />
|
||||||
),
|
),
|
||||||
|
|
@ -1085,7 +1087,7 @@ const MainTabs = () => {
|
||||||
name="Downloads"
|
name="Downloads"
|
||||||
component={DownloadsScreen}
|
component={DownloadsScreen}
|
||||||
options={{
|
options={{
|
||||||
tabBarLabel: 'Downloads',
|
tabBarLabel: t('navigation.downloads'),
|
||||||
tabBarIcon: ({ color, size, focused }) => (
|
tabBarIcon: ({ color, size, focused }) => (
|
||||||
<MaterialCommunityIcons name={focused ? 'download' : 'download-outline'} size={size} color={color} />
|
<MaterialCommunityIcons name={focused ? 'download' : 'download-outline'} size={size} color={color} />
|
||||||
),
|
),
|
||||||
|
|
@ -1096,7 +1098,7 @@ const MainTabs = () => {
|
||||||
name="Settings"
|
name="Settings"
|
||||||
component={SettingsScreen}
|
component={SettingsScreen}
|
||||||
options={{
|
options={{
|
||||||
tabBarLabel: 'Settings',
|
tabBarLabel: t('navigation.settings'),
|
||||||
tabBarIcon: ({ color, size, focused }) => (
|
tabBarIcon: ({ color, size, focused }) => (
|
||||||
<MaterialCommunityIcons name={focused ? 'cog' : 'cog-outline'} size={size} color={color} />
|
<MaterialCommunityIcons name={focused ? 'cog' : 'cog-outline'} size={size} color={color} />
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue