Skip to content

ShellBarSearch: Cancel button not translated when language is set to non-English (e.g. German) #14298

Open

Description

@hkshetry

Describe the bug

When the UI language is set to German (de) — either via the data-ui5-config script tag, setLanguage("de"), or the Storybook globals=language:de parameter — the Cancel button rendered by ShellBarSearch in its collapsed/mobile state still displays "Cancel" (English) instead of the expected German translation "Abbrechen".

Other ShellBar strings (e.g. "Suche öffnen" for the search icon tooltip, "Benutzermenü" for the profile avatar) are correctly translated. Only the ShellBarSearch cancel button text remains untranslated.

Steps to reproduce

  1. Open the official UI5 Web Components for React Storybook with German locale:
    https://ui5.github.io/webcomponents-react/v2/?path=/story/layouts-floorplans-shellbar--all-features&globals=language:de

  2. Confirm the toolbar shows German (de) as the active language.

  3. Click the search icon ("Suche öffnen") to open the search field.

  4. Resize the browser window to a narrow width (≤ ~500px) so the ShellBar enters its responsive/collapsed mode — the full-width search bar with Cancel button becomes visible.

  5. Observe the Cancel button label.

Expected behavior

The Cancel button should display "Abbrechen" (the correct German translation).

Actual behavior

The Cancel button displays "Cancel" (English fallback), even though:

  • The German (de) language is active in Storybook globals.
  • Other ShellBar i18n strings are correctly translated.
  • The German message bundle (messagebundle_de.json) loads successfully (HTTP 200).

Environment

Root cause hypothesis

The ShellBarSearch cancel button text appears to be rendered synchronously during initial component connection, before the async German i18n bundle fetch completes. When setLanguage("de") is called, it triggers an async fetch of messagebundle_de.json; by the time the bundle arrives, the cancel button's text node has already been stamped into the shadow DOM with the English default and is not re-invalidated/re-rendered.

Activity

  1. LidiyaGeorgieva commented on Nov 17, 2026

    @LidiyaGeorgieva
    Contributor

    Hello @UI5/ui5-team-ctr-pir I am forwarding this issue to you, because the text of the "Cancel" button is not translated.

  2. self-assigned this
    on Nov 20, 2026
  3. moved this from Issues to In Progress in Maintenance - Topic Pon Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions