-
Account Settings
+
{t('accountSettings.title')}
- Change your account settings, type or update your password
+ {t('accountSettings.description')}
- Account Type : {getSubscriptionStatus()}
+ {t('accountSettings.accountType', { type: getSubscriptionStatus() })}
{getSubscriptionDetails()}
@@ -733,8 +737,7 @@ const Settings = () => {
queryClient.refetchQueries(['userProfile'])
showNotification({
type: 'success',
- message:
- 'Purchase successful! Please restart the app to access Plus features.',
+ message: t('accountSettings.purchase.success'),
})
// invalidate user profile to get new subscription status:
}
@@ -749,57 +752,49 @@ const Settings = () => {
// Store problem
showNotification({
type: 'error',
- message:
- 'Store connection issue. Please check your network and try again.',
+ message: t('accountSettings.purchase.storeConnection'),
})
} else if (error.code === '3') {
// Purchase not allowed
showNotification({
type: 'error',
- message:
- 'Purchases are not allowed on this device. Please check your device restrictions.',
+ message: t('accountSettings.purchase.notAllowed'),
})
} else if (error.code === '4') {
// Product not available
showNotification({
type: 'error',
- message:
- 'This subscription is not available. Please try again later.',
+ message: t('accountSettings.purchase.unavailable'),
})
} else if (error.code === '5') {
// Receipt already in use
showNotification({
type: 'error',
- message:
- 'This purchase has already been processed. If you believe this is an error, please contact support.',
+ message: t('accountSettings.purchase.alreadyProcessed'),
})
} else if (error.code === '6') {
// Missing receipt file
showNotification({
type: 'error',
- message:
- 'Purchase receipt missing. Please try purchasing again.',
+ message: t('accountSettings.purchase.receiptMissing'),
})
} else if (error.code === '7') {
// Network error
showNotification({
type: 'error',
- message:
- 'Network error. Please check your connection and try again.',
+ message: t('accountSettings.purchase.networkError'),
})
} else if (error.code === '8') {
// Invalid receipt
showNotification({
type: 'error',
- message:
- 'Invalid purchase receipt. Please contact support if this persists.',
+ message: t('accountSettings.purchase.invalidReceipt'),
})
} else if (error.code === '9') {
// Payment pending
showNotification({
type: 'warning',
- message:
- 'Payment is pending approval. You will receive access once approved.',
+ message: t('accountSettings.purchase.pending'),
})
} else {
// Generic error
@@ -808,7 +803,11 @@ const Settings = () => {
console.error('Error occurred in purchase flow')
showNotification({
type: 'error',
- message: `Purchase failed: ${error.message || 'Unknown error'}. Please try again or contact support.`,
+ message: t('accountSettings.purchase.failed', {
+ error:
+ error.message ||
+ t('accountSettings.purchase.unknownError'),
+ }),
})
}
}
@@ -817,7 +816,7 @@ const Settings = () => {
}
}}
>
- Upgrade
+ {t('accountSettings.upgrade')}
{userProfile?.subscription === 'active' && (
@@ -833,14 +832,14 @@ const Settings = () => {
setNativeCancelModal(true)
}}
>
- Cancel
+ {t('accountSettings.cancel')}
)}
{import.meta.env.VITE_IS_SELF_HOSTED === 'true' && (
- Password :
+ {t('accountSettings.password')}
{changePasswordModal ? (
{
if (resp.ok) {
showNotification({
type: 'success',
- message: 'Password changed successfully',
+ message: t('accountSettings.passwordChanged'),
})
} else {
showNotification({
type: 'error',
- message: 'Password change failed',
+ message: t('accountSettings.passwordChangeFailed'),
})
}
})
@@ -879,18 +878,17 @@ const Settings = () => {
- Danger Zone
+ {t('accountSettings.dangerZone')}
- Once you delete your account, there is no going back. Please be
- certain.
+ {t('accountSettings.dangerZoneDescription')}
@@ -899,32 +897,26 @@ const Settings = () => {