Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Refine translation sources (#1204)

Leendert de Borst961d237d4294
diff --git a/apps/mobile-app/app/(tabs)/settings/import-export.tsx b/apps/mobile-app/app/(tabs)/settings/import-export.tsx
index 793c3ba0f..d2df8db14 100644
--- a/apps/mobile-app/app/(tabs)/settings/import-export.tsx
+++ b/apps/mobile-app/app/(tabs)/settings/import-export.tsx
@@ -183,15 +183,10 @@ export default function ImportExportScreen(): React.ReactNode {
* Show export confirmation dialog.
*/
const showExportConfirmation = (): void => {
- const warningMessage = t('settings.exportWarning') ??
- 'Warning: Exporting your vault to an unencrypted file will expose all of your passwords and sensitive information in plain text. Only do this on trusted devices and ensure you:\n\n' +
- '• Store the exported file in a secure location\n' +
- '• Delete the file when you no longer need it\n' +
- '• Never share the exported file with others\n\n' +
- 'Are you sure you want to continue with the export?';
+ const warningMessage = t('settings.exportWarning');
Alert.alert(
- t('settings.exportConfirmTitle') ?? 'Export Vault',
+ t('settings.exportConfirmTitle'),
warningMessage,
[
{ text: t('common.cancel'), style: 'cancel' },
@@ -250,7 +245,7 @@ export default function ImportExportScreen(): React.ReactNode {
const canShare = await Sharing.isAvailableAsync();
if (canShare) {
await Sharing.shareAsync(filePath, {
- dialogTitle: `Save ${filename}`,
+ dialogTitle: filename,
mimeType: 'text/csv',
});
@@ -262,17 +257,12 @@ export default function ImportExportScreen(): React.ReactNode {
console.error('Error cleaning up export file:', error);
}
}, 5000);
- } else {
- Alert.alert(
- t('common.success') ?? 'Success',
- t('settings.exportSaved') ?? `File saved to: ${filename}`
- );
}
} catch (error) {
console.error('Export error:', error);
Alert.alert(
- t('common.error') ?? 'Error',
- t('settings.exportError') ?? 'Failed to export vault. Please try again.'
+ t('common.error'),
+ t('common.unknownError')
);
} finally {
setIsExporting(false);
@@ -359,7 +349,7 @@ export default function ImportExportScreen(): React.ReactNode {
{/* Export Section */}
<View style={styles.section}>
<ThemedText style={styles.sectionTitle}>
- {t('settings.exportSectionTitle') ?? 'Export'}
+ {t('settings.exportSectionTitle')}
</ThemedText>
<ThemedText style={styles.sectionDescription}>
{t('settings.exportSectionDescription')}
diff --git a/apps/mobile-app/hooks/useVaultMutate.ts b/apps/mobile-app/hooks/useVaultMutate.ts
index 448567db8..000493578 100644
--- a/apps/mobile-app/hooks/useVaultMutate.ts
+++ b/apps/mobile-app/hooks/useVaultMutate.ts
@@ -318,10 +318,10 @@ export function useVaultMutate() : {
Toast.show({
type: 'error',
text1: t('vault.errors.operationFailed'),
- text2: error instanceof Error ? error.message : t('vault.errors.unknownError'),
+ text2: error instanceof Error ? error.message : t('common.unknownError'),
position: 'bottom'
});
- options.onError?.(error instanceof Error ? error : new Error(t('vault.errors.unknownError')));
+ options.onError?.(error instanceof Error ? error : new Error(t('common.unknownError')));
} finally {
setIsLoading(false);
setSyncStatus('');
@@ -399,10 +399,10 @@ export function useVaultMutate() : {
Toast.show({
type: 'error',
text1: t('vault.errors.operationFailed'),
- text2: error instanceof Error ? error.message : t('vault.errors.unknownError'),
+ text2: error instanceof Error ? error.message : t('common.unknownError'),
position: 'bottom'
});
- options.onError?.(error instanceof Error ? error : new Error(t('vault.errors.unknownError')));
+ options.onError?.(error instanceof Error ? error : new Error(t('common.unknownError')));
} finally {
setIsLoading(false);
setSyncStatus('');
diff --git a/apps/mobile-app/hooks/useVaultSync.ts b/apps/mobile-app/hooks/useVaultSync.ts
index 2190499fc..d37b557c3 100644
--- a/apps/mobile-app/hooks/useVaultSync.ts
+++ b/apps/mobile-app/hooks/useVaultSync.ts
@@ -154,7 +154,7 @@ export const useVaultSync = () : {
await withMinimumDelay(() => Promise.resolve(onSuccess?.(false)), 300, enableDelay);
return false;
} catch (err) {
- const errorMessage = err instanceof Error ? err.message : t('vault.errors.unknownErrorDuringSync');
+ const errorMessage = err instanceof Error ? err.message : t('common.unknownError');
console.error('Vault sync error:', err);
// Check if it's a network error
diff --git a/apps/mobile-app/i18n/locales/en.json b/apps/mobile-app/i18n/locales/en.json
index 1a3c622e9..13026b658 100644
--- a/apps/mobile-app/i18n/locales/en.json
+++ b/apps/mobile-app/i18n/locales/en.json
@@ -15,7 +15,8 @@
"copied": "Copied to clipboard",
"loadMore": "Load more",
"use": "Use",
- "confirm": "Confirm"
+ "confirm": "Confirm",
+ "unknownError": "Unknown error"
},
"auth": {
"login": "Log in",
@@ -77,11 +78,9 @@
"errorDuringPasswordChange": "Error during password change operation. Please log in again to retrieve your latest vault.",
"failedToSyncVault": "Failed to sync vault",
"operationFailed": "Operation failed",
- "unknownError": "Unknown error",
"versionNotSupported": "This version of the AliasVault mobile app is not supported by the server anymore. Please update your app to the latest version.",
"serverNeedsUpdate": "The AliasVault server needs to be updated to a newer version in order to use this mobile app. Please contact support if you need help.",
"vaultDecryptFailed": "Vault could not be decrypted, if the problem persists please logout and login again.",
- "unknownErrorDuringSync": "Unknown error during vault sync",
"passwordChanged": "Your password has changed since the last time you logged in. Please login again for security reasons."
}
},