Keycloak admin dialogs hardcode English instead of using existing i18n keys #1005

Closed
opened 2026-08-12 06:23:41 +00:00 by spikerj · 1 comment
Owner

Summary

Several Keycloak admin MatDialog templates ship with hardcoded English strings even though matching keycloakAdmin.* i18n keys already exist in projects/spikersoft/src/assets/i18n/keycloakAdmin/en.json.

Evidence

  1. user-delete-dialog.component.html truncates long lists with a hardcoded remainder:

    <p class="more-users">...and {{ data.users.length - 10 }} more</p>
    

    The scope already defines userDeleteDialog.andMoreUsers as "...and {{count}} more" — unused.

  2. user-toggle-enabled-dialog.component.html hardcodes current-status labels:

    {{ data.currentState ? "Enabled" : "Disabled" }}
    

    while userToggleEnabledDialog.enabled / .disabled keys exist.

Impact

Non-English locales (and any future copy edits) silently keep English for these arms. Wave 6 tick3 a1 coverage specs assert the current English text and will need updating when this is fixed.

Suggested fix

Wire the existing keys (t('keycloakAdmin.userDeleteDialog.andMoreUsers', { count: ... }), t('keycloakAdmin.userToggleEnabledDialog.enabled'|'disabled')) and drop the literals.

## Summary Several Keycloak admin MatDialog templates ship with hardcoded English strings even though matching `keycloakAdmin.*` i18n keys already exist in `projects/spikersoft/src/assets/i18n/keycloakAdmin/en.json`. ## Evidence 1. **`user-delete-dialog.component.html`** truncates long lists with a hardcoded remainder: ```html <p class="more-users">...and {{ data.users.length - 10 }} more</p> ``` The scope already defines `userDeleteDialog.andMoreUsers` as `"...and {{count}} more"` — unused. 2. **`user-toggle-enabled-dialog.component.html`** hardcodes current-status labels: ```html {{ data.currentState ? "Enabled" : "Disabled" }} ``` while `userToggleEnabledDialog.enabled` / `.disabled` keys exist. ## Impact Non-English locales (and any future copy edits) silently keep English for these arms. Wave 6 tick3 a1 coverage specs assert the current English text and will need updating when this is fixed. ## Suggested fix Wire the existing keys (`t('keycloakAdmin.userDeleteDialog.andMoreUsers', { count: ... })`, `t('keycloakAdmin.userToggleEnabledDialog.enabled'|'disabled')`) and drop the literals.
Author
Owner

Fixed in spikersoft-angular PR #823 (a0f0ccd9). Closing.

Fixed in `spikersoft-angular` [PR #823](https://git.spikersoft.com/spikerj/spikersoft-angular/pulls/823) (`a0f0ccd9`). Closing.
Sign in to join this conversation.