Skip to content

Menu locale fixes#1496

Open
zorkow wants to merge 25 commits into
feature/locale-componentsfrom
fix/menu-locale_de
Open

Menu locale fixes#1496
zorkow wants to merge 25 commits into
feature/locale-componentsfrom
fix/menu-locale_de

Conversation

@zorkow

@zorkow zorkow commented Jun 8, 2026

Copy link
Copy Markdown
Member

Fix German menu localisation and restructure locale IDs

PR refines the menu localisation system introduced in feature/locale-components, fixes the German menu
translations, and adds a new dedicated locale component for ARIA role descriptions.

Changes

German menu localisation fix

  • Corrected German translations across ts/ui/menu/__locales__/de.json that did not sound quite right to my ear. Also ensures they are not too long.

Locale ID restructuring

  • Most menu locale keys are now namespaced with a category prefix. This makes the key hierarchy explicit and gives context during localisation. As discussed I reversed Title for Help and Clearspeak.

New a11y locale component (ts/a11y/__locales__/)

  • Component.ts registers the a11y locale component and exposes a localize() helper.
  • en.json / de.json provide English and German strings for ARIA role descriptions.
  • Matching components/mjs/a11y/ bundle files wire the component into the build.

**New aria.ts module and new a11y locale component **

  • ts/a11y/aria.ts introduces AriaRoleDescription with keys for all role description variants we want to localize.
  • localizeAria(id) resolves an ARIA key through the locale system, falls to the id as "localised" string. This is important when a description is explicitly defined in the menu options.
  • Menu.ts now uses AriaRoleDescription.* constants instead of bare string literals for the role-description radio
    group and its default value.
  • The radio() helper in Menu.ts routes ARIA keys through localizeAria() so they are localised correctly.

** Other things **

  • Locale.ts needed a fixed for missing initialised field.
  • There are a couple of your commits in the PR: for bussproofs locale and Clipboard-copy error in MenuUtil.ts.

I am not sure if it is worthwhile to rebase and reply my commits or if this comes out in the wash once all the other branches have landed on feature/locale

@dpvc dpvc added this to the v4.2 milestone Jun 11, 2026
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