From f63ff2ed697a75810bce27769125a70ba867f74a Mon Sep 17 00:00:00 2001 From: cyberalby2 Date: Sun, 15 Mar 2026 16:26:16 +0100 Subject: [PATCH] Android Update Popup Localization Support Patch --- src/components/AndroidUpdatePopup.tsx | 16 +++++++++------- src/i18n/locales/en.json | 9 +++++++++ src/i18n/locales/it.json | 9 +++++++++ 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/src/components/AndroidUpdatePopup.tsx b/src/components/AndroidUpdatePopup.tsx index 31190371..47fc66e7 100644 --- a/src/components/AndroidUpdatePopup.tsx +++ b/src/components/AndroidUpdatePopup.tsx @@ -11,6 +11,7 @@ import { import { MaterialIcons } from '@expo/vector-icons'; import { useTheme } from '../contexts/ThemeContext'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; +import { useTranslation } from 'react-i18next'; const { width } = Dimensions.get('window'); @@ -39,6 +40,7 @@ const AndroidUpdatePopup: React.FC = ({ isInstalling = false, }) => { const { currentTheme } = useTheme(); + const { t } = useTranslation(); const insets = useSafeAreaInsets(); const backHandlerRef = useRef(null); const timeoutRef = useRef(null); @@ -168,13 +170,13 @@ const AndroidUpdatePopup: React.FC = ({ styles.title, { color: currentTheme.colors.highEmphasis } ]}> - Update Available + {t('update_popup.title')} - A new version of Nuvio is ready to install + {t('update_popup.title_desc')} @@ -190,7 +192,7 @@ const AndroidUpdatePopup: React.FC = ({ styles.infoLabel, { color: currentTheme.colors.mediumEmphasis } ]}> - Version: + {t('update_popup.version')} = ({ {isInstalling ? ( <> - Installing... + {t('update_popup.installing')} ) : ( <> - Update Now + {t('update_popup.update_now')} )} @@ -261,7 +263,7 @@ const AndroidUpdatePopup: React.FC = ({ styles.secondaryButtonText, { color: currentTheme.colors.mediumEmphasis } ]}> - Later + {t('update_popup.later')} @@ -282,7 +284,7 @@ const AndroidUpdatePopup: React.FC = ({ styles.secondaryButtonText, { color: currentTheme.colors.mediumEmphasis } ]}> - Dismiss + {t('update_popup.dismiss')} diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index b4793177..166a3002 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -1503,5 +1503,14 @@ "provider_logs": "Provider Logs", "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" } } diff --git a/src/i18n/locales/it.json b/src/i18n/locales/it.json index 3115c2e4..6df0630b 100644 --- a/src/i18n/locales/it.json +++ b/src/i18n/locales/it.json @@ -1487,5 +1487,14 @@ "provider_logs": "Log Provider", "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" } }