chore(web): more translations for user settings and admin pages ()

* chore(web): more translations for user settings and admin pages

* JobSettings translations

* feedback

* missed one

* feedback
This commit is contained in:
Michel Heusschen 2024-06-12 12:54:40 +02:00 committed by GitHub
parent 0e1311e3d3
commit 9e5c52b7b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 300 additions and 160 deletions
web/src/lib/components/user-settings-page

View file

@ -33,7 +33,7 @@
const data = await createApiKey({ apiKeyCreateDto: detail });
secret = data.secret;
} catch (error) {
handleError(error, 'Unable to create a new API Key');
handleError(error, $t('errors.unable_to_create_api_key'));
} finally {
await refreshKeys();
newKey = null;
@ -48,11 +48,11 @@
try {
await updateApiKey({ id: editKey.id, apiKeyUpdateDto: { name: detail.name } });
notificationController.show({
message: `Saved API Key`,
message: $t('saved_api_key'),
type: NotificationType.Info,
});
} catch (error) {
handleError(error, 'Unable to save API Key');
handleError(error, $t('errors.unable_to_save_api_key'));
} finally {
await refreshKeys();
editKey = null;
@ -62,7 +62,7 @@
const handleDelete = async (key: ApiKeyResponseDto) => {
const isConfirmed = await dialogController.show({
id: 'delete-api-key',
prompt: 'Are you sure you want to delete this API key?',
prompt: $t('delete_api_key_prompt'),
});
if (!isConfirmed) {
@ -72,11 +72,11 @@
try {
await deleteApiKey({ id: key.id });
notificationController.show({
message: `Removed API Key: ${key.name}`,
message: $t('removed_api_key', { values: { name: key.name } }),
type: NotificationType.Info,
});
} catch (error) {
handleError(error, 'Unable to remove API Key');
handleError(error, $t('errors.unable_to_remove_api_key'));
} finally {
await refreshKeys();
}