mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-05-19 08:22:00 +00:00
Android Update Popup Localization Support Patch
This commit is contained in:
parent
335d6054c1
commit
f63ff2ed69
3 changed files with 27 additions and 7 deletions
|
|
@ -11,6 +11,7 @@ import {
|
||||||
import { MaterialIcons } from '@expo/vector-icons';
|
import { MaterialIcons } from '@expo/vector-icons';
|
||||||
import { useTheme } from '../contexts/ThemeContext';
|
import { useTheme } from '../contexts/ThemeContext';
|
||||||
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
const { width } = Dimensions.get('window');
|
const { width } = Dimensions.get('window');
|
||||||
|
|
||||||
|
|
@ -39,6 +40,7 @@ const AndroidUpdatePopup: React.FC<AndroidUpdatePopupProps> = ({
|
||||||
isInstalling = false,
|
isInstalling = false,
|
||||||
}) => {
|
}) => {
|
||||||
const { currentTheme } = useTheme();
|
const { currentTheme } = useTheme();
|
||||||
|
const { t } = useTranslation();
|
||||||
const insets = useSafeAreaInsets();
|
const insets = useSafeAreaInsets();
|
||||||
const backHandlerRef = useRef<any>(null);
|
const backHandlerRef = useRef<any>(null);
|
||||||
const timeoutRef = useRef<NodeJS.Timeout | null>(null);
|
const timeoutRef = useRef<NodeJS.Timeout | null>(null);
|
||||||
|
|
@ -168,13 +170,13 @@ const AndroidUpdatePopup: React.FC<AndroidUpdatePopupProps> = ({
|
||||||
styles.title,
|
styles.title,
|
||||||
{ color: currentTheme.colors.highEmphasis }
|
{ color: currentTheme.colors.highEmphasis }
|
||||||
]}>
|
]}>
|
||||||
Update Available
|
{t('update_popup.title')}
|
||||||
</Text>
|
</Text>
|
||||||
<Text style={[
|
<Text style={[
|
||||||
styles.subtitle,
|
styles.subtitle,
|
||||||
{ color: currentTheme.colors.mediumEmphasis }
|
{ color: currentTheme.colors.mediumEmphasis }
|
||||||
]}>
|
]}>
|
||||||
A new version of Nuvio is ready to install
|
{t('update_popup.title_desc')}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
|
@ -190,7 +192,7 @@ const AndroidUpdatePopup: React.FC<AndroidUpdatePopupProps> = ({
|
||||||
styles.infoLabel,
|
styles.infoLabel,
|
||||||
{ color: currentTheme.colors.mediumEmphasis }
|
{ color: currentTheme.colors.mediumEmphasis }
|
||||||
]}>
|
]}>
|
||||||
Version:
|
{t('update_popup.version')}
|
||||||
</Text>
|
</Text>
|
||||||
<Text
|
<Text
|
||||||
style={[
|
style={[
|
||||||
|
|
@ -233,12 +235,12 @@ const AndroidUpdatePopup: React.FC<AndroidUpdatePopupProps> = ({
|
||||||
{isInstalling ? (
|
{isInstalling ? (
|
||||||
<>
|
<>
|
||||||
<MaterialIcons name="install-mobile" size={18} color="white" />
|
<MaterialIcons name="install-mobile" size={18} color="white" />
|
||||||
<Text style={styles.buttonText}>Installing...</Text>
|
<Text style={styles.buttonText}>{t('update_popup.installing')}</Text>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<MaterialIcons name="download" size={18} color="white" />
|
<MaterialIcons name="download" size={18} color="white" />
|
||||||
<Text style={styles.buttonText}>Update Now</Text>
|
<Text style={styles.buttonText}>{t('update_popup.update_now')}</Text>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|
@ -261,7 +263,7 @@ const AndroidUpdatePopup: React.FC<AndroidUpdatePopupProps> = ({
|
||||||
styles.secondaryButtonText,
|
styles.secondaryButtonText,
|
||||||
{ color: currentTheme.colors.mediumEmphasis }
|
{ color: currentTheme.colors.mediumEmphasis }
|
||||||
]}>
|
]}>
|
||||||
Later
|
{t('update_popup.later')}
|
||||||
</Text>
|
</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|
||||||
|
|
@ -282,7 +284,7 @@ const AndroidUpdatePopup: React.FC<AndroidUpdatePopupProps> = ({
|
||||||
styles.secondaryButtonText,
|
styles.secondaryButtonText,
|
||||||
{ color: currentTheme.colors.mediumEmphasis }
|
{ color: currentTheme.colors.mediumEmphasis }
|
||||||
]}>
|
]}>
|
||||||
Dismiss
|
{t('update_popup.dismiss')}
|
||||||
</Text>
|
</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</View>
|
</View>
|
||||||
|
|
|
||||||
|
|
@ -1503,5 +1503,14 @@
|
||||||
"provider_logs": "Provider Logs",
|
"provider_logs": "Provider Logs",
|
||||||
"no_logs_captured": "No logs captured."
|
"no_logs_captured": "No logs captured."
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"update_popup":{
|
||||||
|
"title": "Update Available",
|
||||||
|
"title_desc": "A new Version of Nuvio is ready to install",
|
||||||
|
"version":"Version:",
|
||||||
|
"installing":"Installing...",
|
||||||
|
"update_now":"Update Now",
|
||||||
|
"later":"Later",
|
||||||
|
"dismiss":"Dismiss"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1487,5 +1487,14 @@
|
||||||
"provider_logs": "Log Provider",
|
"provider_logs": "Log Provider",
|
||||||
"no_logs_captured": "Nessun log catturato."
|
"no_logs_captured": "Nessun log catturato."
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"update_popup":{
|
||||||
|
"title": "Aggiornamento Disponibile",
|
||||||
|
"title_desc": "Una nuova versione di Nuvio è pronta per essere installata",
|
||||||
|
"version":"Versione:",
|
||||||
|
"installing":"Installando...",
|
||||||
|
"update_now":"Aggiorna Ora",
|
||||||
|
"later":"Dopo",
|
||||||
|
"dismiss":"Chiudi"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue