From c7a7bce426b7abae55613c526ca6dd43fe6b1bdc Mon Sep 17 00:00:00 2001 From: Elias Schneider Date: Fri, 9 Oct 2026 23:04:39 +0200 Subject: [PATCH] fix: prefix audit log event translation keys to separate them from UI strings --- frontend/messages/en.json | 22 +++++++++---------- .../src/lib/utils/audit-log-translator.ts | 20 ++++++++--------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/frontend/messages/en.json b/frontend/messages/en.json index e401bbf1..cf93d3ae 100644 --- a/frontend/messages/en.json +++ b/frontend/messages/en.json @@ -318,7 +318,7 @@ "certificate_url": "Certificate URL", "enabled": "Enabled", "disabled": "Disabled", - "client_type": "Type", + "client_type": "Client type", "client_type_standard": "Standard", "client_type_metadata_document": "Metadata Document", "cimd_client_managed_fields_title": "Some properties are read-only", @@ -359,13 +359,16 @@ "all_locations": "All Locations", "global_audit_log": "Global Audit Log", "see_all_recent_account_activities": "View the account activities of all users during the set retention period.", - "token_sign_in": "Token Sign In", - "client_authorization": "Client Authorization", - "new_client_authorization": "New Client Authorization", - "device_code_authorization": "Device Code Authorization", - "new_device_code_authorization": "New Device Code Authorization", - "passkey_added": "Passkey Added", - "passkey_removed": "Passkey Removed", + "audit_event_sign_in": "Sign in", + "audit_event_token_sign_in": "Token Sign In", + "audit_event_remote_sign_in": "Remote sign in", + "audit_event_client_authorization": "Client Authorization", + "audit_event_new_client_authorization": "New Client Authorization", + "audit_event_account_created": "Account Created", + "audit_event_device_code_authorization": "Device Code Authorization", + "audit_event_new_device_code_authorization": "New Device Code Authorization", + "audit_event_passkey_added": "Passkey Added", + "audit_event_passkey_removed": "Passkey Removed", "disable_animations": "Disable Animations", "turn_off_ui_animations": "Turn off animations throughout the UI.", "user_disabled": "Account Disabled", @@ -462,7 +465,6 @@ "setup_your_passkey": "Set up your passkey", "create_a_passkey_to_securely_access_your_account": "Create a passkey to securely access your account. This will be your primary way to sign in.", "skip_for_now": "Skip for now", - "account_created": "Account Created", "enable_user_signups": "Enable User Signups", "enable_user_signups_description": "Decide how users can sign up for new accounts in Pocket ID.", "user_signups_are_disabled": "User signups are currently disabled", @@ -629,7 +631,6 @@ "creating_device_login_request": "Creating sign-in request...", "device_login_qr_code": "Device login QR code", "waiting_for_approval": "Waiting for approval", - "remote_sign_in": "Remote sign in", "the_requesting_device_has_been_signed_in": "The requesting device has been signed in.", "the_sign_in_request_was_denied": "The sign-in request was denied.", "review_the_request_before_approving_it": "Review the requesting device before approving this sign in.", @@ -681,7 +682,6 @@ "icons_provided_by_selfhst": "Icons by {#link href=|https://selfh.st/icons|}selfh.st{/link}, licensed under {#link href=|https://creativecommons.org/licenses/by/4.0/|}CC BY 4.0{/link}.", "claims": "Claims", "set_custom_client_id": "Set custom client ID", - "client_type": "Client type", "confidential_client": "Confidential Client", "confidential_client_description": "Authenticates with a client secret. For apps with a backend that can keep the secret safe.", "public_client_type_description": "Has no client secret and uses PKCE instead. For single-page, mobile and desktop apps." diff --git a/frontend/src/lib/utils/audit-log-translator.ts b/frontend/src/lib/utils/audit-log-translator.ts index 81a3c5d8..ac9a6e1b 100644 --- a/frontend/src/lib/utils/audit-log-translator.ts +++ b/frontend/src/lib/utils/audit-log-translator.ts @@ -1,16 +1,16 @@ import { m } from '#lib/paraglide/messages.js'; export const eventTypes: Record = { - SIGN_IN: m.sign_in(), - TOKEN_SIGN_IN: m.token_sign_in(), - REMOTE_SIGN_IN: m.remote_sign_in(), - CLIENT_AUTHORIZATION: m.client_authorization(), - NEW_CLIENT_AUTHORIZATION: m.new_client_authorization(), - ACCOUNT_CREATED: m.account_created(), - DEVICE_CODE_AUTHORIZATION: m.device_code_authorization(), - NEW_DEVICE_CODE_AUTHORIZATION: m.new_device_code_authorization(), - PASSKEY_ADDED: m.passkey_added(), - PASSKEY_REMOVED: m.passkey_removed() + SIGN_IN: m.audit_event_sign_in(), + TOKEN_SIGN_IN: m.audit_event_token_sign_in(), + REMOTE_SIGN_IN: m.audit_event_remote_sign_in(), + CLIENT_AUTHORIZATION: m.audit_event_client_authorization(), + NEW_CLIENT_AUTHORIZATION: m.audit_event_new_client_authorization(), + ACCOUNT_CREATED: m.audit_event_account_created(), + DEVICE_CODE_AUTHORIZATION: m.audit_event_device_code_authorization(), + NEW_DEVICE_CODE_AUTHORIZATION: m.audit_event_new_device_code_authorization(), + PASSKEY_ADDED: m.audit_event_passkey_added(), + PASSKEY_REMOVED: m.audit_event_passkey_removed() }; /**