diff --git a/web/src/lib/components/shared-components/purchasing/purchase-activation-success.svelte b/web/src/lib/components/shared-components/purchasing/purchase-activation-success.svelte index df766aa3ae..2b8c678543 100644 --- a/web/src/lib/components/shared-components/purchasing/purchase-activation-success.svelte +++ b/web/src/lib/components/shared-components/purchasing/purchase-activation-success.svelte @@ -25,6 +25,6 @@
Supporter
+{$t('purchase_account_info')}
{:else if !$isPurchased && showBuyButton} diff --git a/web/src/lib/components/user-settings-page/user-purchase-settings.svelte b/web/src/lib/components/user-settings-page/user-purchase-settings.svelte index 8af38fa905..bf0fd3c874 100644 --- a/web/src/lib/components/user-settings-page/user-purchase-settings.svelte +++ b/web/src/lib/components/user-settings-page/user-purchase-settings.svelte @@ -63,10 +63,10 @@ const removeIndividualProductKey = async () => { try { const isConfirmed = await dialogController.show({ - title: 'Remove Product Key', - prompt: 'Are you sure you want to remove the product key?', - confirmText: 'Remove', - cancelText: 'Cancel', + title: $t('purchase_remove_product_key'), + prompt: $t('purchase_remove_product_key_prompt'), + confirmText: $t('remove'), + cancelText: $t('cancel'), }); if (!isConfirmed) { @@ -76,17 +76,17 @@ await deleteIndividualProductKey(); purchaseStore.setPurchaseStatus(false); } catch (error) { - handleError(error, 'Failed to remove product key'); + handleError(error, $t('errors.failed_to_remove_product_key')); } }; const removeServerProductKey = async () => { try { const isConfirmed = await dialogController.show({ - title: 'Remove License', - prompt: 'Are you sure you want to remove the Server product key?', - confirmText: 'Remove', - cancelText: 'Cancel', + title: $t('purchase_remove_server_product_key'), + prompt: $t('purchase_remove_server_product_key_prompt'), + confirmText: $t('remove'), + cancelText: $t('cancel'), }); if (!isConfirmed) { @@ -96,7 +96,7 @@ await deleteServerProductKey(); purchaseStore.setPurchaseStatus(false); } catch (error) { - handleError(error, 'Failed to remove product key'); + handleError(error, $t('errors.failed_to_remove_product_key')); } }; @@ -134,7 +134,7 @@ {#if $user.isAdmin && serverPurchaseInfo?.activatedAt}{$t('purchase_activated_time', { - values: { date: new Date(serverPurchaseInfo.activatedAt).toLocaleDateString() }, + values: { date: new Date(serverPurchaseInfo.activatedAt) }, })}
{:else} @@ -161,7 +161,7 @@ {#if $user.license?.activatedAt}{$t('purchase_activated_time', { - values: { date: new Date($user.license?.activatedAt).toLocaleDateString() }, + values: { date: new Date($user.license?.activatedAt) }, })}
{/if} diff --git a/web/src/lib/i18n/en.json b/web/src/lib/i18n/en.json index 0ac69f3fe4..ca67b36435 100644 --- a/web/src/lib/i18n/en.json +++ b/web/src/lib/i18n/en.json @@ -557,6 +557,7 @@ "error_adding_users_to_album": "Error adding users to album", "error_deleting_shared_user": "Error deleting shared user", "error_downloading": "Error downloading {filename}", + "error_hiding_buy_button": "Erorr hiding buy button", "error_removing_assets_from_album": "Error removing assets from album, check console for more details", "error_selecting_all_assets": "Error selecting all assets", "exclusion_pattern_already_exists": "This exclusion pattern already exists.", @@ -568,6 +569,7 @@ "failed_to_load_asset": "Failed to load asset", "failed_to_load_assets": "Failed to load assets", "failed_to_load_people": "Failed to load people", + "failed_to_remove_product_key": "Failed to remove product key", "failed_to_stack_assets": "Failed to stack assets", "failed_to_unstack_assets": "Failed to un-stack assets", "import_path_already_exists": "This import path already exists.", @@ -916,7 +918,7 @@ "public_share": "Public Share", "purchase_account_info": "Supporter", "purchase_activated_subtitle": "Thank you for supporting Immich and open-source software", - "purchase_activated_time": "Activated on {date}", + "purchase_activated_time": "Activated on {date, date}", "purchase_activated_title": "Your key has been successfully activated", "purchase_button_activate": "Activate", "purchase_button_buy": "Buy", @@ -938,6 +940,10 @@ "purchase_panel_title": "Support the project", "purchase_per_server": "Per server", "purchase_per_user": "Per user", + "purchase_remove_product_key": "Remove Product Key", + "purchase_remove_product_key_prompt": "Are you sure you want to remove the product key?", + "purchase_remove_server_product_key": "Remove Server product key", + "purchase_remove_server_product_key_prompt": "Are you sure you want to remove the Server product key?", "purchase_server_description_1": "For the whole server", "purchase_server_description_2": "Supporter status", "purchase_server_title": "Server",