etherpad-lite/src
John McLear 5b146f0b03
fix(pad): show detected language in settings dropdown (#7925) (#7928)
* fix(pad): show detected language in settings dropdown (#7925)

When the UI language was auto-detected from the browser (no language
cookie and no pad-wide lang set), refreshMyViewControls() and
refreshPadSettingsControls() set the language dropdown to
`<option>.lang || 'en'`. Since the detected language lives only in
html10n (not in padOptions/effectiveOptions), the value was undefined
and the dropdown fell back to hardcoded English — even though the pad
UI itself rendered correctly in the detected language.

Fall back to html10n.getLanguage() before 'en' so the dropdown reflects
the language actually rendered. getLanguage() returns the matched
lowercase locale key, which matches the <option value> keys.

Adds a regression test that loads a pad under a de-DE browser locale and
asserts the dropdown reads "Deutsch" without any manual selection.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test(language): assert German toolbar tooltip (Qodo #7928)

The detection-works precondition computed a boolean via locator.evaluate()
but never asserted it, so it could not fail. Assert the bold button's
parent title is the German "Fett (Strg-B)" with toHaveAttribute instead.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 15:23:01 +01:00
..
locales Localisation updates from https://translatewiki.net. 2026-06-08 14:03:38 +02:00
node Fix offline/air-gapped Docker boot: stop pnpm self-provisioning the pinned version (#7911) (#7918) 2026-06-09 09:31:00 +01:00
static fix(pad): show detected language in settings dropdown (#7925) (#7928) 2026-06-09 15:23:01 +01:00
templates fix(theme-color): dark address bar + no light-flash on dark-OS load (#7606) (#7909) 2026-06-08 21:54:08 +02:00
tests fix(pad): show detected language in settings dropdown (#7925) (#7928) 2026-06-09 15:23:01 +01:00
.eslintrc.cjs Feat/admin react (#6211) 2024-03-09 23:07:09 +01:00
ep.json feat(updater): tier 2 — manual-click update from /admin/update (#7607) (#7704) 2026-05-10 09:00:07 +01:00
etherpad_icon.svg Change favicon to be closer to new style 2020-04-19 18:20:21 +02:00
package.json test: downstream client compatibility gate (Phase 1) (#7923) 2026-06-09 11:40:58 +01:00
playwright.config.ts test(playwright): un-skip ep_headings2 spec under WITH_PLUGINS (#7634) 2026-04-30 06:12:23 +01:00
README.md remove one less warning during install by having a readme placeholder 2013-02-10 03:04:08 +00:00
tsconfig.json 🩹 — Avoid duplicate key "types" in tsconfig (#7610) 2026-04-28 13:06:43 +08:00
vitest.config.ts Feat/changeset ts (#6594) 2024-08-18 12:14:24 +02:00
web.config Added typescript to etherpad 2024-02-05 21:13:02 +01:00

Ignore this file and see the file in the base installation folder