Repository navigation
Fix: translate the accessible names in Settings - #169
Merged
Merged
Conversation
About 55 user-facing strings in Settings were written straight into the source rather than made catalogue keys. Most were accessible names, so a screen reader in any language read a translated page and then spoke English for every control. The reachability test could not see them: nothing was missing from a catalogue, because the strings had never been keys. Twenty of them already had a key that said the same thing and now reuse it. Fourteen were "Edit <row label>" on an inline-edit pencil; those carry no name of their own now, and initInlineEdit names the button after the row's own label, so the two stay in one language and in step. The rest become 24 new keys, translated into all six languages. Static markup gains a data-i18n-title attribute, matching the existing text, placeholder and aria-label attributes, and the Settings page title is set from the catalogue. A new test scans the interface source for a literal where a translated value belongs, so this surface cannot grow back.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
aria-labelfrom every inline-edit pencil and name the button ininitInlineEditfrom its row's.rllabel, via a newcommon.editNamedmessage; this covers all 25 inline-edit rows and removes 14 separate strings.common,app,folder,appearance,widgetCfg,nav,general,dashboardandabout, translated into all six locales, for the labels and names that had no equivalent.t()calls, so the pencil names derived from them are translated too.data-i18n-titletotranslateDOM, alongside the existing text, html, placeholder and aria-label attributes.nav.pageTitleafterinitI18n.hardcoded-strings.test.mjs, which fails on anaria-label,placeholder,titleor row label holding a literal instead of a key, with a narrow allowlist for example values, brands and bare technical tokens.landmarks.test.mjsto match attributes rather than exact attribute order, matching the pattern the dashboard landmark test already uses.Testing
All green: 1083 frontend tests, 1334 backend tests at 94.35% lines, lint, format, both typechecks, the cache-busting check, the admin ES-module syntax check, and the Docker build. Added 2 tests, the scan verified to fail by introducing a literal
aria-labelbefore reverting.Checklist