mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-04-21 08:41:57 +00:00
added german and pt-Portugal in localisation
This commit is contained in:
parent
0f9c1b03a5
commit
6005574019
6 changed files with 2503 additions and 150 deletions
1088
src/i18n/locales/de.json
Normal file
1088
src/i18n/locales/de.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -599,6 +599,9 @@
|
||||||
"select_language": "Select Language",
|
"select_language": "Select Language",
|
||||||
"english": "English",
|
"english": "English",
|
||||||
"portuguese": "Portuguese",
|
"portuguese": "Portuguese",
|
||||||
|
"portuguese_br": "Portuguese (Brazil)",
|
||||||
|
"portuguese_pt": "Portuguese (Portugal)",
|
||||||
|
"german": "German",
|
||||||
"arabic": "Arabic",
|
"arabic": "Arabic",
|
||||||
"spanish": "Spanish",
|
"spanish": "Spanish",
|
||||||
"french": "French",
|
"french": "French",
|
||||||
|
|
|
||||||
|
|
@ -577,6 +577,9 @@
|
||||||
"select_language": "Selecionar Idioma",
|
"select_language": "Selecionar Idioma",
|
||||||
"english": "Inglês",
|
"english": "Inglês",
|
||||||
"portuguese": "Português",
|
"portuguese": "Português",
|
||||||
|
"portuguese_br": "Português (Brasil)",
|
||||||
|
"portuguese_pt": "Português (Portugal)",
|
||||||
|
"german": "Alemão",
|
||||||
"arabic": "Árabe",
|
"arabic": "Árabe",
|
||||||
"spanish": "Espanhol",
|
"spanish": "Espanhol",
|
||||||
"french": "Francês",
|
"french": "Francês",
|
||||||
1211
src/i18n/locales/pt-PT.json
Normal file
1211
src/i18n/locales/pt-PT.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1,15 +1,19 @@
|
||||||
import en from './locales/en.json';
|
import en from './locales/en.json';
|
||||||
import pt from './locales/pt.json';
|
import ptBR from './locales/pt-BR.json';
|
||||||
|
import ptPT from './locales/pt-PT.json';
|
||||||
import ar from './locales/ar.json';
|
import ar from './locales/ar.json';
|
||||||
import es from './locales/es.json';
|
import es from './locales/es.json';
|
||||||
import fr from './locales/fr.json';
|
import fr from './locales/fr.json';
|
||||||
import it from './locales/it.json';
|
import it from './locales/it.json';
|
||||||
|
import de from './locales/de.json';
|
||||||
|
|
||||||
export const resources = {
|
export const resources = {
|
||||||
en: { translation: en },
|
en: { translation: en },
|
||||||
pt: { translation: pt },
|
'pt-BR': { translation: ptBR },
|
||||||
|
'pt-PT': { translation: ptPT },
|
||||||
ar: { translation: ar },
|
ar: { translation: ar },
|
||||||
es: { translation: es },
|
es: { translation: es },
|
||||||
fr: { translation: fr },
|
fr: { translation: fr },
|
||||||
it: { translation: it },
|
it: { translation: it },
|
||||||
|
de: { translation: de },
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import {
|
||||||
Linking,
|
Linking,
|
||||||
FlatList,
|
FlatList,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import { BottomSheetModal, BottomSheetView, BottomSheetBackdrop } from '@gorhom/bottom-sheet';
|
import { BottomSheetModal, BottomSheetView, BottomSheetBackdrop, BottomSheetScrollView } from '@gorhom/bottom-sheet';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { mmkvStorage } from '../services/mmkvStorage';
|
import { mmkvStorage } from '../services/mmkvStorage';
|
||||||
import { useNavigation } from '@react-navigation/native';
|
import { useNavigation } from '@react-navigation/native';
|
||||||
|
|
@ -601,12 +601,14 @@ const SettingsScreen: React.FC = () => {
|
||||||
<SettingItem
|
<SettingItem
|
||||||
title={t('settings.language')}
|
title={t('settings.language')}
|
||||||
description={
|
description={
|
||||||
i18n.language === 'pt' ? t('settings.portuguese') :
|
i18n.language === 'pt-BR' ? t('settings.portuguese_br') :
|
||||||
i18n.language === 'ar' ? t('settings.arabic') :
|
i18n.language === 'pt-PT' ? t('settings.portuguese_pt') :
|
||||||
i18n.language === 'es' ? t('settings.spanish') :
|
i18n.language === 'de' ? t('settings.german') :
|
||||||
i18n.language === 'fr' ? t('settings.french') :
|
i18n.language === 'ar' ? t('settings.arabic') :
|
||||||
i18n.language === 'it' ? t('settings.italian') :
|
i18n.language === 'es' ? t('settings.spanish') :
|
||||||
t('settings.english')
|
i18n.language === 'fr' ? t('settings.french') :
|
||||||
|
i18n.language === 'it' ? t('settings.italian') :
|
||||||
|
t('settings.english')
|
||||||
}
|
}
|
||||||
icon="globe"
|
icon="globe"
|
||||||
renderControl={() => <ChevronRight />}
|
renderControl={() => <ChevronRight />}
|
||||||
|
|
@ -830,7 +832,7 @@ const SettingsScreen: React.FC = () => {
|
||||||
<BottomSheetModal
|
<BottomSheetModal
|
||||||
ref={languageSheetRef}
|
ref={languageSheetRef}
|
||||||
index={0}
|
index={0}
|
||||||
snapPoints={['50%']}
|
snapPoints={['65%']}
|
||||||
enablePanDownToClose={true}
|
enablePanDownToClose={true}
|
||||||
backdropComponent={renderBackdrop}
|
backdropComponent={renderBackdrop}
|
||||||
backgroundStyle={{
|
backgroundStyle={{
|
||||||
|
|
@ -843,152 +845,194 @@ const SettingsScreen: React.FC = () => {
|
||||||
width: 40,
|
width: 40,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<BottomSheetView style={[styles.actionSheetContent, { paddingBottom: insets.bottom + 16 }]}>
|
<View style={[styles.bottomSheetHeader, { backgroundColor: currentTheme.colors.darkGray || '#0A0C0C' }]}>
|
||||||
<View style={[styles.bottomSheetHeader, { backgroundColor: currentTheme.colors.darkGray || '#0A0C0C' }]}>
|
<Text style={[styles.bottomSheetTitle, { color: currentTheme.colors.white }]}>
|
||||||
<Text style={[styles.bottomSheetTitle, { color: currentTheme.colors.white }]}>
|
{t('settings.select_language')}
|
||||||
{t('settings.select_language')}
|
</Text>
|
||||||
</Text>
|
<TouchableOpacity onPress={() => languageSheetRef.current?.close()}>
|
||||||
<TouchableOpacity onPress={() => languageSheetRef.current?.close()}>
|
<Feather name="x" size={24} color={currentTheme.colors.lightGray} />
|
||||||
<Feather name="x" size={24} color={currentTheme.colors.lightGray} />
|
</TouchableOpacity>
|
||||||
</TouchableOpacity>
|
</View>
|
||||||
</View>
|
<BottomSheetScrollView
|
||||||
<ScrollView
|
style={{ backgroundColor: currentTheme.colors.darkGray || '#0A0C0C' }}
|
||||||
style={{ backgroundColor: currentTheme.colors.darkGray || '#0A0C0C' }}
|
contentContainerStyle={[styles.bottomSheetContent, { paddingBottom: insets.bottom + 16 }]}
|
||||||
contentContainerStyle={styles.bottomSheetContent}
|
>
|
||||||
|
<TouchableOpacity
|
||||||
|
style={[
|
||||||
|
styles.languageOption,
|
||||||
|
i18n.language === 'en' && { backgroundColor: currentTheme.colors.primary + '20' }
|
||||||
|
]}
|
||||||
|
onPress={() => {
|
||||||
|
i18n.changeLanguage('en');
|
||||||
|
languageSheetRef.current?.close();
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<TouchableOpacity
|
<Text style={[
|
||||||
style={[
|
styles.languageText,
|
||||||
styles.languageOption,
|
{ color: currentTheme.colors.highEmphasis },
|
||||||
i18n.language === 'en' && { backgroundColor: currentTheme.colors.primary + '20' }
|
i18n.language === 'en' && { color: currentTheme.colors.primary, fontWeight: 'bold' }
|
||||||
]}
|
]}>
|
||||||
onPress={() => {
|
{t('settings.english')}
|
||||||
i18n.changeLanguage('en');
|
</Text>
|
||||||
languageSheetRef.current?.close();
|
{i18n.language === 'en' && (
|
||||||
}}
|
<Feather name="check" size={20} color={currentTheme.colors.primary} />
|
||||||
>
|
)}
|
||||||
<Text style={[
|
</TouchableOpacity>
|
||||||
styles.languageText,
|
|
||||||
{ color: currentTheme.colors.highEmphasis },
|
|
||||||
i18n.language === 'en' && { color: currentTheme.colors.primary, fontWeight: 'bold' }
|
|
||||||
]}>
|
|
||||||
{t('settings.english')}
|
|
||||||
</Text>
|
|
||||||
{i18n.language === 'en' && (
|
|
||||||
<Feather name="check" size={20} color={currentTheme.colors.primary} />
|
|
||||||
)}
|
|
||||||
</TouchableOpacity>
|
|
||||||
|
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
style={[
|
style={[
|
||||||
styles.languageOption,
|
styles.languageOption,
|
||||||
i18n.language === 'pt' && { backgroundColor: currentTheme.colors.primary + '20' }
|
i18n.language === 'pt-BR' && { backgroundColor: currentTheme.colors.primary + '20' }
|
||||||
]}
|
]}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
i18n.changeLanguage('pt');
|
i18n.changeLanguage('pt-BR');
|
||||||
languageSheetRef.current?.close();
|
languageSheetRef.current?.close();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Text style={[
|
<Text style={[
|
||||||
styles.languageText,
|
styles.languageText,
|
||||||
{ color: currentTheme.colors.highEmphasis },
|
{ color: currentTheme.colors.highEmphasis },
|
||||||
i18n.language === 'pt' && { color: currentTheme.colors.primary, fontWeight: 'bold' }
|
i18n.language === 'pt-BR' && { color: currentTheme.colors.primary, fontWeight: 'bold' }
|
||||||
]}>
|
]}>
|
||||||
{t('settings.portuguese')}
|
{t('settings.portuguese_br')}
|
||||||
</Text>
|
</Text>
|
||||||
{i18n.language === 'pt' && (
|
{i18n.language === 'pt-BR' && (
|
||||||
<Feather name="check" size={20} color={currentTheme.colors.primary} />
|
<Feather name="check" size={20} color={currentTheme.colors.primary} />
|
||||||
)}
|
)}
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
style={[
|
style={[
|
||||||
styles.languageOption,
|
styles.languageOption,
|
||||||
i18n.language === 'ar' && { backgroundColor: currentTheme.colors.primary + '20' }
|
i18n.language === 'pt-PT' && { backgroundColor: currentTheme.colors.primary + '20' }
|
||||||
]}
|
]}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
i18n.changeLanguage('ar');
|
i18n.changeLanguage('pt-PT');
|
||||||
languageSheetRef.current?.close();
|
languageSheetRef.current?.close();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Text style={[
|
<Text style={[
|
||||||
styles.languageText,
|
styles.languageText,
|
||||||
{ color: currentTheme.colors.highEmphasis },
|
{ color: currentTheme.colors.highEmphasis },
|
||||||
i18n.language === 'ar' && { color: currentTheme.colors.primary, fontWeight: 'bold' }
|
i18n.language === 'pt-PT' && { color: currentTheme.colors.primary, fontWeight: 'bold' }
|
||||||
]}>
|
]}>
|
||||||
{t('settings.arabic')}
|
{t('settings.portuguese_pt')}
|
||||||
</Text>
|
</Text>
|
||||||
{i18n.language === 'ar' && (
|
{i18n.language === 'pt-PT' && (
|
||||||
<Feather name="check" size={20} color={currentTheme.colors.primary} />
|
<Feather name="check" size={20} color={currentTheme.colors.primary} />
|
||||||
)}
|
)}
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
style={[
|
style={[
|
||||||
styles.languageOption,
|
styles.languageOption,
|
||||||
i18n.language === 'es' && { backgroundColor: currentTheme.colors.primary + '20' }
|
i18n.language === 'de' && { backgroundColor: currentTheme.colors.primary + '20' }
|
||||||
]}
|
]}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
i18n.changeLanguage('es');
|
i18n.changeLanguage('de');
|
||||||
languageSheetRef.current?.close();
|
languageSheetRef.current?.close();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Text style={[
|
<Text style={[
|
||||||
styles.languageText,
|
styles.languageText,
|
||||||
{ color: currentTheme.colors.highEmphasis },
|
{ color: currentTheme.colors.highEmphasis },
|
||||||
i18n.language === 'es' && { color: currentTheme.colors.primary, fontWeight: 'bold' }
|
i18n.language === 'de' && { color: currentTheme.colors.primary, fontWeight: 'bold' }
|
||||||
]}>
|
]}>
|
||||||
{t('settings.spanish')}
|
{t('settings.german')}
|
||||||
</Text>
|
</Text>
|
||||||
{i18n.language === 'es' && (
|
{i18n.language === 'de' && (
|
||||||
<Feather name="check" size={20} color={currentTheme.colors.primary} />
|
<Feather name="check" size={20} color={currentTheme.colors.primary} />
|
||||||
)}
|
)}
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
style={[
|
style={[
|
||||||
styles.languageOption,
|
styles.languageOption,
|
||||||
i18n.language === 'fr' && { backgroundColor: currentTheme.colors.primary + '20' }
|
i18n.language === 'ar' && { backgroundColor: currentTheme.colors.primary + '20' }
|
||||||
]}
|
]}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
i18n.changeLanguage('fr');
|
i18n.changeLanguage('ar');
|
||||||
languageSheetRef.current?.close();
|
languageSheetRef.current?.close();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Text style={[
|
<Text style={[
|
||||||
styles.languageText,
|
styles.languageText,
|
||||||
{ color: currentTheme.colors.highEmphasis },
|
{ color: currentTheme.colors.highEmphasis },
|
||||||
i18n.language === 'fr' && { color: currentTheme.colors.primary, fontWeight: 'bold' }
|
i18n.language === 'ar' && { color: currentTheme.colors.primary, fontWeight: 'bold' }
|
||||||
]}>
|
]}>
|
||||||
{t('settings.french')}
|
{t('settings.arabic')}
|
||||||
</Text>
|
</Text>
|
||||||
{i18n.language === 'fr' && (
|
{i18n.language === 'ar' && (
|
||||||
<Feather name="check" size={20} color={currentTheme.colors.primary} />
|
<Feather name="check" size={20} color={currentTheme.colors.primary} />
|
||||||
)}
|
)}
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
style={[
|
style={[
|
||||||
styles.languageOption,
|
styles.languageOption,
|
||||||
i18n.language === 'it' && { backgroundColor: currentTheme.colors.primary + '20' }
|
i18n.language === 'es' && { backgroundColor: currentTheme.colors.primary + '20' }
|
||||||
]}
|
]}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
i18n.changeLanguage('it');
|
i18n.changeLanguage('es');
|
||||||
languageSheetRef.current?.close();
|
languageSheetRef.current?.close();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Text style={[
|
<Text style={[
|
||||||
styles.languageText,
|
styles.languageText,
|
||||||
{ color: currentTheme.colors.highEmphasis },
|
{ color: currentTheme.colors.highEmphasis },
|
||||||
i18n.language === 'it' && { color: currentTheme.colors.primary, fontWeight: 'bold' }
|
i18n.language === 'es' && { color: currentTheme.colors.primary, fontWeight: 'bold' }
|
||||||
]}>
|
]}>
|
||||||
{t('settings.italian')}
|
{t('settings.spanish')}
|
||||||
</Text>
|
</Text>
|
||||||
{i18n.language === 'it' && (
|
{i18n.language === 'es' && (
|
||||||
<Feather name="check" size={20} color={currentTheme.colors.primary} />
|
<Feather name="check" size={20} color={currentTheme.colors.primary} />
|
||||||
)}
|
)}
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</ScrollView>
|
|
||||||
</BottomSheetView>
|
<TouchableOpacity
|
||||||
|
style={[
|
||||||
|
styles.languageOption,
|
||||||
|
i18n.language === 'fr' && { backgroundColor: currentTheme.colors.primary + '20' }
|
||||||
|
]}
|
||||||
|
onPress={() => {
|
||||||
|
i18n.changeLanguage('fr');
|
||||||
|
languageSheetRef.current?.close();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Text style={[
|
||||||
|
styles.languageText,
|
||||||
|
{ color: currentTheme.colors.highEmphasis },
|
||||||
|
i18n.language === 'fr' && { color: currentTheme.colors.primary, fontWeight: 'bold' }
|
||||||
|
]}>
|
||||||
|
{t('settings.french')}
|
||||||
|
</Text>
|
||||||
|
{i18n.language === 'fr' && (
|
||||||
|
<Feather name="check" size={20} color={currentTheme.colors.primary} />
|
||||||
|
)}
|
||||||
|
</TouchableOpacity>
|
||||||
|
|
||||||
|
<TouchableOpacity
|
||||||
|
style={[
|
||||||
|
styles.languageOption,
|
||||||
|
i18n.language === 'it' && { backgroundColor: currentTheme.colors.primary + '20' }
|
||||||
|
]}
|
||||||
|
onPress={() => {
|
||||||
|
i18n.changeLanguage('it');
|
||||||
|
languageSheetRef.current?.close();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Text style={[
|
||||||
|
styles.languageText,
|
||||||
|
{ color: currentTheme.colors.highEmphasis },
|
||||||
|
i18n.language === 'it' && { color: currentTheme.colors.primary, fontWeight: 'bold' }
|
||||||
|
]}>
|
||||||
|
{t('settings.italian')}
|
||||||
|
</Text>
|
||||||
|
{i18n.language === 'it' && (
|
||||||
|
<Feather name="check" size={20} color={currentTheme.colors.primary} />
|
||||||
|
)}
|
||||||
|
</TouchableOpacity>
|
||||||
|
</BottomSheetScrollView>
|
||||||
</BottomSheetModal>
|
</BottomSheetModal>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue