Skip to content

Make the parameter help shortcut translatable - #1393

Merged
microbit-matt-hillsdon merged 3 commits into
microbit-foundation:mainfrom
helloigig:translate-parameter-help-shortcut
Nov 4, 2026
Merged

microbit-matt-hillsdon merged 3 commits into
microbit-foundation:mainfrom
helloigig:translate-parameter-help-shortcut

Conversation

@helloigig

Copy link
Copy Markdown
Contributor

Closes #1193

The shortcut in the "Manual (Ctrl+Shift+Space)" parameter help option was built in code, so translators couldn't localise the key names (for example, Strg in German).

  • Adds two source strings, parameter-help-shortcut ("Ctrl+Shift+Space") and parameter-help-shortcut-mac ("Cmd+Shift+Space"), with descriptions asking translators to use local key names.
  • Manual ({shortcut}) and its existing translations are unchanged, and English reads exactly as before.
  • Added component tests for both platforms.

Checked with typecheck, lint, unit tests, i18n:tidy --check, the settings, accessibility and autocomplete e2e tests, and a build. I also checked the dialog in English and German, and with a temporary local German translation to confirm it comes through.

One thing worth knowing: the select is fixed at 28ch, so a longer translation gets clipped when the select is closed. The open list shows it in full.

AI-assisted.

The shortcut shown in the Manual parameter help option was built in code,
so translators couldn't localise the key names (for example, Strg in
German). Move it into two source strings, one for Mac and one for other
platforms. English is unchanged and existing translations still apply.

Closes microbit-foundation#1193
Comment thread src/settings/SettingsArea.test.tsx Outdated
@@ -0,0 +1,52 @@
/**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Let's drop this. There are a lot of translated strings and it's not reasonable to cover them all in this way, so I'm reluctant to add this (especially as AI will take it as a pattern to follow).

@microbit-matt-hillsdon microbit-matt-hillsdon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, thanks!

@microbit-matt-hillsdon
microbit-matt-hillsdon merged commit 5d8de2a into microbit-foundation:main Nov 4, 2026
1 check 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.

A shortcut in the Settings / Parameter help dropdown is not translated

2 participants