Repository navigation
feat(i18n): apply translations across client-web & client-web-kit UI - #3095
Conversation
Move the framework-agnostic translation catalogs and key vocabulary out of client-web-kit into a new standalone @authup/i18n package (Layer 1, depends only on @authup/errors). The package ships pure data — the ilingo CatalogNode, namespace/key enums, the LOCALES registry, and the validup-issue-shaped authupError namespace keyed by @authup/errors codes — with zero Vue. client-web-kit's ilingo install now sources CATALOGS from the package instead of local en/de folders. Adds a locale-parity test asserting every namespace has exactly the expected keys with non-empty values in every authored locale, which closes the latent German ROBOTS gap the loosely-typed catalogs hid.
Resolve all hardcoded user-facing strings through @authup/i18n: app chrome/navigation/toasts (APP namespace), shared entity-form and page labels (DEFAULT namespace), and component-level hints/sentences (CLIENT namespace). Add the APP namespace catalogs (en/de) plus the shared DEFAULT/CLIENT keys the sweep introduced. Make useTranslationsForNamespace return a reactive() map of unwrapped strings (Record<key, string>) so a translation is accessed as `translations.key` everywhere — script, interpolation, and attribute bindings — without `.value`, removing the nested-ref unwrap footgun.
|
Note Reviews pausedUse the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe PR adds a new ChangesI18n package and shared translation catalogs
Client-web-kit translation runtime and shared components
Client-web app localization
Sequence Diagram(s)sequenceDiagram
participant Page
participant useTranslations
participant useTranslator
participant Toast
Page->>useTranslations: build labels for headings and navigation
Page->>useTranslator: translate delete/update success message
Page->>Toast: show localized success or failure text
Estimated code review effort🎯 5 (Critical) | ⏱️ ~90+ minutes Possibly related PRs
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
|
authup
@authup/client-web
@authup/server-core
@authup/access
@authup/client-web-kit
@authup/client-web-kit-theme
@authup/client-web-nuxt
@authup/client-web-theme
@authup/core-http-kit
@authup/core-kit
@authup/core-realtime-kit
@authup/errors
@authup/i18n
@authup/kit
@authup/server-adapter-kit
@authup/server-adapter-node
@authup/server-adapter-socket-io
@authup/server-adapter-web
@authup/server-kit
@authup/server-test-kit
@authup/specs
commit: |
…pages injectIlingo() must run synchronously during setup() before the first await; calling useTranslationsForNamespace/useTranslator after awaiting the entity fetch lost the active component instance and threw "An ilingo instance is not present in the vue context."
Replace the single DEFAULT namespace with four prefixed namespaces (authupEntity/authupField/authupAction/authupCommon) so a host app embedding client-web-kit cannot collide with its own catalogs. Entity nouns become ilingo plural nodes selected by `count` at the call site instead of separate `*S` keys. Adds a multi-namespace `useTranslations` helper, migrates all client-web and client-web-kit call sites, and drops the now-orphaned ATranslationDefault component.
|
@coderabbitai full review |
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Pull request overview
This PR introduces a new framework-agnostic @authup/i18n package containing Authup’s translation catalogs (en/de) and locale registry, migrates @authup/client-web-kit to consume those shared catalogs, and applies translations broadly across the apps/client-web UI (navigation, pages, toasts, and workflows). It also adjusts the kit’s translation helper API to return a reactive map of unwrapped strings to avoid .value inconsistencies in templates/attribute bindings.
Changes:
- Added
@authup/i18npackage with shared catalogs, locale registry, and a locale parity test. - Updated
client-web-kittranslator install + helpers (including an imperativeuseTranslator()), and removed legacy in-kit catalog sources. - Routed many previously hardcoded strings in
apps/client-webandclient-web-kitcomponents through the shared catalogs (including nav label translation support).
Reviewed changes
Copilot reviewed 109 out of 111 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Adds TS path alias for @authup/i18n. |
| packages/i18n/tsdown.config.ts | Adds tsdown build config for the new i18n package. |
| packages/i18n/tsconfig.json | Adds package-local TS config extending repo defaults. |
| packages/i18n/tsconfig.build.json | Adds build TS config with rootDir/outDir for declarations. |
| packages/i18n/test/unit/parity.spec.ts | Adds locale/namespace key parity + non-empty value tests. |
| packages/i18n/src/types.ts | Introduces shared i18n types (LocaleDescriptor, NamespaceTranslations). |
| packages/i18n/src/locales.ts | Defines supported locales, locale union types, and isLocale(). |
| packages/i18n/src/index.ts | Public barrel exports for the i18n package. |
| packages/i18n/src/error.ts | Adds validup module augmentation for typed Authup error data. |
| packages/i18n/src/constants.ts | Defines shared namespace + key enums (ENTITY/FIELD/ACTION/COMMON/APP/CLIENT/ERROR/VUECS). |
| packages/i18n/src/catalogs/index.ts | Assembles authored catalogs into an ilingo CatalogNode (CATALOGS). |
| packages/i18n/src/catalogs/en/vuecs.ts | Adds EN vuecs namespace translations. |
| packages/i18n/src/catalogs/en/index.ts | Exports EN namespace modules. |
| packages/i18n/src/catalogs/en/field.ts | Adds EN field label translations. |
| packages/i18n/src/catalogs/en/error.ts | Adds EN Authup error-code translations. |
| packages/i18n/src/catalogs/en/entity.ts | Adds EN pluralized entity noun translations. |
| packages/i18n/src/catalogs/en/common.ts | Adds EN common UI vocabulary translations. |
| packages/i18n/src/catalogs/en/client.ts | Adds EN client/workflow hint/sentence translations. |
| packages/i18n/src/catalogs/en/app.ts | Adds EN app-chrome/nav/toast translations. |
| packages/i18n/src/catalogs/en/action.ts | Adds EN action verb/button translations. |
| packages/i18n/src/catalogs/de/vuecs.ts | Adds DE vuecs namespace translations. |
| packages/i18n/src/catalogs/de/index.ts | Exports DE namespace modules. |
| packages/i18n/src/catalogs/de/field.ts | Adds DE field label translations. |
| packages/i18n/src/catalogs/de/error.ts | Adds DE Authup error-code translations. |
| packages/i18n/src/catalogs/de/entity.ts | Adds DE pluralized entity noun translations. |
| packages/i18n/src/catalogs/de/common.ts | Adds DE common UI vocabulary translations. |
| packages/i18n/src/catalogs/de/client.ts | Adds DE client/workflow hint/sentence translations. |
| packages/i18n/src/catalogs/de/app.ts | Adds DE app-chrome/nav/toast translations. |
| packages/i18n/src/catalogs/de/action.ts | Adds DE action verb/button translations. |
| packages/i18n/package.json | Defines new workspace package metadata and dependencies/peers. |
| packages/i18n/LICENSE | Adds package-local Apache-2.0 license text. |
| packages/client-web-kit/src/core/translator/singleton.ts | Adds imperative useTranslator() for event-time translation; wires ilingo injections. |
| packages/client-web-kit/src/core/translator/install.ts | Switches install to consume @authup/i18n CATALOGS via MemoryStore. |
| packages/client-web-kit/src/core/translator/helpers.ts | Replaces namespace-only batching with multi-namespace useTranslations() returning unwrapped reactive string map. |
| packages/client-web-kit/src/core/translator/en/vuecs.ts | Removed legacy EN vuecs translations (moved to @authup/i18n). |
| packages/client-web-kit/src/core/translator/en/default.ts | Removed legacy EN “default” translations (split into ACTION/COMMON/ENTITY/FIELD in @authup/i18n). |
| packages/client-web-kit/src/core/translator/en/client.ts | Removed legacy EN client translations (moved to @authup/i18n). |
| packages/client-web-kit/src/core/translator/de/vuecs.ts | Removed legacy DE vuecs translations (moved to @authup/i18n). |
| packages/client-web-kit/src/core/translator/de/default.ts | Removed legacy DE “default” translations (split into ACTION/COMMON/ENTITY/FIELD in @authup/i18n). |
| packages/client-web-kit/src/core/translator/de/client.ts | Removed legacy DE client translations (moved to @authup/i18n). |
| packages/client-web-kit/src/core/translator/constants.ts | Re-exports catalog enums/registry from @authup/i18n for compatibility. |
| packages/client-web-kit/src/core/form/defaults.ts | Updates submit button defaults to use ACTION keys (CREATE/UPDATE). |
| packages/client-web-kit/src/components/workflows/Login.vue | Replaces hardcoded login labels/messages with i18n keys and uses imperative translator for failure fallback. |
| packages/client-web-kit/src/components/workflows/authorize/AuthorizeScopes.vue | Translates scope grant intro sentence via CLIENT namespace. |
| packages/client-web-kit/src/components/workflows/authorize/AuthorizeForm.vue | Translates consent screen labels/buttons and informational sentences. |
| packages/client-web-kit/src/components/workflows/authorize/Authorize.vue | Translates suspense fallback “Loading...” message via COMMON namespace. |
| packages/client-web-kit/src/components/utility/translation/index.ts | Removes export of ATranslationDefault component. |
| packages/client-web-kit/src/components/utility/translation/ATranslationDefault.vue | Removed legacy “default namespace” translation wrapper component. |
| packages/client-web-kit/src/components/utility/title/ATitle.ts | Moves “Overview” title fallback to COMMON namespace. |
| packages/client-web-kit/src/components/utility/form-input-list/AFormInputList.vue | Translates “Add” button label via ACTION namespace (no default component). |
| packages/client-web-kit/src/components/utility/entity/AEntityDelete.ts | Uses ACTION.DELETE translation instead of legacy default key. |
| packages/client-web-kit/src/components/utility/ANameInput.vue | Uses ACTION.GENERATE via new useTranslations() return shape. |
| packages/client-web-kit/src/components/entities/user/AUsers.ts | Uses ENTITY.USER plural for collection heading. |
| packages/client-web-kit/src/components/entities/user/AUserForm.vue | Replaces legacy default keys with COMMON/FIELD keys via useTranslations(). |
| packages/client-web-kit/src/components/entities/scope/AScopes.ts | Uses ENTITY.SCOPE plural for collection heading. |
| packages/client-web-kit/src/components/entities/scope/AScopeForm.vue | Uses FIELD keys and ENTITY.REALM for form labels via useTranslations(). |
| packages/client-web-kit/src/components/entities/role/ARoles.ts | Uses ENTITY.ROLE plural for collection heading. |
| packages/client-web-kit/src/components/entities/role/ARoleForm.vue | Uses FIELD keys and ENTITY.REALM for form labels via useTranslations(). |
| packages/client-web-kit/src/components/entities/robot/ARobots.ts | Uses ENTITY.ROBOT plural for collection heading. |
| packages/client-web-kit/src/components/entities/robot/ARobotForm.vue | Uses ACTION/FIELD keys for robot form labels via useTranslations(). |
| packages/client-web-kit/src/components/entities/realm/ARealms.ts | Uses ENTITY.REALM plural for collection heading. |
| packages/client-web-kit/src/components/entities/realm/ARealmForm.vue | Uses FIELD keys and ENTITY.REALM for form labels via useTranslations(). |
| packages/client-web-kit/src/components/entities/policy/time/ATimePolicyForm.vue | Translates date/time policy form labels via FIELD namespace. |
| packages/client-web-kit/src/components/entities/policy/date/ADatePolicyForm.vue | Translates date policy form labels via FIELD namespace. |
| packages/client-web-kit/src/components/entities/policy/APolicyDetailNav.vue | Localizes tooltip/aria-label for “View policy details”. |
| packages/client-web-kit/src/components/entities/policy/APolicies.ts | Uses ENTITY.POLICY plural for collection heading. |
| packages/client-web-kit/src/components/entities/permission/APermissions.ts | Uses ENTITY.PERMISSION plural for collection heading. |
| packages/client-web-kit/src/components/entities/permission/APermissionForm.vue | Uses FIELD keys and ENTITY.REALM for form labels via useTranslations(). |
| packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviders.ts | Uses ENTITY.IDENTITY_PROVIDER plural for collection heading. |
| packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderBasicFields.vue | Uses FIELD keys for identity provider base fields via useTranslations(). |
| packages/client-web-kit/src/components/entities/identity-provider-role/AIdentityProviderRoleAssignment.vue | Uses FIELD.VALUE_IS_REGEX translation and new unwrapped helper shape. |
| packages/client-web-kit/src/components/entities/client/AClients.ts | Uses ENTITY.CLIENT plural for collection heading. |
| packages/client-web-kit/src/components/entities/client/AClientForm.vue | Uses FIELD/ACTION/ENTITY keys and updated helper return shapes for labels/hints. |
| packages/client-web-kit/src/components/entities/client-scope/AClientScopes.ts | Uses FIELD.CLIENT_SCOPES translation. |
| packages/client-web-kit/package.json | Adds @authup/i18n dependency/peer to the kit. |
| package-lock.json | Adds workspace link for @authup/i18n and updates dependency graph entries. |
| DEPENDENCY_GRAPH.md | Adds i18n node and edges in Mermaid dependency graph. |
| apps/client-web/pages/users/index.vue | Localizes page chrome, nav pills, and delete toast via APP/COMMON/ACTION/ENTITY translations. |
| apps/client-web/pages/users/[id]/index.vue | Localizes “General” and “Password” section titles. |
| apps/client-web/pages/users/[id].vue | Localizes nav items and update toast; localizes “Details” subtitle. |
| apps/client-web/pages/settings/index/security.vue | Localizes “Password” title and success toast. |
| apps/client-web/pages/settings/index/index.vue | Localizes “General” title and success toast. |
| apps/client-web/pages/settings/index.vue | Localizes settings page chrome and tab labels. |
| apps/client-web/pages/scopes/index.vue | Localizes page chrome, nav pills, and delete toast for scopes. |
| apps/client-web/pages/scopes/[id]/index.vue | Localizes “General” section title. |
| apps/client-web/pages/scopes/[id].vue | Localizes nav items and update toast; localizes “Details” subtitle. |
| apps/client-web/pages/roles/index.vue | Localizes page chrome, nav pills, and delete toast for roles. |
| apps/client-web/pages/roles/[id]/index.vue | Localizes “General” section title. |
| apps/client-web/pages/roles/[id].vue | Localizes nav items and update toast; localizes “Details” subtitle. |
| apps/client-web/pages/robots/index.vue | Localizes page chrome, nav pills, and delete toast for robots. |
| apps/client-web/pages/robots/[id]/index.vue | Localizes “General” section title. |
| apps/client-web/pages/robots/[id].vue | Localizes nav items and update toast; localizes “Details” subtitle. |
| apps/client-web/pages/realms/index.vue | Localizes page chrome, nav pills, and delete toast for realms. |
| apps/client-web/pages/realms/[id]/index.vue | Localizes “General” section title. |
| apps/client-web/pages/realms/[id].vue | Localizes nav items and update toast; localizes “Details” subtitle. |
| apps/client-web/pages/policies/index.vue | Localizes page chrome, nav pills, and delete toast for policies. |
| apps/client-web/pages/policies/[id].vue | Localizes nav items and update toast; localizes “Details” subtitle. |
| apps/client-web/pages/permissions/index.vue | Localizes page chrome, nav pills, and delete toast for permissions. |
| apps/client-web/pages/permissions/[id]/index.vue | Localizes “General” section title. |
| apps/client-web/pages/permissions/[id].vue | Localizes nav items and update toast; localizes “Details” subtitle. |
| apps/client-web/pages/identity-providers/index.vue | Localizes page chrome, nav pills, and delete toast for identity providers. |
| apps/client-web/pages/identity-providers/[id].vue | Localizes nav items and update toast; localizes “Details” subtitle. |
| apps/client-web/pages/clients/index.vue | Localizes page chrome, nav pills, and delete toast for clients. |
| apps/client-web/pages/clients/[id]/url.vue | Localizes URL generator page labels/hints. |
| apps/client-web/pages/clients/[id].vue | Localizes nav items and update toast; localizes “Details” subtitle. |
| apps/client-web/config/layout/types.ts | Adds meta.i18n descriptor types and a NavigationTranslate function type. |
| apps/client-web/config/layout/module.ts | Adds translation step to nav reduction pipeline and ensures children are always reduced. |
| apps/client-web/config/layout/contants.ts | Adds meta.i18n descriptors for top/side navigation items. |
| apps/client-web/components/sidebar.vue | Injects translator + watches locale changes; localizes session/docs chrome; passes translator into Navigation. |
| apps/client-web/components/header.vue | Localizes a11y labels and top-nav label. |
| .agents/structure.md | Documents the new @authup/i18n package and dependency layering updates. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderBasicFields.vue (1)
161-161:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winHardcoded label should be translated.
The label
"Enabled?"on line 161 remains hardcoded while the rest of the component uses translation keys. For consistency with the i18n migration, consider translating this label.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderBasicFields.vue` at line 161, The label-content="Enabled?" string is hardcoded; replace it with a translated key (e.g. use :label-content="$t('identityProvider.enabled')" or the existing i18n key used across this component) and add the corresponding entry to the locale files; update the AIdentityProviderBasicFields template to bind label-content to the $t call (ensuring i18n is available in the component) so the label is translated consistently with the rest of the component.packages/client-web-kit/src/components/entities/identity-provider-role/AIdentityProviderRoleAssignment.vue (1)
199-228:⚠️ Potential issue | 🟠 MajorLocalize remaining hardcoded form field labels in AIdentityProviderRoleAssignment.vue
In packages/client-web-kit/src/components/entities/identity-provider-role/AIdentityProviderRoleAssignment.vue (lines ~199-228), the
<VCFormGroup>labels are still hardcoded via<template#label>: Name, Value, and Regex. Only theVCFormSwitchuses a translated:label-content(translationsDefault.valueIsRegex), but the surrounding group label Regex remains unlocalized. Either localize these labels or explicitly justify leaving them English-only.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/client-web-kit/src/components/entities/identity-provider-role/AIdentityProviderRoleAssignment.vue` around lines 199 - 228, The form group labels "Name", "Value", and "Regex" in AIdentityProviderRoleAssignment.vue are hardcoded; replace them with localized strings (or the appropriate translation properties) to match the existing i18n pattern used for translationsDefault.valueIsRegex: update the <template `#label`> contents for the VCFormGroup instances that wrap v.fields.name, v.fields.value, and v.fields.value_is_regex to use the component's translation API (for example the existing translationsDefault object or $t(key) calls) so all three labels are localized consistently with VCFormSwitch's :label-content (reference VCFormGroup, VCFormInput, VCFormSwitch, v.fields.name, v.fields.value, v.fields.value_is_regex, translationsDefault.valueIsRegex).
🧹 Nitpick comments (15)
apps/client-web/pages/identity-providers/index.vue (1)
76-87: ⚡ Quick winConsider error handling for async translation.
The
handleDeletedfunction callsawait translate(...)without error handling. If translation fails, the toast won't display and the error may propagate unexpectedly.🛡️ Add defensive try-catch
const handleDeleted = async (e: IdentityProvider) => { if (toast) { + try { + const message = await translate({ + namespace: TranslatorTranslationNamespace.APP, + key: TranslatorTranslationAppKey.ENTITY_DELETED, + data: { entity: translationsDefault.identityProvider, name: e.name }, + }); toast.show({ variant: 'success', - body: await translate({ - namespace: TranslatorTranslationNamespace.APP, - key: TranslatorTranslationAppKey.ENTITY_DELETED, - data: { entity: translationsDefault.identityProvider, name: e.name }, - }), + body: message, }); + } catch (error) { + toast.show({ + variant: 'success', + body: `Entity ${e.name} deleted`, + }); + } } };🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/client-web/pages/identity-providers/index.vue` around lines 76 - 87, handleDeleted currently awaits translate(...) without any error handling so a translation failure prevents the toast from showing and may throw; wrap the translate call in a try-catch inside handleDeleted, log the error (e.g., console.error or existing logger), and ensure toast.show is still called with a sensible fallback message that uses translationsDefault.identityProvider and e.name if translate fails; reference the handleDeleted function, the translate call, toast.show invocation, and translationsDefault.identityProvider when making the change.apps/client-web/pages/clients/[id].vue (1)
130-143: ⚡ Quick winConsider error handling for async translation.
The
handleUpdatedfunction now callsawait translate(...)without error handling. If translation fails, the toast won't display and the error may propagate unexpectedly.🛡️ Add defensive try-catch
const handleUpdated = async (e: Client) => { if (toast) { + try { + const message = await translate({ + namespace: TranslatorTranslationNamespace.APP, + key: TranslatorTranslationAppKey.ENTITY_UPDATED, + data: { entity: translationsDefault.client }, + }); toast.show({ variant: 'success', - body: await translate({ - namespace: TranslatorTranslationNamespace.APP, - key: TranslatorTranslationAppKey.ENTITY_UPDATED, - data: { entity: translationsDefault.client }, - }), + body: message, }); + } catch (error) { + toast.show({ + variant: 'success', + body: 'Entity updated', + }); + } } extendObject(entity.value, e); };🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/client-web/pages/clients/`[id].vue around lines 130 - 143, handleUpdated currently awaits translate(...) without handling failures; wrap the translation call in a try-catch so a toast is still shown on error: call translate(...) inside try, capture the translatedBody, and in catch log the error (e.g., console.error) and set translatedBody to a safe fallback (for example a simple string built from translationsDefault.client or a static "Entity updated" message) before calling toast.show; ensure you still call extendObject(entity.value, e) after showing the toast so the state update logic in handleUpdated remains unchanged.apps/client-web/pages/clients/index.vue (1)
75-86: ⚡ Quick winConsider error handling for async translation.
The
handleDeletedfunction callsawait translate(...)without error handling. If translation fails, the toast won't display and the error may propagate unexpectedly.🛡️ Add defensive try-catch
const handleDeleted = async (e: Client) => { if (toast) { + try { + const message = await translate({ + namespace: TranslatorTranslationNamespace.APP, + key: TranslatorTranslationAppKey.ENTITY_DELETED, + data: { entity: translationsDefault.client, name: e.name }, + }); toast.show({ variant: 'success', - body: await translate({ - namespace: TranslatorTranslationNamespace.APP, - key: TranslatorTranslationAppKey.ENTITY_DELETED, - data: { entity: translationsDefault.client, name: e.name }, - }), + body: message, }); + } catch (error) { + toast.show({ + variant: 'success', + body: `Entity ${e.name} deleted`, + }); + } } };🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/client-web/pages/clients/index.vue` around lines 75 - 86, handleDeleted currently awaits translate(...) without error handling so a translation failure prevents showing the toast; wrap the await translate call in a try-catch inside handleDeleted (or compute the translatedBody in a try block), on failure set a safe fallback message (e.g., a templated string using translationsDefault.client and e.name) and still call toast.show with variant:'success' and the fallback body; reference the handleDeleted function, the translate(...) call, toast.show(...) and translationsDefault.client when making the change.apps/client-web/pages/identity-providers/[id].vue (1)
98-109: ⚡ Quick winConsider error handling for async translation.
The
handleUpdatedfunction callsawait translate(...)without error handling. If translation fails, the toast won't display and the error may propagate unexpectedly.🛡️ Add defensive try-catch
const handleUpdated = async (e: IdentityProvider) => { + try { + const message = await translate({ + namespace: TranslatorTranslationNamespace.APP, + key: TranslatorTranslationAppKey.ENTITY_UPDATED, + data: { entity: translationsDefault.identityProvider }, + }); toast.show({ variant: 'success', - body: await translate({ - namespace: TranslatorTranslationNamespace.APP, - key: TranslatorTranslationAppKey.ENTITY_UPDATED, - data: { entity: translationsDefault.identityProvider }, - }), + body: message, }); + } catch (error) { + toast.show({ + variant: 'success', + body: 'Entity updated', + }); + } extendObject(entity.value, e); };🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/client-web/pages/identity-providers/`[id].vue around lines 98 - 109, handleUpdated currently awaits translate(...) without catching failures, so a translation error can block showing the success toast; wrap the await translate call in a try-catch inside handleUpdated (catching errors from translate) and fall back to a default message or the untranslated key before calling toast.show, then still call extendObject(entity.value, e); reference the handleUpdated function, the translate(...) call, the toast.show invocation, and extendObject to locate where to add the try-catch and fallback text.apps/client-web/pages/roles/index.vue (1)
73-84: ⚡ Quick winConsider error handling for translation failures.
The async
handleDeletedawaitstranslate()without a try-catch block. If translation fails, the toast won't show and the error will bubble up. While unlikely, wrapping the translate call in try-catch would make the handler more resilient.🛡️ Suggested error handling pattern
const handleDeleted = async (e: Role) => { if (toast) { + try { toast.show({ variant: 'success', body: await translate({ namespace: TranslatorTranslationNamespace.APP, key: TranslatorTranslationAppKey.ENTITY_DELETED, data: { entity: translationsDefault.role, name: e.name }, }), }); + } catch (error) { + toast.show({ + variant: 'success', + body: `${translationsDefault.role} "${e.name}" deleted`, + }); + } } };🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/client-web/pages/roles/index.vue` around lines 73 - 84, The handleDeleted handler currently awaits translate(...) directly which can throw and prevent the toast from showing; wrap the translate call in a try-catch inside handleDeleted so that on translation errors you fall back to a safe default message (e.g., a simple `${translationsDefault.role} deleted` or a static i18n key) and still call toast.show; reference the handleDeleted function, the translate(...) invocation, the toast.show call, and TranslatorTranslationNamespace/TranslatorTranslationAppKey to locate and implement the try-catch and fallback behavior.packages/client-web-kit/src/components/entities/policy/date/ADatePolicyForm.vue (1)
37-48: 💤 Low valueOptional: Remove trailing spaces in object properties.
Lines 39, 40, 41, 45, and 46 have trailing spaces after commas, consistent with the pattern seen in other files in this PR.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/client-web-kit/src/components/entities/policy/date/ADatePolicyForm.vue` around lines 37 - 48, Remove the trailing spaces after commas in the object properties passed to useTranslations in translationsDefault: edit the objects using TranslatorTranslationNamespace and TranslatorTranslationFieldKey (the entries with as: 'start' and as: 'end') so there are no extra spaces after the commas in those property lines; keep the same keys and structure but trim the whitespace to match the project's formatting conventions.packages/client-web-kit/src/components/entities/permission/APermissionForm.vue (3)
46-57: ⚡ Quick winConsider internationalizing decision strategy hints.
The
decisionStrategyHintfunction returns hardcoded English strings. For consistency with the i18n migration in this PR, these hints should also be sourced from translation catalogs.💡 Suggested approach
Add decision strategy hint keys to the appropriate translation namespace (likely
CLIENTorCOMMON) and useuseTranslationorcomputedtranslation lookups instead of the hardcoded switch statement.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/client-web-kit/src/components/entities/permission/APermissionForm.vue` around lines 46 - 57, The decisionStrategyHint function returns hardcoded English strings; change it to use the app i18n so hints come from translation catalogs: import and call the translation composable (useTranslation or useI18n) inside the component and replace the switch-return strings in decisionStrategyHint (referencing DecisionStrategy.AFFIRMATIVE, CONSENSUS, UNANIMOUS and the default case) with translation keys (e.g. CLIENT.permission.decisionStrategy.* or COMMON.permission.decisionStrategy.*) looked up via t('...') or a computed wrapper so the hints are localized. Ensure the translation keys are added to the proper namespace and the function uses the translator instance rather than hardcoded text.
159-188: 💤 Low valueOptional: Remove trailing spaces in object properties.
Lines 162-185 have trailing spaces after commas throughout the
useTranslationscall, similar to the settings pages.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/client-web-kit/src/components/entities/permission/APermissionForm.vue` around lines 159 - 188, Trailing spaces exist after commas in the object literals passed to useTranslations (the array entries using TranslatorTranslationNamespace/Field/Entity and keys like NAME, DISPLAY_NAME, DESCRIPTION, DECISION_STRATEGY, REALM). Edit the useTranslations call and remove the extra trailing spaces after commas in each object property (e.g., "namespace: ..., "key: ..., "as: ..." → ensure no space before the comma) so the object formatting matches the project's style used elsewhere (settings pages) and run a quick lint/format to confirm.
265-270: ⚡ Quick winConsider internationalizing the select default option text.
Line 269 contains a hardcoded English string
"-- None (default: unanimous) --". For completeness, this should also be translated.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/client-web-kit/src/components/entities/permission/APermissionForm.vue` around lines 265 - 270, The select's default option text is hardcoded; update the VCFormSelect invocation (the prop option-default-value currently set to "-- None (default: unanimous) --") to use the project's i18n translation call instead (e.g., the component or template translation helper such as $t/ t / i18n.t as used elsewhere) so the default label is translated; keep the same semantic text (none/default unanimous) but load it from the translation key (create a new key if needed) and leave the other props (v-model v.fields.decision_strategy.$model.value and :options="decisionStrategyOptions") unchanged.apps/client-web/pages/settings/index/index.vue (1)
32-38: 💤 Low valueOptional: Remove trailing spaces in object properties.
Lines 34, 35, and 36 have trailing spaces after the commas. While this doesn't break functionality, it's inconsistent with typical JavaScript/TypeScript style and may trigger linting rules.
✨ Suggested cleanup
const translationsDefault = useTranslations([ { - namespace: TranslatorTranslationNamespace.COMMON, - key: TranslatorTranslationCommonKey.GENERAL, - as: 'general', + namespace: TranslatorTranslationNamespace.COMMON, + key: TranslatorTranslationCommonKey.GENERAL, + as: 'general', }, ]);🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/client-web/pages/settings/index/index.vue` around lines 32 - 38, The object passed to useTranslations (assigned to translationsDefault) contains trailing spaces after commas in properties referencing TranslatorTranslationNamespace.COMMON and TranslatorTranslationCommonKey.GENERAL; remove the trailing spaces after the commas so the object properties are formatted consistently (e.g., between namespace, key, and as entries) to satisfy style/lint rules.apps/client-web/pages/settings/index/security.vue (1)
26-32: 💤 Low valueOptional: Remove trailing spaces in object properties.
Lines 29 and 30 have trailing spaces after the commas, similar to the previous file.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/client-web/pages/settings/index/security.vue` around lines 26 - 32, Remove the trailing spaces after commas in the object passed to useTranslations to match code style: edit the object used to initialize translationsDefault (the call to useTranslations with namespace TranslatorTranslationNamespace.FIELD and key TranslatorTranslationFieldKey.PASSWORD as 'password') and trim the extra spaces after the commas in those property lines so the properties have no trailing spaces.packages/client-web-kit/src/components/utility/form-input-list/AFormInputList.vue (1)
132-132: 💤 Low valueConsider translating remaining hardcoded slot defaults.
The PR objectives state the goal is to eliminate hardcoded strings. Lines 132 (
"Names") and 150 ("The form list has no items yet") remain hardcoded in slot fallback content. While these are overridable by consumers, translating them would improve consistency and complete the i18n coverage.Also applies to: 150-150
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/client-web-kit/src/components/utility/form-input-list/AFormInputList.vue` at line 132, Replace the two hardcoded slot fallback strings in AFormInputList.vue ("Names" and "The form list has no items yet") with i18n lookups (e.g., use the component's $t or useI18n() and call t('formInputList.names') and t('formInputList.emptyMessage')) so the slot defaults are translatable; add corresponding translation keys to the locale files (formInputList.names and formInputList.emptyMessage) and keep the slot usage intact so consumers can still override them.packages/client-web-kit/src/components/workflows/Login.vue (1)
162-167: 💤 Low valueConsider adding a fallback for translation failures in the error handler.
The error handler uses
await translate(...)to fetch a localized error message. If the translation call itself fails (e.g., missing key, network issue), theemit('failed', ...)call may receive an undefined value or throw. Wrapping the translation call with a try-catch and providing a hardcoded fallback string would improve robustness:let message: string; if (e instanceof Error) { message = e.message; } else { try { message = await translate({ namespace: TranslatorTranslationNamespace.CLIENT, key: TranslatorTranslationClientKey.LOGIN_FAILED, }); } catch { message = 'Login failed'; // Hardcoded fallback } } emit('failed', message);🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/client-web-kit/src/components/workflows/Login.vue` around lines 162 - 167, The error handler may throw or emit undefined if the async translate(...) call fails; update the logic around emit('failed', ...) to check if e is an Error and otherwise call translate(...) inside a try-catch, assigning a hardcoded fallback string (e.g., 'Login failed') when translation rejects or returns non-string; ensure you reference the translate call with TranslatorTranslationNamespace.CLIENT and TranslatorTranslationClientKey.LOGIN_FAILED and emit the resolved fallback message via emit('failed', message).packages/client-web-kit/src/core/translator/singleton.ts (1)
42-47: 💤 Low valueMinor: Nullish coalescing won't trigger on empty string.
Line 46 uses
?? ctx.keyto fallback when the translation is missing. This triggers onnull/undefinedbut not on empty string"". If a translation is explicitly set to an empty string, the fallback won't activate.This is likely intentional (empty string is a valid translation value), but worth noting for future maintainers.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/client-web-kit/src/core/translator/singleton.ts` around lines 42 - 47, The current useTranslator function uses nullish coalescing (??) so an explicit empty string from ilingo.get({ ...ctx, locale: locale.value }) won't fall back to ctx.key; change the fallback logic in useTranslator to treat empty string as missing by checking the ilingo.get result (from ilingo.get) for null, undefined, or empty string and returning ctx.key in those cases, otherwise return the result.packages/i18n/src/catalogs/en/app.ts (1)
26-26: 💤 Low valueConsider capitalizing "url" for consistency.
The hint text contains "authorize url" with lowercase "url", while other keys in this catalog use uppercase "URL" (e.g.,
REDIRECT_URL,GENERATED_URL). Consider changing to "authorize URL" for consistency.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/i18n/src/catalogs/en/app.ts` at line 26, Update the string value for TranslatorTranslationAppKey.URL_GENERATOR_HINT to use uppercase "URL" for consistency with other keys; locate the entry labeled URL_GENERATOR_HINT and change "authorize url" to "authorize URL" in its hint text.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/client-web/config/layout/module.ts`:
- Around line 110-117: The code is mutating the original navigation item (an
exported constant like LayoutSideDefaultNavigation) when translating, so create
a shallow copy of the item before any mutation in the reducer (the method that
processes items, e.g., reduce or reduceItem) and operate on that copy; ensure
you also assign a new array for children (e.g., map/recurse into copies) so
translations set item.name on the copy only and the original constant remains
unchanged, preserving correct behavior on locale switch.
In `@packages/i18n/test/unit/parity.spec.ts`:
- Around line 73-81: Add an explicit assertion that the German locale is
authored: update the test in parity.spec.ts (the "locale parity" suite
referencing authoredLocales and DEFAULT_LOCALE) to also expect authoredLocales
to contain 'de' so the test enforces the comment in locales.ts that "en and de
are authored fully" and will fail if 'de' is omitted from the CATALOGS.
---
Outside diff comments:
In
`@packages/client-web-kit/src/components/entities/identity-provider-role/AIdentityProviderRoleAssignment.vue`:
- Around line 199-228: The form group labels "Name", "Value", and "Regex" in
AIdentityProviderRoleAssignment.vue are hardcoded; replace them with localized
strings (or the appropriate translation properties) to match the existing i18n
pattern used for translationsDefault.valueIsRegex: update the <template `#label`>
contents for the VCFormGroup instances that wrap v.fields.name, v.fields.value,
and v.fields.value_is_regex to use the component's translation API (for example
the existing translationsDefault object or $t(key) calls) so all three labels
are localized consistently with VCFormSwitch's :label-content (reference
VCFormGroup, VCFormInput, VCFormSwitch, v.fields.name, v.fields.value,
v.fields.value_is_regex, translationsDefault.valueIsRegex).
In
`@packages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderBasicFields.vue`:
- Line 161: The label-content="Enabled?" string is hardcoded; replace it with a
translated key (e.g. use :label-content="$t('identityProvider.enabled')" or the
existing i18n key used across this component) and add the corresponding entry to
the locale files; update the AIdentityProviderBasicFields template to bind
label-content to the $t call (ensuring i18n is available in the component) so
the label is translated consistently with the rest of the component.
---
Nitpick comments:
In `@apps/client-web/pages/clients/`[id].vue:
- Around line 130-143: handleUpdated currently awaits translate(...) without
handling failures; wrap the translation call in a try-catch so a toast is still
shown on error: call translate(...) inside try, capture the translatedBody, and
in catch log the error (e.g., console.error) and set translatedBody to a safe
fallback (for example a simple string built from translationsDefault.client or a
static "Entity updated" message) before calling toast.show; ensure you still
call extendObject(entity.value, e) after showing the toast so the state update
logic in handleUpdated remains unchanged.
In `@apps/client-web/pages/clients/index.vue`:
- Around line 75-86: handleDeleted currently awaits translate(...) without error
handling so a translation failure prevents showing the toast; wrap the await
translate call in a try-catch inside handleDeleted (or compute the
translatedBody in a try block), on failure set a safe fallback message (e.g., a
templated string using translationsDefault.client and e.name) and still call
toast.show with variant:'success' and the fallback body; reference the
handleDeleted function, the translate(...) call, toast.show(...) and
translationsDefault.client when making the change.
In `@apps/client-web/pages/identity-providers/`[id].vue:
- Around line 98-109: handleUpdated currently awaits translate(...) without
catching failures, so a translation error can block showing the success toast;
wrap the await translate call in a try-catch inside handleUpdated (catching
errors from translate) and fall back to a default message or the untranslated
key before calling toast.show, then still call extendObject(entity.value, e);
reference the handleUpdated function, the translate(...) call, the toast.show
invocation, and extendObject to locate where to add the try-catch and fallback
text.
In `@apps/client-web/pages/identity-providers/index.vue`:
- Around line 76-87: handleDeleted currently awaits translate(...) without any
error handling so a translation failure prevents the toast from showing and may
throw; wrap the translate call in a try-catch inside handleDeleted, log the
error (e.g., console.error or existing logger), and ensure toast.show is still
called with a sensible fallback message that uses
translationsDefault.identityProvider and e.name if translate fails; reference
the handleDeleted function, the translate call, toast.show invocation, and
translationsDefault.identityProvider when making the change.
In `@apps/client-web/pages/roles/index.vue`:
- Around line 73-84: The handleDeleted handler currently awaits translate(...)
directly which can throw and prevent the toast from showing; wrap the translate
call in a try-catch inside handleDeleted so that on translation errors you fall
back to a safe default message (e.g., a simple `${translationsDefault.role}
deleted` or a static i18n key) and still call toast.show; reference the
handleDeleted function, the translate(...) invocation, the toast.show call, and
TranslatorTranslationNamespace/TranslatorTranslationAppKey to locate and
implement the try-catch and fallback behavior.
In `@apps/client-web/pages/settings/index/index.vue`:
- Around line 32-38: The object passed to useTranslations (assigned to
translationsDefault) contains trailing spaces after commas in properties
referencing TranslatorTranslationNamespace.COMMON and
TranslatorTranslationCommonKey.GENERAL; remove the trailing spaces after the
commas so the object properties are formatted consistently (e.g., between
namespace, key, and as entries) to satisfy style/lint rules.
In `@apps/client-web/pages/settings/index/security.vue`:
- Around line 26-32: Remove the trailing spaces after commas in the object
passed to useTranslations to match code style: edit the object used to
initialize translationsDefault (the call to useTranslations with namespace
TranslatorTranslationNamespace.FIELD and key
TranslatorTranslationFieldKey.PASSWORD as 'password') and trim the extra spaces
after the commas in those property lines so the properties have no trailing
spaces.
In
`@packages/client-web-kit/src/components/entities/permission/APermissionForm.vue`:
- Around line 46-57: The decisionStrategyHint function returns hardcoded English
strings; change it to use the app i18n so hints come from translation catalogs:
import and call the translation composable (useTranslation or useI18n) inside
the component and replace the switch-return strings in decisionStrategyHint
(referencing DecisionStrategy.AFFIRMATIVE, CONSENSUS, UNANIMOUS and the default
case) with translation keys (e.g. CLIENT.permission.decisionStrategy.* or
COMMON.permission.decisionStrategy.*) looked up via t('...') or a computed
wrapper so the hints are localized. Ensure the translation keys are added to the
proper namespace and the function uses the translator instance rather than
hardcoded text.
- Around line 159-188: Trailing spaces exist after commas in the object literals
passed to useTranslations (the array entries using
TranslatorTranslationNamespace/Field/Entity and keys like NAME, DISPLAY_NAME,
DESCRIPTION, DECISION_STRATEGY, REALM). Edit the useTranslations call and remove
the extra trailing spaces after commas in each object property (e.g.,
"namespace: ..., "key: ..., "as: ..." → ensure no space before the comma) so the
object formatting matches the project's style used elsewhere (settings pages)
and run a quick lint/format to confirm.
- Around line 265-270: The select's default option text is hardcoded; update the
VCFormSelect invocation (the prop option-default-value currently set to "-- None
(default: unanimous) --") to use the project's i18n translation call instead
(e.g., the component or template translation helper such as $t/ t / i18n.t as
used elsewhere) so the default label is translated; keep the same semantic text
(none/default unanimous) but load it from the translation key (create a new key
if needed) and leave the other props (v-model
v.fields.decision_strategy.$model.value and :options="decisionStrategyOptions")
unchanged.
In
`@packages/client-web-kit/src/components/entities/policy/date/ADatePolicyForm.vue`:
- Around line 37-48: Remove the trailing spaces after commas in the object
properties passed to useTranslations in translationsDefault: edit the objects
using TranslatorTranslationNamespace and TranslatorTranslationFieldKey (the
entries with as: 'start' and as: 'end') so there are no extra spaces after the
commas in those property lines; keep the same keys and structure but trim the
whitespace to match the project's formatting conventions.
In
`@packages/client-web-kit/src/components/utility/form-input-list/AFormInputList.vue`:
- Line 132: Replace the two hardcoded slot fallback strings in
AFormInputList.vue ("Names" and "The form list has no items yet") with i18n
lookups (e.g., use the component's $t or useI18n() and call
t('formInputList.names') and t('formInputList.emptyMessage')) so the slot
defaults are translatable; add corresponding translation keys to the locale
files (formInputList.names and formInputList.emptyMessage) and keep the slot
usage intact so consumers can still override them.
In `@packages/client-web-kit/src/components/workflows/Login.vue`:
- Around line 162-167: The error handler may throw or emit undefined if the
async translate(...) call fails; update the logic around emit('failed', ...) to
check if e is an Error and otherwise call translate(...) inside a try-catch,
assigning a hardcoded fallback string (e.g., 'Login failed') when translation
rejects or returns non-string; ensure you reference the translate call with
TranslatorTranslationNamespace.CLIENT and
TranslatorTranslationClientKey.LOGIN_FAILED and emit the resolved fallback
message via emit('failed', message).
In `@packages/client-web-kit/src/core/translator/singleton.ts`:
- Around line 42-47: The current useTranslator function uses nullish coalescing
(??) so an explicit empty string from ilingo.get({ ...ctx, locale: locale.value
}) won't fall back to ctx.key; change the fallback logic in useTranslator to
treat empty string as missing by checking the ilingo.get result (from
ilingo.get) for null, undefined, or empty string and returning ctx.key in those
cases, otherwise return the result.
In `@packages/i18n/src/catalogs/en/app.ts`:
- Line 26: Update the string value for
TranslatorTranslationAppKey.URL_GENERATOR_HINT to use uppercase "URL" for
consistency with other keys; locate the entry labeled URL_GENERATOR_HINT and
change "authorize url" to "authorize URL" in its hint text.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 045f8f27-5e2c-48c8-a48a-9cda8fb3b7c9
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (110)
.agents/structure.mdDEPENDENCY_GRAPH.mdapps/client-web/components/header.vueapps/client-web/components/sidebar.vueapps/client-web/config/layout/contants.tsapps/client-web/config/layout/module.tsapps/client-web/config/layout/types.tsapps/client-web/pages/clients/[id].vueapps/client-web/pages/clients/[id]/url.vueapps/client-web/pages/clients/index.vueapps/client-web/pages/identity-providers/[id].vueapps/client-web/pages/identity-providers/index.vueapps/client-web/pages/permissions/[id].vueapps/client-web/pages/permissions/[id]/index.vueapps/client-web/pages/permissions/index.vueapps/client-web/pages/policies/[id].vueapps/client-web/pages/policies/index.vueapps/client-web/pages/realms/[id].vueapps/client-web/pages/realms/[id]/index.vueapps/client-web/pages/realms/index.vueapps/client-web/pages/robots/[id].vueapps/client-web/pages/robots/[id]/index.vueapps/client-web/pages/robots/index.vueapps/client-web/pages/roles/[id].vueapps/client-web/pages/roles/[id]/index.vueapps/client-web/pages/roles/index.vueapps/client-web/pages/scopes/[id].vueapps/client-web/pages/scopes/[id]/index.vueapps/client-web/pages/scopes/index.vueapps/client-web/pages/settings/index.vueapps/client-web/pages/settings/index/index.vueapps/client-web/pages/settings/index/security.vueapps/client-web/pages/users/[id].vueapps/client-web/pages/users/[id]/index.vueapps/client-web/pages/users/index.vuepackages/client-web-kit/package.jsonpackages/client-web-kit/src/components/entities/client-scope/AClientScopes.tspackages/client-web-kit/src/components/entities/client/AClientForm.vuepackages/client-web-kit/src/components/entities/client/AClients.tspackages/client-web-kit/src/components/entities/identity-provider-role/AIdentityProviderRoleAssignment.vuepackages/client-web-kit/src/components/entities/identity-provider/AIdentityProviderBasicFields.vuepackages/client-web-kit/src/components/entities/identity-provider/AIdentityProviders.tspackages/client-web-kit/src/components/entities/permission/APermissionForm.vuepackages/client-web-kit/src/components/entities/permission/APermissions.tspackages/client-web-kit/src/components/entities/policy/APolicies.tspackages/client-web-kit/src/components/entities/policy/APolicyDetailNav.vuepackages/client-web-kit/src/components/entities/policy/date/ADatePolicyForm.vuepackages/client-web-kit/src/components/entities/policy/time/ATimePolicyForm.vuepackages/client-web-kit/src/components/entities/realm/ARealmForm.vuepackages/client-web-kit/src/components/entities/realm/ARealms.tspackages/client-web-kit/src/components/entities/robot/ARobotForm.vuepackages/client-web-kit/src/components/entities/robot/ARobots.tspackages/client-web-kit/src/components/entities/role/ARoleForm.vuepackages/client-web-kit/src/components/entities/role/ARoles.tspackages/client-web-kit/src/components/entities/scope/AScopeForm.vuepackages/client-web-kit/src/components/entities/scope/AScopes.tspackages/client-web-kit/src/components/entities/user/AUserForm.vuepackages/client-web-kit/src/components/entities/user/AUsers.tspackages/client-web-kit/src/components/utility/ANameInput.vuepackages/client-web-kit/src/components/utility/entity/AEntityDelete.tspackages/client-web-kit/src/components/utility/form-input-list/AFormInputList.vuepackages/client-web-kit/src/components/utility/title/ATitle.tspackages/client-web-kit/src/components/utility/translation/ATranslationDefault.vuepackages/client-web-kit/src/components/utility/translation/index.tspackages/client-web-kit/src/components/workflows/Login.vuepackages/client-web-kit/src/components/workflows/authorize/Authorize.vuepackages/client-web-kit/src/components/workflows/authorize/AuthorizeForm.vuepackages/client-web-kit/src/components/workflows/authorize/AuthorizeScopes.vuepackages/client-web-kit/src/core/form/defaults.tspackages/client-web-kit/src/core/translator/constants.tspackages/client-web-kit/src/core/translator/de/client.tspackages/client-web-kit/src/core/translator/de/default.tspackages/client-web-kit/src/core/translator/de/vuecs.tspackages/client-web-kit/src/core/translator/en/client.tspackages/client-web-kit/src/core/translator/en/default.tspackages/client-web-kit/src/core/translator/en/vuecs.tspackages/client-web-kit/src/core/translator/helpers.tspackages/client-web-kit/src/core/translator/install.tspackages/client-web-kit/src/core/translator/singleton.tspackages/i18n/LICENSEpackages/i18n/package.jsonpackages/i18n/src/catalogs/de/action.tspackages/i18n/src/catalogs/de/app.tspackages/i18n/src/catalogs/de/client.tspackages/i18n/src/catalogs/de/common.tspackages/i18n/src/catalogs/de/entity.tspackages/i18n/src/catalogs/de/error.tspackages/i18n/src/catalogs/de/field.tspackages/i18n/src/catalogs/de/index.tspackages/i18n/src/catalogs/de/vuecs.tspackages/i18n/src/catalogs/en/action.tspackages/i18n/src/catalogs/en/app.tspackages/i18n/src/catalogs/en/client.tspackages/i18n/src/catalogs/en/common.tspackages/i18n/src/catalogs/en/entity.tspackages/i18n/src/catalogs/en/error.tspackages/i18n/src/catalogs/en/field.tspackages/i18n/src/catalogs/en/index.tspackages/i18n/src/catalogs/en/vuecs.tspackages/i18n/src/catalogs/index.tspackages/i18n/src/constants.tspackages/i18n/src/error.tspackages/i18n/src/index.tspackages/i18n/src/locales.tspackages/i18n/src/types.tspackages/i18n/test/unit/parity.spec.tspackages/i18n/tsconfig.build.jsonpackages/i18n/tsconfig.jsonpackages/i18n/tsdown.config.tstsconfig.json
💤 Files with no reviewable changes (8)
- packages/client-web-kit/src/core/translator/en/default.ts
- packages/client-web-kit/src/core/translator/en/client.ts
- packages/client-web-kit/src/core/translator/de/vuecs.ts
- packages/client-web-kit/src/components/utility/translation/ATranslationDefault.vue
- packages/client-web-kit/src/core/translator/de/default.ts
- packages/client-web-kit/src/core/translator/de/client.ts
- packages/client-web-kit/src/components/utility/translation/index.ts
- packages/client-web-kit/src/core/translator/en/vuecs.ts
…t shape
The batch element is now `{ namespace, key, count?, data? }` and the output
map is keyed by the enum `key` value, removing the redundant `as` alias. Where
a component needs both forms of one entity (plural collection heading + singular
delete toast), the plural stays in the batch and the singular is resolved
imperatively via `useTranslator()`. Entity index headings now render the plural
form (count: 2).
Enforces the locales.ts claim that en and de are authored fully — without this the suite would silently pass if de were dropped from CATALOGS.
|
@coderabbitai pause |
✅ Action performedReviews paused. |
Fill in French and Spanish catalogs for all eight namespaces and wire them into CATALOGS so the locale-parity test enforces key completeness. The language switcher now iterates LOCALES instead of a hardcoded list, so registry locales surface automatically.
Format the LOCALES.find predicate across multiple lines.
Summary
Routes every hardcoded user-facing string in
apps/client-webandpackages/client-web-kitthrough the shared@authup/i18ncatalogs, and hardens the kit's translation helper.@authup/i18n(en/de), consumed by the kit's ilingo install. Adds theAPPnamespace (chrome/nav/toasts), sharedDEFAULTkeys (entity-form + page labels), andCLIENTkeys (component hints/sentences).useTranslationsForNamespace(batched, insetup) or the single-valueuseTranslationcomposable in.tsrender components.useTranslationsForNamespacenow returns areactive()map of unwrapped strings (Record<key, string>). A translation is accessed astranslations.keyeverywhere — script,{{ }}, and:attrbindings — with no.value. This removes the prior nested-ref footgun where interpolation auto-unwrapped a ref but attribute bindings did not, forcingt.key.valueonly in attribute position.Verification
@authup/i18n,client-web-kit, andclient-weball build clean (tsdown + vue-tsc/tsc + Nuxt)./loginrenders real text (Login/Name/Password) post-hydration — nonamespace.keyleakage, noRef/[object Object]serialization.Test plan
{{client}}-interpolated scope-grant sentence.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Refactor