mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-05-12 17:38:32 -04:00
Add offline banner translations (#1103)
This commit is contained in:
committed by
Leendert de Borst
parent
ef245b2566
commit
d2590f4222
@@ -3,6 +3,7 @@ import { StyleSheet, View } from 'react-native';
|
||||
import Toast from 'react-native-toast-message';
|
||||
|
||||
import { useColors } from '@/hooks/useColorScheme';
|
||||
import { useTranslation } from '@/hooks/useTranslation';
|
||||
import { useVaultSync } from '@/hooks/useVaultSync';
|
||||
|
||||
import { ThemedText } from '@/components/themed/ThemedText';
|
||||
@@ -17,6 +18,7 @@ import { useAuth } from '@/context/AuthContext';
|
||||
export function OfflineBanner(): React.ReactNode {
|
||||
const { isOffline } = useAuth();
|
||||
const colors = useColors();
|
||||
const { t } = useTranslation();
|
||||
const { syncVault } = useVaultSync();
|
||||
|
||||
if (!isOffline) {
|
||||
@@ -42,7 +44,7 @@ export function OfflineBanner(): React.ReactNode {
|
||||
onSuccess: () => {
|
||||
Toast.show({
|
||||
type: 'success',
|
||||
text1: 'Back online',
|
||||
text1: t('app.offline.backOnline'),
|
||||
position: 'bottom'
|
||||
});
|
||||
},
|
||||
@@ -52,7 +54,7 @@ export function OfflineBanner(): React.ReactNode {
|
||||
onOffline: () => {
|
||||
Toast.show({
|
||||
type: 'error',
|
||||
text1: 'Still offline',
|
||||
text1: t('app.offline.stillOffline'),
|
||||
position: 'bottom'
|
||||
});
|
||||
},
|
||||
@@ -63,7 +65,7 @@ export function OfflineBanner(): React.ReactNode {
|
||||
onError: (error: string) => {
|
||||
Toast.show({
|
||||
type: 'error',
|
||||
text1: 'Still offline',
|
||||
text1: t('app.offline.stillOffline'),
|
||||
text2: error,
|
||||
position: 'bottom'
|
||||
});
|
||||
@@ -99,7 +101,7 @@ export function OfflineBanner(): React.ReactNode {
|
||||
<ThemedView style={styles.container}>
|
||||
<View style={styles.content}>
|
||||
<ThemedText style={styles.text}>
|
||||
Offline mode (read-only)
|
||||
{t('app.offline.banner')}
|
||||
</ThemedText>
|
||||
<RobustPressable
|
||||
style={styles.retryButton}
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
"never": "Never",
|
||||
"copied": "Copied to clipboard",
|
||||
"loadMore": "Load more",
|
||||
"use": "Use"
|
||||
"use": "Use",
|
||||
"confirm": "Confirm"
|
||||
},
|
||||
"auth": {
|
||||
"login": "Log in",
|
||||
@@ -162,7 +163,7 @@
|
||||
"errors": {
|
||||
"loadFailed": "Failed to load credential",
|
||||
"generateUsernameFailed": "Failed to generate username",
|
||||
"generatePasswordFailed": "Failed to generate password",
|
||||
"generatePasswordFailed": "Failed to generate password"
|
||||
},
|
||||
"contextMenu": {
|
||||
"title": "Credential Options",
|
||||
@@ -219,12 +220,12 @@
|
||||
"batteryOptimizationHelpDescription": "Android's battery optimization prevents reliable clipboard clearing when the app is in the background. Disabling battery optimization for AliasVault allows precise background clipboard clearing and automatically grants necessary alarm permissions.",
|
||||
"disableBatteryOptimization": "Disable battery optimization",
|
||||
"identityGenerator": "Identity Generator",
|
||||
"importExport": "Import/Export",
|
||||
"importExport": "Import / Export",
|
||||
"importSectionTitle": "Import",
|
||||
"importSectionDescription": "Import your passwords from other password managers or from a previous AliasVault export.",
|
||||
"importWebNote": "To import credentials from existing password managers, please login to the web app. The import feature is currently only available on the web version.",
|
||||
"exportSectionTitle": "Export",
|
||||
"exportSectionDescription": "Export your vault data to a CSV file. This format can be imported into other password managers or used as a backup.",
|
||||
"exportSectionDescription": "Export your vault data to a CSV file. This file can be used as a back-up and can also be imported into other password managers.",
|
||||
"exportCsvButton": "Export vault to CSV file",
|
||||
"exporting": "Exporting...",
|
||||
"exportConfirmTitle": "Export Vault",
|
||||
@@ -436,11 +437,16 @@
|
||||
"openingVaultReadOnly": "Opening vault in read-only mode",
|
||||
"retryingConnection": "Retrying connection..."
|
||||
},
|
||||
"offline": {
|
||||
"banner": "Offline mode (read-only)",
|
||||
"backOnline": "Back online",
|
||||
"stillOffline": "Still offline"
|
||||
},
|
||||
"alerts": {
|
||||
"syncIssue": "Sync Issue",
|
||||
"syncIssueMessage": "The AliasVault server could not be reached and your vault could not be synced. Would you like to open your local vault in read-only mode or retry the connection?",
|
||||
"openLocalVault": "Open Local Vault",
|
||||
"retrySync": "Retry Sync",
|
||||
"retrySync": "Retry Sync"
|
||||
},
|
||||
"navigation": {
|
||||
"login": "Login",
|
||||
|
||||
Reference in New Issue
Block a user