Skip to content

fix(translations): stop translating two admin messages twice - #3843

Merged
bobvandevijver merged 1 commit into
bolt:6.1from
Vondry:fix/double-translated-messages-6.1
Oct 25, 2026
Merged

bobvandevijver merged 1 commit into
bolt:6.1from
Vondry:fix/double-translated-messages-6.1

Conversation

@Vondry

@Vondry Vondry commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Resubmits #3834 (reverted in #3842) with code changes only. All translation catalogue changes are in #3844 for 6.2.

Two admin messages were translated twice. The second lookup used the already translated text as a key, so with auto_add_missing_translations enabled, junk units (e.g. a Czech sentence as a key) were written into the project's translation files.

  • Secure preview link (_buttons.html.twig): passed 'action.preview_secure_share'|trans to macro.buttonlink(), which translates the label again. It now passes the key.
  • Login-required flash (AuthenticationEntryPointRedirector): translated in security, then again by _flash_messages.html.twig. It's now added as an untranslated key, like the other backend flash messages.

On 6.1 the login message is now read from the existing messages units: en, fr, nl and sk are unchanged, cs and ru use the slightly different messages wording, and de falls back to English, as messages.de.xlf has no unit for it.

The secure preview link in the content edit dropdown passed an already
translated label to macro.buttonlink(), which translates it again. The
login-required flash message was translated in the "security" domain in
AuthenticationEntryPointRedirector, and _flash_messages.html.twig
translated the result again in "messages".

The second lookup uses the translated text as a key, so it is reported
as a missing translation, and php-translation's
auto_add_missing_translations writes it into the project's translation
files.

Pass the translation key to the macro, and add the flash message as an
untranslated key like the other backend flash messages.

The translation catalogue changes are made separately for 6.2.
@Vondry
Vondry force-pushed the fix/double-translated-messages-6.1 branch from 721fbb4 to ffd12e3 Compare October 25, 2026 07:52
@bobvandevijver
bobvandevijver merged commit 7502a24 into bolt:6.1 Oct 25, 2026
35 checks passed
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.

2 participants