Skip to content

[Translations] Make the login error dialog labels public - #2089

Merged
markus-moser merged 2 commits into
2026.3from
fix/public-translations-login-error-dialog
Oct 9, 2026
Merged

markus-moser merged 2 commits into
2026.3from
fix/public-translations-login-error-dialog

Conversation

@markus-moser

Copy link
Copy Markdown
Contributor

Changes in this pull request

Resolves #

A failed login (e.g. "Invalid credentials") opens Studio's shared error dialog while the user is still unauthenticated. At that point the UI only loads PublicTranslations::PUBLIC_KEYS, which holds just the login and forgot-password form labels. So the dialog showed raw keys:

  • title: error (useAlertModal().error() → t('error'))
  • OK button: alert-modal.ok-text (studio-ui 2026.3 added this okText)

This PR adds both keys to the public allowlist. Their values are generic labels ("Error", "OK").

Additional info

  • Regression test TranslatorServiceTest::testLoginErrorDialogKeysArePublic: fails without the fix, passes with it. Unit suite green locally (1276 tests) in pimcore/pimcore:php8.4-debug-latest. php-cs-fixer and PHPStan not run locally; CI validates.
  • The raw error title also exists on 2025.4 and 2026.2. It is fixed from 2026.3 only, since this is not critical.
  • Found in the agent-proposal QA run on nightly (B36); the screenshot shows the dialog with title error and button alert-modal.ok-text.

🤖 Generated with Claude Code

A failed login opens the shared error dialog before the user is
authenticated. At that point Studio only receives the public translation
keys, so the dialog title showed the raw key "error" and, since Studio UI
2026.3, the button showed "alert-modal.ok-text".

Add both keys to PublicTranslations::PUBLIC_KEYS.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 9, 2026 12:17
@markus-moser markus-moser added this to the 2026.3.2 milestone Oct 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The implementation is sound, but its public-translation documentation must be updated to reflect the expanded allowlist.

1 open finding
What changed in this PR

Verdict: Needs changes. The PR correctly exposes shared login-error dialog labels to unauthenticated users.

Changes:

  • Adds error and alert-modal.ok-text to the public allowlist.
  • Adds a focused regression test for both keys.

Review contract:

  • Root cause fixed at the owning allowlist (PublicTranslations.php:35-37).
  • Both allowlist consumers inherit the change; no BC break identified.
  • Regression coverage is appropriately scoped (TranslatorServiceTest.php:66-74).
  • Documentation remains inaccurate: doc/03_Extending/07_Translations.md:35 says only login-form strings are public.
  • Runtime catalogue values were not independently verifiable from this diff.
File Description
src/​Util/​Constant/​PublicTranslations.php Adds shared error-dialog labels to public translations.
tests/​Unit/​Service/​Translator/​TranslatorServiceTest.php Verifies both labels are returned before authentication.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/Util/Constant/PublicTranslations.php
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Oct 9, 2026

Copy link
Copy Markdown

@markus-moser
markus-moser merged commit dc2ba5a into 2026.3 Oct 9, 2026
21 checks passed
@markus-moser
markus-moser deleted the fix/public-translations-login-error-dialog branch October 9, 2026 12:35
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants