From a14142a45a40d66627b321d643b6e365cdceea93 Mon Sep 17 00:00:00 2001 From: Leendert de Borst Date: Wed, 21 Jan 2026 11:12:40 +0100 Subject: [PATCH] Cleanup mobile app translations to use new item.* based keys (#1468) --- .../(tabs)/items/autofill-item-created.tsx | 6 ++--- .../(tabs)/settings/password-generator.tsx | 12 +++++----- .../app/(tabs)/settings/vault-unlock.tsx | 2 +- .../components/form/AdvancedPasswordField.tsx | 14 ++++++------ .../components/form/EmailDomainField.tsx | 18 +++++++-------- apps/mobile-app/components/items/ItemCard.tsx | 2 +- .../components/items/ServiceUrlNotice.tsx | 2 +- .../components/items/details/AliasDetails.tsx | 10 ++++----- .../items/details/AttachmentSection.tsx | 4 ++-- .../items/details/AttachmentUploader.tsx | 2 +- .../components/items/details/EmailPreview.tsx | 22 +++++++++---------- .../items/details/FilePreviewModal.tsx | 6 ++--- .../components/items/details/LoginFields.tsx | 2 +- .../components/items/details/NotesSection.tsx | 2 +- .../components/items/details/TotpSection.tsx | 2 +- apps/mobile-app/context/AuthContext.tsx | 4 ++-- apps/mobile-app/i18n/locales/en.json | 19 +--------------- 17 files changed, 56 insertions(+), 73 deletions(-) diff --git a/apps/mobile-app/app/(tabs)/items/autofill-item-created.tsx b/apps/mobile-app/app/(tabs)/items/autofill-item-created.tsx index e22796b77..baf9fefab 100644 --- a/apps/mobile-app/app/(tabs)/items/autofill-item-created.tsx +++ b/apps/mobile-app/app/(tabs)/items/autofill-item-created.tsx @@ -104,13 +104,13 @@ export default function AutofillCredentialCreatedScreen() : React.ReactNode { /> - {t('credentials.credentialCreated')} + {t('items.itemCreated')} - {t('credentials.credentialCreatedMessage')} + {t('items.itemCreatedMessage')} - {t('credentials.switchBackToBrowser')} + {t('items.switchBackToBrowser')} diff --git a/apps/mobile-app/app/(tabs)/settings/password-generator.tsx b/apps/mobile-app/app/(tabs)/settings/password-generator.tsx index 04dc43948..05fda0c0d 100644 --- a/apps/mobile-app/app/(tabs)/settings/password-generator.tsx +++ b/apps/mobile-app/app/(tabs)/settings/password-generator.tsx @@ -337,7 +337,7 @@ export default function PasswordGeneratorSettingsScreen(): React.ReactNode { - {t('credentials.passwordLength')} + {t('items.passwordLength')} {sliderValue ?? 0} - {t('credentials.includeLowercase')} + {t('items.includeLowercase')} updateSetting('UseLowercase', value)} @@ -368,7 +368,7 @@ export default function PasswordGeneratorSettingsScreen(): React.ReactNode { - {t('credentials.includeUppercase')} + {t('items.includeUppercase')} updateSetting('UseUppercase', value)} @@ -378,7 +378,7 @@ export default function PasswordGeneratorSettingsScreen(): React.ReactNode { - {t('credentials.includeNumbers')} + {t('items.includeNumbers')} updateSetting('UseNumbers', value)} @@ -388,7 +388,7 @@ export default function PasswordGeneratorSettingsScreen(): React.ReactNode { - {t('credentials.includeSpecialChars')} + {t('items.includeSpecialChars')} updateSetting('UseSpecialChars', value)} @@ -398,7 +398,7 @@ export default function PasswordGeneratorSettingsScreen(): React.ReactNode { - {t('credentials.avoidAmbiguousChars')} + {t('items.avoidAmbiguousChars')} updateSetting('UseNonAmbiguousChars', value)} diff --git a/apps/mobile-app/app/(tabs)/settings/vault-unlock.tsx b/apps/mobile-app/app/(tabs)/settings/vault-unlock.tsx index 291471062..4a1a40ab3 100644 --- a/apps/mobile-app/app/(tabs)/settings/vault-unlock.tsx +++ b/apps/mobile-app/app/(tabs)/settings/vault-unlock.tsx @@ -340,7 +340,7 @@ export default function VaultUnlockSettingsScreen() : React.ReactNode { - {t('credentials.password')} + {t('items.password')} - {t('credentials.passwordLength')} + {t('items.passwordLength')} {sliderValue} - {t('credentials.changePasswordComplexity')} + {t('items.changePasswordComplexity')} setShowSettingsModal(false)} @@ -494,7 +494,7 @@ const AdvancedPasswordFieldComponent = forwardRef - {t('credentials.includeLowercase')} + {t('items.includeLowercase')} updateSetting('UseLowercase', settingValue)} @@ -504,7 +504,7 @@ const AdvancedPasswordFieldComponent = forwardRef - {t('credentials.includeUppercase')} + {t('items.includeUppercase')} updateSetting('UseUppercase', settingValue)} @@ -514,7 +514,7 @@ const AdvancedPasswordFieldComponent = forwardRef - {t('credentials.includeNumbers')} + {t('items.includeNumbers')} updateSetting('UseNumbers', settingValue)} @@ -524,7 +524,7 @@ const AdvancedPasswordFieldComponent = forwardRef - {t('credentials.includeSpecialChars')} + {t('items.includeSpecialChars')} updateSetting('UseSpecialChars', settingValue)} @@ -534,7 +534,7 @@ const AdvancedPasswordFieldComponent = forwardRef - {t('credentials.avoidAmbiguousChars')} + {t('items.avoidAmbiguousChars')} updateSetting('UseNonAmbiguousChars', settingValue)} diff --git a/apps/mobile-app/components/form/EmailDomainField.tsx b/apps/mobile-app/components/form/EmailDomainField.tsx index 56cba26e4..b57c95dc6 100644 --- a/apps/mobile-app/components/form/EmailDomainField.tsx +++ b/apps/mobile-app/components/form/EmailDomainField.tsx @@ -367,7 +367,7 @@ export const EmailDomainField: React.FC = ({ style={styles.textInput} value={isCustomDomain ? value : localPart} onChangeText={handleLocalPartChange} - placeholder={isCustomDomain ? t('credentials.enterFullEmail') : t('credentials.enterEmailPrefix')} + placeholder={isCustomDomain ? t('items.enterFullEmail') : t('items.enterEmailPrefix')} placeholderTextColor={colors.textMuted} autoCapitalize="none" autoCorrect={false} @@ -394,8 +394,8 @@ export const EmailDomainField: React.FC = ({ {isCustomDomain - ? t('credentials.useDomainChooser') - : t('credentials.enterCustomDomain')} + ? t('items.useDomainChooser') + : t('items.enterCustomDomain')} @@ -412,7 +412,7 @@ export const EmailDomainField: React.FC = ({ e.stopPropagation()}> - {t('credentials.selectEmailDomain')} + {t('items.selectEmailDomain')} = ({ - {t('credentials.privateEmailTitle')} + {t('items.privateEmailTitle')} - ({t('credentials.privateEmailAliasVaultServer')}) + ({t('items.privateEmailAliasVaultServer')}) - {t('credentials.privateEmailDescription')} + {t('items.privateEmailDescription')} {privateEmailDomains.filter(domain => !hiddenPrivateEmailDomains.includes(domain)).map((domain) => ( @@ -462,10 +462,10 @@ export const EmailDomainField: React.FC = ({ - {t('credentials.publicEmailTitle')} + {t('items.publicEmailTitle')} - {t('credentials.publicEmailDescription')} + {t('items.publicEmailDescription')} {PUBLIC_EMAIL_DOMAINS.map((domain) => ( diff --git a/apps/mobile-app/components/items/ItemCard.tsx b/apps/mobile-app/components/items/ItemCard.tsx index 50aa39e54..2517e6def 100644 --- a/apps/mobile-app/components/items/ItemCard.tsx +++ b/apps/mobile-app/components/items/ItemCard.tsx @@ -273,7 +273,7 @@ export function ItemCard({ item, onItemDelete }: ItemCardProps): React.ReactNode return ( - {t('credentials.createNewAliasFor')} “{serviceName}”? + {t('items.createNewAliasFor')} “{serviceName}”? = ({ item }) : React.Reac return ( - {t('credentials.alias')} + {t('items.alias')} {hasName && ( )} {firstName && ( )} {lastName && ( )} {IdentityHelperUtils.isValidBirthDate(birthDate) && ( )} diff --git a/apps/mobile-app/components/items/details/AttachmentSection.tsx b/apps/mobile-app/components/items/details/AttachmentSection.tsx index fda302b44..50520d4bd 100644 --- a/apps/mobile-app/components/items/details/AttachmentSection.tsx +++ b/apps/mobile-app/components/items/details/AttachmentSection.tsx @@ -107,7 +107,7 @@ export const AttachmentSection: React.FC = ({ item }): R } else { Alert.alert( t('common.success'), - `${t('credentials.fileSavedTo')}: ${filePath}` + `${t('items.fileSavedTo')}: ${filePath}` ); } } catch (error) { @@ -236,7 +236,7 @@ export const AttachmentSection: React.FC = ({ item }): R return ( - {t('credentials.attachments')} + {t('items.attachments')} {attachments.map(attachment => ( = ({ onPress={() => deleteAttachment(attachment)} > - {t('credentials.deleteAttachment')} + {t('items.deleteAttachment')} diff --git a/apps/mobile-app/components/items/details/EmailPreview.tsx b/apps/mobile-app/components/items/details/EmailPreview.tsx index 1713b4407..25881ef5e 100644 --- a/apps/mobile-app/components/items/details/EmailPreview.tsx +++ b/apps/mobile-app/components/items/details/EmailPreview.tsx @@ -148,7 +148,7 @@ export const EmailPreview: React.FC = ({ email }) : React.Rea }); if (!response.ok) { - setError(t('credentials.emailLoadError')); + setError(t('items.emailLoadError')); return; } @@ -208,12 +208,12 @@ export const EmailPreview: React.FC = ({ email }) : React.Rea return; } } catch { - setError(t('credentials.emailLoadError')); + setError(t('items.emailLoadError')); } } } catch (err) { console.error('Error loading emails:', err); - setError(t('credentials.emailUnexpectedError')); + setError(t('items.emailUnexpectedError')); } finally { setLoading(false); } @@ -310,7 +310,7 @@ export const EmailPreview: React.FC = ({ email }) : React.Rea return ( - {t('credentials.recentEmails')} + {t('items.recentEmails')} {error} @@ -323,10 +323,10 @@ export const EmailPreview: React.FC = ({ email }) : React.Rea return ( - {t('credentials.recentEmails')} + {t('items.recentEmails')} - {t('credentials.loadingEmails')} + {t('items.loadingEmails')} ); } @@ -335,9 +335,9 @@ export const EmailPreview: React.FC = ({ email }) : React.Rea return ( - {t('credentials.recentEmails')} + {t('items.recentEmails')} - {t('credentials.offlineEmailsMessage')} + {t('items.offlineEmailsMessage')} ); } @@ -346,10 +346,10 @@ export const EmailPreview: React.FC = ({ email }) : React.Rea return ( - {t('credentials.recentEmails')} + {t('items.recentEmails')} - {t('credentials.noEmailsYet')} + {t('items.noEmailsYet')} ); } @@ -357,7 +357,7 @@ export const EmailPreview: React.FC = ({ email }) : React.Rea return ( - {t('credentials.recentEmails')} + {t('items.recentEmails')} {displayedEmails.map((mail) => ( diff --git a/apps/mobile-app/components/items/details/FilePreviewModal.tsx b/apps/mobile-app/components/items/details/FilePreviewModal.tsx index 542f61051..ecb19ef5b 100644 --- a/apps/mobile-app/components/items/details/FilePreviewModal.tsx +++ b/apps/mobile-app/components/items/details/FilePreviewModal.tsx @@ -116,7 +116,7 @@ export const FilePreviewModal: React.FC = ({ } else { Alert.alert( t('common.success'), - `${t('credentials.fileSavedTo')}: ${filePath}` + `${t('items.fileSavedTo')}: ${filePath}` ); } } catch (error) { @@ -252,10 +252,10 @@ export const FilePreviewModal: React.FC = ({ - {t('credentials.previewNotSupported')} + {t('items.previewNotSupported')} - {t('credentials.downloadToView')} + {t('items.downloadToView')} ); diff --git a/apps/mobile-app/components/items/details/LoginFields.tsx b/apps/mobile-app/components/items/details/LoginFields.tsx index c7a01d67a..f839ab9cb 100644 --- a/apps/mobile-app/components/items/details/LoginFields.tsx +++ b/apps/mobile-app/components/items/details/LoginFields.tsx @@ -94,7 +94,7 @@ export const LoginFields: React.FC = ({ item }) : React.ReactN return ( - {t('credentials.loginCredentials')} + {t('items.loginCredentials')} {/* Render login fields using FieldBlock */} {sortedLoginFields.map((field: ItemField) => ( diff --git a/apps/mobile-app/components/items/details/NotesSection.tsx b/apps/mobile-app/components/items/details/NotesSection.tsx index d3ccdbbd8..f5207d353 100644 --- a/apps/mobile-app/components/items/details/NotesSection.tsx +++ b/apps/mobile-app/components/items/details/NotesSection.tsx @@ -107,7 +107,7 @@ export const NotesSection: React.FC = ({ item }) : React.Reac return ( - {t('credentials.notes')} + {t('items.notes')} {parts.map((part, index) => { if (part.type === 'url') { diff --git a/apps/mobile-app/components/items/details/TotpSection.tsx b/apps/mobile-app/components/items/details/TotpSection.tsx index 9db161d61..723928b78 100644 --- a/apps/mobile-app/components/items/details/TotpSection.tsx +++ b/apps/mobile-app/components/items/details/TotpSection.tsx @@ -205,7 +205,7 @@ export const TotpSection: React.FC = ({ item }) : React.ReactN - {t('credentials.totpCode')} + {t('items.totpCode')} {currentCodes[totpCode.Id]} diff --git a/apps/mobile-app/context/AuthContext.tsx b/apps/mobile-app/context/AuthContext.tsx index 1e8709257..121616902 100644 --- a/apps/mobile-app/context/AuthContext.tsx +++ b/apps/mobile-app/context/AuthContext.tsx @@ -322,10 +322,10 @@ export const AuthProvider: React.FC<{ } // Fallback to password - return 'credentials.password'; + return 'items.password'; } catch (error) { console.error('Failed to get auth method display key:', error); - return 'credentials.password'; + return 'items.password'; } }, [getEnabledAuthMethods, getBiometricDisplayName, isBiometricsEnabledOnDevice]); diff --git a/apps/mobile-app/i18n/locales/en.json b/apps/mobile-app/i18n/locales/en.json index ea3444dc8..7f4616f21 100644 --- a/apps/mobile-app/i18n/locales/en.json +++ b/apps/mobile-app/i18n/locales/en.json @@ -209,8 +209,6 @@ }, "passkeys": { "passkey": "Passkey", - "site": "Site", - "displayName": "Display Name", "helpText": "Passkeys are created on the website when prompted. They cannot be manually edited. To remove this passkey, you can delete it from this credential.", "passkeyMarkedForDeletion": "Passkey marked for deletion", "passkeyWillBeDeleted": "This passkey will be deleted when you save this credential." @@ -317,13 +315,6 @@ "pinDescription": "Use a custom PIN code to unlock your vault more quickly.", "pinEnabled": "PIN unlock enabled successfully", "pinDisabled": "PIN unlock has been disabled", - "setupPin": "Setup PIN", - "enterNewPin": "Enter New PIN", - "enterNewPinDescription": "Choose a PIN to unlock your vault", - "confirmPin": "Confirm PIN", - "confirmPinDescription": "Re-enter your PIN to confirm", - "pinMismatch": "PINs do not match. Please try again.", - "pinLocked": "PIN locked after too many failed attempts. Please use your master password.", "passwordHelp": "Re-enter your full master password to unlock your vault. This is always enabled as fallback option.", "keystoreIOS": "iOS Keychain", "keystoreAndroid": "Android Keystore" @@ -421,23 +412,16 @@ "qrScanner": { "title": "QR Code Scanner", "scanningMessage": "Scan AliasVault QR code", - "invalidQrCode": "Invalid QR Code", - "notAliasVaultQr": "This is not a valid AliasVault QR code. Please scan a QR code generated by AliasVault.", - "cameraPermissionTitle": "Camera Permission Required", - "cameraPermissionMessage": "Please allow camera access to scan QR codes.", "mobileLogin": { "confirmTitle": "Confirm Login Request", "confirmSubtitle": "Re-authenticate to approve login on another device.", "confirmMessage": "You are about to log in on a remote device with your account. This other device will have full access to your vault. Only proceed if you trust this device.", "successDescription": "The remote device has been successfully logged in.", "requestExpired": "This login request has expired. Please generate a new QR code.", - "authenticationFailed": "Authentication failed. Please try again.", - "noAuthMethodEnabled": "Biometric or PIN unlock needs to be enabled to unlock with mobile" } } }, "navigation": { - "credentials": "Credentials", "vault": "Vault", "emails": "Emails", "settings": "Settings" @@ -499,12 +483,11 @@ "deleteItem": "Delete Item", "itemDetails": "Item Details", "itemCreated": "Item Created", + "itemCreatedMessage": "Your new item has been added to your vault and is ready to use.", "emailPreview": "Email Preview", "untitled": "Untitled", "name": "Name", - "namePlaceholder": "e.g., Google, Amazon", "url": "URL", - "urlPlaceholder": "e.g., https://google.com", "service": "Service", "serviceName": "Service Name", "serviceUrl": "Service URL",