mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-05-17 15:32:01 +00:00
MAL Settings Screen Localization Patch
This commit is contained in:
parent
dc97b23083
commit
ff172e019e
3 changed files with 106 additions and 34 deletions
|
|
@ -1531,5 +1531,41 @@
|
|||
"skip":"Skip",
|
||||
"get_started":"Get Started",
|
||||
"swipe_to_continue":"Swipe to continue"
|
||||
},
|
||||
"mal_settings_screen":{
|
||||
"connected":"Connected to MyAnimeList",
|
||||
"failed_to_connect":"Failed to connect to MyAnimeList",
|
||||
"error_occured":"An error occurred during sign in",
|
||||
"unknown_error":"Unknown error",
|
||||
"sign_out":"Sign Out",
|
||||
"sign_out_confirm":"Are you sure you want to disconnect?",
|
||||
"settings":"Settings",
|
||||
"total":"Total",
|
||||
"days":"Days",
|
||||
"mean":"Mean",
|
||||
"watching":"Watching",
|
||||
"completed":"Completed",
|
||||
"on_hold":"On Hold",
|
||||
"dropped":"Dropped",
|
||||
"sync_complete_title":"Sync Complete",
|
||||
"sync_complete_title_desc":"MAL data has been refreshed",
|
||||
"sync_failed_title":"Sync Failed",
|
||||
"sync_failed_title_desc":"Could not refresh MAL data.",
|
||||
"sync":"Sync",
|
||||
"connect":"Connect MyAnimeList",
|
||||
"connect_desc":"Sync your watch history and manage your anime list.",
|
||||
"sign_in":"Sign In with MAL",
|
||||
"sync_settings":"Sync Settings",
|
||||
"enable_mal_sync":"Enable MAL Sync",
|
||||
"enable_mal_sync_desc":"Global switch to enable or disable all MyAnimeList features.",
|
||||
"mal_auto_episode":"Auto Episode Update",
|
||||
"mal_auto_episode_desc":"Automatically update your progress on MAL when you finish watching an episode",
|
||||
"completion":"completion",
|
||||
"auto_add_anime":"Auto Add Anime",
|
||||
"auto_add_anime_desc":"If an anime is not in your MAL list, it will be added automatically when you start watching.",
|
||||
"auto_sync":" Auto-Sync to Library",
|
||||
"auto_sync_desc":"Automatically add items from your MAL 'Watching' list to your Nuvio Library.",
|
||||
"allow_nsfw":"Include NSFW Content",
|
||||
"allow_nsfw_desc":"Allow NSFW entries to be returned when fetching your MAL list."
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1514,5 +1514,41 @@
|
|||
"skip":"Salta",
|
||||
"get_started":"Inizia",
|
||||
"swipe_to_continue":"Scorri per continuare"
|
||||
},
|
||||
"mal_settings_screen":{
|
||||
"connected":"Connesso su MyAnimeList",
|
||||
"failed_to_connect":"Errore nel collegamento su MyAnimeList",
|
||||
"error_occured":"Un errore si è verificato durante l'accesso",
|
||||
"unknown_error":"Errore sconosciuto",
|
||||
"sign_out":"Logout",
|
||||
"sign_out_confirm":"Sei sicuro di volerti disconnettere?",
|
||||
"settings":"Impostazioni",
|
||||
"total":"Totali",
|
||||
"days":"Giorni",
|
||||
"mean":"Mean",
|
||||
"watching":"Guardati",
|
||||
"completed":"Completati",
|
||||
"on_hold":"Da Parte",
|
||||
"dropped":"Dropped",
|
||||
"sync_complete_title":"Sincronizzazione completata",
|
||||
"sync_complete_title_desc":"I dati di MAL son stati aggiornati",
|
||||
"sync_failed_title":"Sincronizzazione fallita",
|
||||
"sync_failed_title_desc":"Non è stato possibile aggiornare i dati di MAL",
|
||||
"sync":"Sincronizzazione",
|
||||
"connect":"Connetti MyAnimeList",
|
||||
"connect_desc":"Sincronizza la tua cronologia di visione e gestisci le tue liste anime.",
|
||||
"sign_in":"Accedi con MAL",
|
||||
"sync_settings":"Impostazioni di Sincronizzazione",
|
||||
"enable_mal_sync":"Abilita Sincronizzazione MAL",
|
||||
"enable_mal_sync_desc":"Toggle Globale per abilitare e disabilitare tutte le feature di MyAnimeList.",
|
||||
"mal_auto_episode":"Aggiornamento Episodi Automatico",
|
||||
"mal_auto_episode_desc":"Aggiorna automaticamente i tuoi progressi su MAL quando hai finito di guardare un episodio",
|
||||
"completion":"completamento",
|
||||
"auto_add_anime":"Aggiunta Anime Automatica",
|
||||
"auto_add_anime_desc":"Se l'anime non è nella tua lista MAL , sarà aggiunto automaticamente quando inizi a guardarlo.",
|
||||
"auto_sync":"Sincronizzazione Libreria Automatica",
|
||||
"auto_sync_desc":"Aggiungi elementi dalla tua lista 'Watching' di MAL verso la tua libreria di Nuvio.",
|
||||
"allow_nsfw":"Includi Contenuti NSFW",
|
||||
"allow_nsfw_desc":"Consenti contenuti NSFW quando aggiorni i dati dalle tue liste MAL."
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,24 +98,24 @@ const MalSettingsScreen: React.FC = () => {
|
|||
const result = await MalAuth.login();
|
||||
if (result === true) {
|
||||
await checkAuthStatus();
|
||||
openAlert('Success', 'Connected to MyAnimeList');
|
||||
openAlert(t('common.success'), t('mal_settings_screen.connected'));
|
||||
} else {
|
||||
const errorMessage = typeof result === 'string' ? result : 'Failed to connect to MyAnimeList';
|
||||
openAlert('Error', errorMessage);
|
||||
const errorMessage = typeof result === 'string' ? result : t('mal_settings_screen.failed_to_connect');
|
||||
openAlert(t('common.error'), errorMessage);
|
||||
}
|
||||
} catch (e: any) {
|
||||
console.error(e);
|
||||
openAlert('Error', `An error occurred during sign in: ${e.message || 'Unknown error'}`);
|
||||
openAlert(t('common.error'), `${t('mal_settings_screen.error_occured')}: ${e.message || t('mal_settings_screen.unknown_error')}`);
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
const handleSignOut = () => {
|
||||
openAlert('Sign Out', 'Are you sure you want to disconnect?', [
|
||||
{ label: 'Cancel', onPress: () => setAlertVisible(false) },
|
||||
openAlert(t('mal_settings_screen.sign_out'), t('mal_settings_screen.sign_out_confirm'), [
|
||||
{ label: t('common.cancel'), onPress: () => setAlertVisible(false) },
|
||||
{
|
||||
label: 'Sign Out',
|
||||
label: t('mal_settings_screen.sign_out'),
|
||||
onPress: () => {
|
||||
MalAuth.clearToken();
|
||||
setIsAuthenticated(false);
|
||||
|
|
@ -168,7 +168,7 @@ const MalSettingsScreen: React.FC = () => {
|
|||
color={currentTheme.colors.highEmphasis}
|
||||
/>
|
||||
<Text style={[styles.backText, { color: currentTheme.colors.highEmphasis }]}>
|
||||
Settings
|
||||
{t('mal_settings_screen.settings')}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
|
|
@ -232,47 +232,47 @@ const MalSettingsScreen: React.FC = () => {
|
|||
<Text style={[styles.statValue, { color: currentTheme.colors.primary }]}>
|
||||
{userProfile.anime_statistics.num_items}
|
||||
</Text>
|
||||
<Text style={[styles.statLabel, { color: currentTheme.colors.mediumEmphasis }]}>Total</Text>
|
||||
<Text style={[styles.statLabel, { color: currentTheme.colors.mediumEmphasis }]}>{t('mal_settings_screen.total')}</Text>
|
||||
</View>
|
||||
<View style={styles.statBox}>
|
||||
<Text style={[styles.statValue, { color: currentTheme.colors.primary }]}>
|
||||
{userProfile.anime_statistics.num_days_watched.toFixed(1)}
|
||||
</Text>
|
||||
<Text style={[styles.statLabel, { color: currentTheme.colors.mediumEmphasis }]}>Days</Text>
|
||||
<Text style={[styles.statLabel, { color: currentTheme.colors.mediumEmphasis }]}>{t('mal_settings_screen.days')}</Text>
|
||||
</View>
|
||||
<View style={styles.statBox}>
|
||||
<Text style={[styles.statValue, { color: currentTheme.colors.primary }]}>
|
||||
{userProfile.anime_statistics.mean_score.toFixed(1)}
|
||||
</Text>
|
||||
<Text style={[styles.statLabel, { color: currentTheme.colors.mediumEmphasis }]}>Mean</Text>
|
||||
<Text style={[styles.statLabel, { color: currentTheme.colors.mediumEmphasis }]}>{t('mal_settings_screen.mean')}</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<View style={[styles.statGrid, { borderColor: currentTheme.colors.border }]}>
|
||||
<View style={styles.statGridItem}>
|
||||
<View style={[styles.statusDot, { backgroundColor: '#2DB039' }]} />
|
||||
<Text style={[styles.statGridLabel, { color: currentTheme.colors.highEmphasis }]}>Watching</Text>
|
||||
<Text style={[styles.statGridLabel, { color: currentTheme.colors.highEmphasis }]}>{t('mal_settings_screen.watching')}</Text>
|
||||
<Text style={[styles.statGridValue, { color: currentTheme.colors.highEmphasis }]}>
|
||||
{userProfile.anime_statistics.num_items_watching}
|
||||
</Text>
|
||||
</View>
|
||||
<View style={styles.statGridItem}>
|
||||
<View style={[styles.statusDot, { backgroundColor: '#26448F' }]} />
|
||||
<Text style={[styles.statGridLabel, { color: currentTheme.colors.highEmphasis }]}>Completed</Text>
|
||||
<Text style={[styles.statGridLabel, { color: currentTheme.colors.highEmphasis }]}>{t('mal_settings_screen.completed')}</Text>
|
||||
<Text style={[styles.statGridValue, { color: currentTheme.colors.highEmphasis }]}>
|
||||
{userProfile.anime_statistics.num_items_completed}
|
||||
</Text>
|
||||
</View>
|
||||
<View style={styles.statGridItem}>
|
||||
<View style={[styles.statusDot, { backgroundColor: '#F9D457' }]} />
|
||||
<Text style={[styles.statGridLabel, { color: currentTheme.colors.highEmphasis }]}>On Hold</Text>
|
||||
<Text style={[styles.statGridLabel, { color: currentTheme.colors.highEmphasis }]}>{t('mal_settings_screen.on_hold')}</Text>
|
||||
<Text style={[styles.statGridValue, { color: currentTheme.colors.highEmphasis }]}>
|
||||
{userProfile.anime_statistics.num_items_on_hold}
|
||||
</Text>
|
||||
</View>
|
||||
<View style={styles.statGridItem}>
|
||||
<View style={[styles.statusDot, { backgroundColor: '#A12F31' }]} />
|
||||
<Text style={[styles.statGridLabel, { color: currentTheme.colors.highEmphasis }]}>Dropped</Text>
|
||||
<Text style={[styles.statGridLabel, { color: currentTheme.colors.highEmphasis }]}>{t('mal_settings_screen.dropped')}</Text>
|
||||
<Text style={[styles.statGridValue, { color: currentTheme.colors.highEmphasis }]}>
|
||||
{userProfile.anime_statistics.num_items_dropped}
|
||||
</Text>
|
||||
|
|
@ -289,26 +289,26 @@ const MalSettingsScreen: React.FC = () => {
|
|||
try {
|
||||
const synced = await MalSync.syncMalToLibrary();
|
||||
if (synced) {
|
||||
openAlert('Sync Complete', 'MAL data has been refreshed.');
|
||||
openAlert(t('mal_settings_screen.sync_complete_title'), t('mal_settings_screen.sync_complete_title_desc'));
|
||||
} else {
|
||||
openAlert('Sync Failed', 'Could not refresh MAL data.');
|
||||
openAlert(t('mal_settings_screen.sync_failed_title'), t('mal_settings_screen.sync_failed_title_desc'));
|
||||
}
|
||||
} catch {
|
||||
openAlert('Sync Failed', 'Could not refresh MAL data.');
|
||||
openAlert(t('mal_settings_screen.sync_failed_title'), t('mal_settings_screen.sync_failed_title_desc'));
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
}}
|
||||
>
|
||||
<MaterialIcons name="sync" size={18} color="white" style={{ marginRight: 6 }} />
|
||||
<Text style={styles.buttonText}>Sync</Text>
|
||||
<Text style={styles.buttonText}>{t('mal_settings_screen.sync')}</Text>
|
||||
</TouchableOpacity>
|
||||
|
||||
<TouchableOpacity
|
||||
style={[styles.smallButton, { backgroundColor: currentTheme.colors.error, width: 100 }]}
|
||||
onPress={handleSignOut}
|
||||
>
|
||||
<Text style={styles.buttonText}>Sign Out</Text>
|
||||
<Text style={styles.buttonText}>{t('mal_settings_screen.sign_out')}</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</View>
|
||||
|
|
@ -320,16 +320,16 @@ const MalSettingsScreen: React.FC = () => {
|
|||
resizeMode="contain"
|
||||
/>
|
||||
<Text style={[styles.signInTitle, { color: currentTheme.colors.highEmphasis }]}>
|
||||
Connect MyAnimeList
|
||||
{t('mal_settings_screen.connect')}
|
||||
</Text>
|
||||
<Text style={[styles.signInDescription, { color: currentTheme.colors.mediumEmphasis }]}>
|
||||
Sync your watch history and manage your anime list.
|
||||
{t('mal_settings_screen.connect_desc')}
|
||||
</Text>
|
||||
<TouchableOpacity
|
||||
style={[styles.button, { backgroundColor: currentTheme.colors.primary }]}
|
||||
onPress={handleSignIn}
|
||||
>
|
||||
<Text style={styles.buttonText}>Sign In with MAL</Text>
|
||||
<Text style={styles.buttonText}>{t('mal_settings_screen.sign_in')}</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
)}
|
||||
|
|
@ -339,17 +339,17 @@ const MalSettingsScreen: React.FC = () => {
|
|||
<View style={[styles.card, { backgroundColor: currentTheme.colors.elevation2 }]}>
|
||||
<View style={styles.settingsSection}>
|
||||
<Text style={[styles.sectionTitle, { color: currentTheme.colors.highEmphasis }]}>
|
||||
Sync Settings
|
||||
{t('mal_settings_screen.sync_settings')}
|
||||
</Text>
|
||||
|
||||
<View style={styles.settingItem}>
|
||||
<View style={styles.settingContent}>
|
||||
<View style={styles.settingTextContainer}>
|
||||
<Text style={[styles.settingLabel, { color: currentTheme.colors.highEmphasis }]}>
|
||||
Enable MAL Sync
|
||||
{t('mal_settings_screen.enable_mal_sync')}
|
||||
</Text>
|
||||
<Text style={[styles.settingDescription, { color: currentTheme.colors.mediumEmphasis }]}>
|
||||
Global switch to enable or disable all MyAnimeList features.
|
||||
{t('mal_settings_screen.enable_mal_sync_desc')}
|
||||
</Text>
|
||||
</View>
|
||||
<Switch
|
||||
|
|
@ -365,10 +365,10 @@ const MalSettingsScreen: React.FC = () => {
|
|||
<View style={styles.settingContent}>
|
||||
<View style={styles.settingTextContainer}>
|
||||
<Text style={[styles.settingLabel, { color: currentTheme.colors.highEmphasis }]}>
|
||||
Auto Episode Update
|
||||
{t('mal_settings_screen.mal_auto_episode')}
|
||||
</Text>
|
||||
<Text style={[styles.settingDescription, { color: currentTheme.colors.mediumEmphasis }]}>
|
||||
Automatically update your progress on MAL when you finish watching an episode (>=90% completion).
|
||||
{t('mal_settings_screen.mal_auto_episode_desc')} (>=90% {t('mal_settings_screen.completion')}).
|
||||
</Text>
|
||||
</View>
|
||||
<Switch
|
||||
|
|
@ -384,10 +384,10 @@ const MalSettingsScreen: React.FC = () => {
|
|||
<View style={styles.settingContent}>
|
||||
<View style={styles.settingTextContainer}>
|
||||
<Text style={[styles.settingLabel, { color: currentTheme.colors.highEmphasis }]}>
|
||||
Auto Add Anime
|
||||
{t('mal_settings_screen.auto_add_anime')}
|
||||
</Text>
|
||||
<Text style={[styles.settingDescription, { color: currentTheme.colors.mediumEmphasis }]}>
|
||||
If an anime is not in your MAL list, it will be added automatically when you start watching.
|
||||
{t('mal_settings_screen.auto_add_anime_desc')}
|
||||
</Text>
|
||||
</View>
|
||||
<Switch
|
||||
|
|
@ -403,10 +403,10 @@ const MalSettingsScreen: React.FC = () => {
|
|||
<View style={styles.settingContent}>
|
||||
<View style={styles.settingTextContainer}>
|
||||
<Text style={[styles.settingLabel, { color: currentTheme.colors.highEmphasis }]}>
|
||||
Auto-Sync to Library
|
||||
{t('mal_settings_screen.auto_sync')}
|
||||
</Text>
|
||||
<Text style={[styles.settingDescription, { color: currentTheme.colors.mediumEmphasis }]}>
|
||||
Automatically add items from your MAL 'Watching' list to your Nuvio Library.
|
||||
{t('mal_settings_screen.auto_sync_desc')}
|
||||
</Text>
|
||||
</View>
|
||||
<Switch
|
||||
|
|
@ -422,10 +422,10 @@ const MalSettingsScreen: React.FC = () => {
|
|||
<View style={styles.settingContent}>
|
||||
<View style={styles.settingTextContainer}>
|
||||
<Text style={[styles.settingLabel, { color: currentTheme.colors.highEmphasis }]}>
|
||||
Include NSFW Content
|
||||
{t('mal_settings_screen.allow_nsfw')}
|
||||
</Text>
|
||||
<Text style={[styles.settingDescription, { color: currentTheme.colors.mediumEmphasis }]}>
|
||||
Allow NSFW entries to be returned when fetching your MAL list.
|
||||
{t('mal_settings_screen.allow_nsfw_desc')}
|
||||
</Text>
|
||||
</View>
|
||||
<Switch
|
||||
|
|
|
|||
Loading…
Reference in a new issue