Skip to content

web/flows: fix untranslated user field labels in identification stage - #23518

Merged
GirlBossRush merged 4 commits into
goauthentik:mainfrom
mohamed-karam:fix/untranslated_identificaiton_fields
Jun 29, 2026
Merged

GirlBossRush merged 4 commits into
goauthentik:mainfrom
mohamed-karam:fix/untranslated_identificaiton_fields

Conversation

@mohamed-karam

Copy link
Copy Markdown
Contributor

Details

What does this PR change?

Fixes the Identification Stage so that the identifier field's label and placeholder ("Username", "Email", "UPN", or a combined variant like "Username or Email") are translated into the active UI locale.

The labels were built from a module-level UI_FIELDS constant whose msg() calls were evaluated once at import time. This constant is replaced with a uiFieldLabels() function that is invoked inside renderInput(), so the strings are resolved and rendered with the active locale.

Why is this change needed?

Authentik's web UI uses @lit/localize in runtime mode, where only msg() calls made during render pick up the active locale and re-render when it changes. Because UI_FIELDS ran its msg() calls at module-import time - before the locale is applied — the field labels were frozen at the source locale (English) for every non-English UI. The translations already existed in the catalogs; they were simply never applied at runtime. As a result, the Identification Stage on the default authentication flow always showed an English field label even when the rest of the page was translated.

How was this tested?

  • Manually: Open default-authentication-flow and change the locale to a non-English locale (German). Before the change the field label/placeholder rendered in English; after the change, it's renders localized (e.g. "Anmeldename") and updates when the locale changes.
  • Verified no other references to the removed UI_FIELDS constant remain.
  • make all (lint, build, test).

Linked issues

closes #23517


Checklist

  • The project has been linted, built, and tested (make all)
  • The documentation has been updated and formatted (make docs)

@mohamed-karam
mohamed-karam requested a review from a team as a code owner June 29, 2026 13:06
@BeryJu BeryJu changed the title web: fix untranslated user field labels in identification stage web/flows: fix untranslated user field labels in identification stage Jun 29, 2026

@BeryJu BeryJu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@netlify

netlify Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 50550f1
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/6a428a78c7c2910008f77609
😎 Deploy Preview https://deploy-preview-23518--authentik-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 768020a
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a427f184fd0b30008dbb271
😎 Deploy Preview https://deploy-preview-23518--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.26%. Comparing base (b453cee) to head (50550f1).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #23518      +/-   ##
==========================================
+ Coverage   93.15%   93.26%   +0.11%     
==========================================
  Files        1037     1037              
  Lines       60658    60658              
  Branches      400      400              
==========================================
+ Hits        56506    56575      +69     
+ Misses       4152     4083      -69     
Flag Coverage Δ
conformance 36.30% <ø> (+<0.01%) ⬆️
e2e 41.51% <ø> (+0.66%) ⬆️
integration 32.27% <ø> (-0.49%) ⬇️
rust 0.00% <ø> (ø)
unit 92.34% <ø> (+<0.01%) ⬆️
unit-migrate 92.38% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@mohamed-karam
mohamed-karam force-pushed the fix/untranslated_identificaiton_fields branch from f58a3e7 to 768020a Compare June 29, 2026 14:20
@GirlBossRush
GirlBossRush self-requested a review June 29, 2026 15:08
@GirlBossRush
GirlBossRush enabled auto-merge (squash) June 29, 2026 15:10
@GirlBossRush
GirlBossRush merged commit c7227fa into goauthentik:main Jun 29, 2026
158 of 160 checks passed
kensternberg-authentik added a commit that referenced this pull request Jun 30, 2026
…yers' into web/css/enabling-layers

* refs/remotes/origin/web/css/enabling-layers: (23 commits)
  flows: fix flow executor authentication with jwt  (#16646)
  web: bump playwright from 1.60.0 to 1.61.0 in /web (#23542)
  core, web: update translations (#23534)
  web: bump the eslint group across 1 directory with 3 updates (#23538)
  web: bump type-fest from 5.6.0 to 5.7.0 in /web (#23544)
  lifecycle/aws: bump aws-cdk from 2.1128.0 to 2.1128.1 in /lifecycle/aws (#23535)
  core: bump deepmerge from 2.0 to 2.1.0 (#23539)
  root: fix "make gen" failing with "the input device is not a TTY" (#23546)
  core: bump library/golang from `76a2924` to `68b7145` in /lifecycle/container (#23536)
  core: bump goauthentik/fips-python from `15f00f3` to `6067443` in /lifecycle/container (#23537)
  website/integrations: fix logo missing (#23548)
  translate: Updates for project authentik and language ar_AA (#23516)
  Web/maintenance/explicit model endpoints (#22897)
  providers/oauth: Properly return error via post and for request objects (#23037)
  providers/oauth: Logout remove static html (#23002)
  core: bump dramatiq from 2.1.0 to 2.2.0 (#23381)
  website: bump semver from 7.8.4 to 7.8.5 in /website (#23299)
  web/flows: fix untranslated user field labels in identification stage (#23518)
  tasks/schedules: fix paused schedules getting unpaused on startup (#23521)
  sources/ldap: avoid re-creating connections to LDAP server (#23520)
  ...
kensternberg-authentik added a commit that referenced this pull request Jun 30, 2026
* main: (591 commits)
  core: bump dramatiq from 2.1.0 to 2.2.0 (#23381)
  website: bump semver from 7.8.4 to 7.8.5 in /website (#23299)
  web/flows: fix untranslated user field labels in identification stage (#23518)
  tasks/schedules: fix paused schedules getting unpaused on startup (#23521)
  sources/ldap: avoid re-creating connections to LDAP server (#23520)
  web: bump the bundler group across 1 directory with 3 updates (#23207)
  core: bump webauthn from 2.7.1 to 2.8.0 (#23249)
  lib/sync: add Sync base model for storing past sync history (#23184)
  web: bump launch-editor from 2.13.2 to 2.14.1 (#23309)
  web: bump the eslint group across 1 directory with 2 updates (#23239)
  web: bump uuid from 14.0.0 to 14.0.1 in /web (#23310)
  lifecycle/aws: bump aws-cdk from 2.1126.0 to 2.1128.0 in /lifecycle/aws (#23377)
  website: bump the build group across 1 directory with 6 updates (#23406)
  core: bump coverage[toml] from 7.14.2 to 7.14.3 (#23410)
  core: bump github.com/jellydator/ttlcache/v3 from 3.4.0 to 3.4.1 (#23405)
  core: bump gorm.io/gorm from 1.31.1 to 1.31.2 (#23404)
  ci: bump actions/setup-go from 6.4.0 to 6.5.0 (#23412)
  core: bump library/node from `f9b8bd6` to `a1d9d67` in /lifecycle/container (#23407)
  core: bump goauthentik/fips-python from `fe20a68` to `15f00f3` in /lifecycle/container (#23408)
  core: bump library/node from 26.3.1-trixie to 26.4.0-trixie in /website (#23409)
  ...
kensternberg-authentik added a commit that referenced this pull request Jul 2, 2026
* main:
  core: bump dramatiq from 2.1.0 to 2.2.0 (#23381)
  website: bump semver from 7.8.4 to 7.8.5 in /website (#23299)
  web/flows: fix untranslated user field labels in identification stage (#23518)
  tasks/schedules: fix paused schedules getting unpaused on startup (#23521)
  sources/ldap: avoid re-creating connections to LDAP server (#23520)
  web: bump the bundler group across 1 directory with 3 updates (#23207)
  core: bump webauthn from 2.7.1 to 2.8.0 (#23249)
  lib/sync: add Sync base model for storing past sync history (#23184)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Identification Stage user-field label/placeholder is not translated (stuck in English) for all non-English locales

3 participants