feat(web): add more translations (#10700)
* feat(web): add more translations * formatting
This commit is contained in:
+2
-2
@@ -331,9 +331,9 @@
|
||||
return person;
|
||||
});
|
||||
|
||||
notificationController.show({ message: 'Date of birth saved successfully', type: NotificationType.Info });
|
||||
notificationController.show({ message: $t('date_of_birth_saved'), type: NotificationType.Info });
|
||||
} catch (error) {
|
||||
handleError(error, 'Unable to save date of birth');
|
||||
handleError(error, $t('errors.unable_to_save_date_of_birth'));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -26,9 +26,11 @@
|
||||
passwordRequired = false;
|
||||
isOwned = $user ? $user.id === sharedLink.userId : false;
|
||||
title = (sharedLink.album ? sharedLink.album.albumName : $t('public_share')) + ' - Immich';
|
||||
description = sharedLink.description || `${sharedLink.assets.length} shared photos & videos.`;
|
||||
description =
|
||||
sharedLink.description ||
|
||||
$t('shared_photos_and_videos_count', { values: { assetCount: sharedLink.assets.length } });
|
||||
} catch (error) {
|
||||
handleError(error, 'Failed to get shared link');
|
||||
handleError(error, $t('errors.unable_to_get_shared_link'));
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -57,7 +59,7 @@
|
||||
<div class="flex flex-col items-center justify-center mt-20">
|
||||
<div class="text-2xl font-bold text-immich-primary dark:text-immich-dark-primary">{$t('password_required')}</div>
|
||||
<div class="mt-4 text-lg text-immich-primary dark:text-immich-dark-primary">
|
||||
Please enter the password to view this page.
|
||||
{$t('sharing_enter_password')}
|
||||
</div>
|
||||
<div class="mt-4">
|
||||
<form novalidate autocomplete="off" on:submit|preventDefault={handlePasswordSubmit}>
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
try {
|
||||
await loadConfig();
|
||||
} catch (error) {
|
||||
handleError(error, 'Unable to connect to server');
|
||||
handleError(error, $t('errors.unable_to_connect_to_server'));
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -59,16 +59,8 @@
|
||||
return websocketEvents.on('on_user_delete', onDeleteSuccess);
|
||||
});
|
||||
|
||||
const deleteDateFormat: Intl.DateTimeFormatOptions = {
|
||||
month: 'long',
|
||||
day: 'numeric',
|
||||
year: 'numeric',
|
||||
};
|
||||
|
||||
const getDeleteDate = (deletedAt: string): string => {
|
||||
return DateTime.fromISO(deletedAt)
|
||||
.plus({ days: $serverConfig.userDeleteDelay })
|
||||
.toLocaleString(deleteDateFormat, { locale: $locale });
|
||||
const getDeleteDate = (deletedAt: string): Date => {
|
||||
return DateTime.fromISO(deletedAt).plus({ days: $serverConfig.userDeleteDelay }).toJSDate();
|
||||
};
|
||||
|
||||
const onUserCreated = async () => {
|
||||
@@ -245,7 +237,9 @@
|
||||
{#if immichUser.deletedAt && immichUser.status === UserStatus.Deleted}
|
||||
<CircleIconButton
|
||||
icon={mdiDeleteRestore}
|
||||
title="Restore user - scheduled removal on {getDeleteDate(immichUser.deletedAt)}"
|
||||
title={$t('admin.user_restore_scheduled_removal', {
|
||||
values: { date: getDeleteDate(immichUser.deletedAt) },
|
||||
})}
|
||||
color="primary"
|
||||
size="16"
|
||||
on:click={() => restoreUserHandler(immichUser)}
|
||||
|
||||
Reference in New Issue
Block a user