0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-07 00:50:23 -05:00

fix(web): buy immich translations (#11379)

This commit is contained in:
Michel Heusschen 2024-07-26 20:41:59 +02:00 committed by GitHub
parent 04340b3a62
commit ce15cf6065
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 22 additions and 16 deletions

View file

@ -25,6 +25,6 @@
</div> </div>
<div class="mt-6 w-full"> <div class="mt-6 w-full">
<Button fullwidth on:click={onDone}>OK</Button> <Button fullwidth on:click={onDone}>{$t('ok')}</Button>
</div> </div>
</div> </div>

View file

@ -58,7 +58,7 @@
showBuyButton = getButtonVisibility(); showBuyButton = getButtonVisibility();
showMessage = false; showMessage = false;
} catch (error) { } catch (error) {
handleError(error, 'Error hiding buy button'); handleError(error, $t('errors.error_hiding_buy_button'));
} }
}; };
@ -89,7 +89,7 @@
<div class="h-6 w-6"> <div class="h-6 w-6">
<ImmichLogo noText /> <ImmichLogo noText />
</div> </div>
<p class="dark:text-gray-100">Supporter</p> <p class="dark:text-gray-100">{$t('purchase_account_info')}</p>
</div> </div>
</button> </button>
{:else if !$isPurchased && showBuyButton} {:else if !$isPurchased && showBuyButton}

View file

@ -63,10 +63,10 @@
const removeIndividualProductKey = async () => { const removeIndividualProductKey = async () => {
try { try {
const isConfirmed = await dialogController.show({ const isConfirmed = await dialogController.show({
title: 'Remove Product Key', title: $t('purchase_remove_product_key'),
prompt: 'Are you sure you want to remove the product key?', prompt: $t('purchase_remove_product_key_prompt'),
confirmText: 'Remove', confirmText: $t('remove'),
cancelText: 'Cancel', cancelText: $t('cancel'),
}); });
if (!isConfirmed) { if (!isConfirmed) {
@ -76,17 +76,17 @@
await deleteIndividualProductKey(); await deleteIndividualProductKey();
purchaseStore.setPurchaseStatus(false); purchaseStore.setPurchaseStatus(false);
} catch (error) { } catch (error) {
handleError(error, 'Failed to remove product key'); handleError(error, $t('errors.failed_to_remove_product_key'));
} }
}; };
const removeServerProductKey = async () => { const removeServerProductKey = async () => {
try { try {
const isConfirmed = await dialogController.show({ const isConfirmed = await dialogController.show({
title: 'Remove License', title: $t('purchase_remove_server_product_key'),
prompt: 'Are you sure you want to remove the Server product key?', prompt: $t('purchase_remove_server_product_key_prompt'),
confirmText: 'Remove', confirmText: $t('remove'),
cancelText: 'Cancel', cancelText: $t('cancel'),
}); });
if (!isConfirmed) { if (!isConfirmed) {
@ -96,7 +96,7 @@
await deleteServerProductKey(); await deleteServerProductKey();
purchaseStore.setPurchaseStatus(false); purchaseStore.setPurchaseStatus(false);
} catch (error) { } 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} {#if $user.isAdmin && serverPurchaseInfo?.activatedAt}
<p class="dark:text-white text-sm mt-1 col-start-2"> <p class="dark:text-white text-sm mt-1 col-start-2">
{$t('purchase_activated_time', { {$t('purchase_activated_time', {
values: { date: new Date(serverPurchaseInfo.activatedAt).toLocaleDateString() }, values: { date: new Date(serverPurchaseInfo.activatedAt) },
})} })}
</p> </p>
{:else} {:else}
@ -161,7 +161,7 @@
{#if $user.license?.activatedAt} {#if $user.license?.activatedAt}
<p class="dark:text-white text-sm mt-1 col-start-2"> <p class="dark:text-white text-sm mt-1 col-start-2">
{$t('purchase_activated_time', { {$t('purchase_activated_time', {
values: { date: new Date($user.license?.activatedAt).toLocaleDateString() }, values: { date: new Date($user.license?.activatedAt) },
})} })}
</p> </p>
{/if} {/if}

View file

@ -557,6 +557,7 @@
"error_adding_users_to_album": "Error adding users to album", "error_adding_users_to_album": "Error adding users to album",
"error_deleting_shared_user": "Error deleting shared user", "error_deleting_shared_user": "Error deleting shared user",
"error_downloading": "Error downloading {filename}", "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_removing_assets_from_album": "Error removing assets from album, check console for more details",
"error_selecting_all_assets": "Error selecting all assets", "error_selecting_all_assets": "Error selecting all assets",
"exclusion_pattern_already_exists": "This exclusion pattern already exists.", "exclusion_pattern_already_exists": "This exclusion pattern already exists.",
@ -568,6 +569,7 @@
"failed_to_load_asset": "Failed to load asset", "failed_to_load_asset": "Failed to load asset",
"failed_to_load_assets": "Failed to load assets", "failed_to_load_assets": "Failed to load assets",
"failed_to_load_people": "Failed to load people", "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_stack_assets": "Failed to stack assets",
"failed_to_unstack_assets": "Failed to un-stack assets", "failed_to_unstack_assets": "Failed to un-stack assets",
"import_path_already_exists": "This import path already exists.", "import_path_already_exists": "This import path already exists.",
@ -916,7 +918,7 @@
"public_share": "Public Share", "public_share": "Public Share",
"purchase_account_info": "Supporter", "purchase_account_info": "Supporter",
"purchase_activated_subtitle": "Thank you for supporting Immich and open-source software", "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_activated_title": "Your key has been successfully activated",
"purchase_button_activate": "Activate", "purchase_button_activate": "Activate",
"purchase_button_buy": "Buy", "purchase_button_buy": "Buy",
@ -938,6 +940,10 @@
"purchase_panel_title": "Support the project", "purchase_panel_title": "Support the project",
"purchase_per_server": "Per server", "purchase_per_server": "Per server",
"purchase_per_user": "Per user", "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_1": "For the whole server",
"purchase_server_description_2": "Supporter status", "purchase_server_description_2": "Supporter status",
"purchase_server_title": "Server", "purchase_server_title": "Server",