Skip to content

Fix: pluralise the counted messages nothing had converted - #171

Merged
SandObserver merged 1 commit into
mainfrom
fix/plural-sweep-and-locale-e2e
Aug 29, 2026
Merged

SandObserver merged 1 commit into
mainfrom
fix/plural-sweep-and-locale-e2e

Conversation

@SandObserver

Copy link
Copy Markdown
Owner

Summary

  • Split import.confirm and app.labelMax into per-category plural forms across all six locales, renaming their {n} placeholder to {count} and updating the three call sites.
  • Add every counted noun has plural forms to i18n.test.mjs, matching a placeholder followed by a plural noun, with NOT_COUNTED carrying a reason per exclusion.
  • Exclude app.pollInterval, which is split around an editable field with a minimum of 10; reaching its singular would mean rebuilding the surrounding words on every keystroke. status.pending is not matched, being a participle that agrees with nothing in the six shipped languages.
  • Add e2e/localisation.spec.js: choosing a language in Settings saves it, survives a reload, reaches the dashboard and the widget frame URL, and sets dir for Persian.
  • Cover the development locales in the browser: en-XA renders and is absent from the selector, cimode renders keys, and neither is written to the config.
  • Add clipping checks that load the dashboard and Settings under en-XA and fail on any control overflowing without an ellipsis, at desktop and at 390px, skipping visually-hidden text.

Testing
All green: 1088 frontend tests, 1334 backend tests at 94.35% lines, lint, format, both typechecks, the cache-busting check, and the Docker build. The full e2e suite was run in Chromium and WebKit against the built image; the 20 new cases pass in both. Added 1 unit test and 10 e2e cases.

One pre-existing failure, unrelated to this change: spotlight-contrast.spec.js "the search placeholder clears 4.5:1 over a light wallpaper" fails under WebKit in the Playwright container. It fails identically on main with the same command, and passes in CI, so it looks specific to that WebKit build rather than to the page.

Checklist

  • Stays within the project constraints: one container, no runtime dependencies, no build step (see CONTRIBUTING.md).
  • Tests added or updated for new logic, and the full suite, lint, and typechecks pass.
  • Docs updated if behavior or configuration changed.
  • CHANGELOG.md updated under Unreleased if the change is user-visible.

The plural work converted the messages that already carried a singular and a
plural key. It never looked for counted messages that had never been pluralised
at all, so the import confirmation and the badge label limit still counted in
English.

Both are now stored per plural category. Two others the scan turns up are left
alone with a reason: "{count} pending" is a participle and agrees with nothing
in any language shipped here, and "every {seconds} seconds" wraps an editable
field whose minimum is 10, so the surrounding words would have to be rebuilt on
every keystroke to reach a singular that cannot occur.

A test now finds a number followed by a plural noun with no plural forms, which
is what nothing was looking for.

Adds browser coverage for choosing a language: the choice saves, survives a
reload, reaches the dashboard and the widget frames, and sets the direction.
The pseudolocale is checked for what it was built for, that no control clips
when every string is 40% longer, at desktop and at 390px wide, in both browsers.
@SandObserver SandObserver added the bug Something isn't working label Aug 29, 2026
@SandObserver
SandObserver merged commit 178f504 into main Aug 29, 2026
4 checks passed
@SandObserver
SandObserver deleted the fix/plural-sweep-and-locale-e2e branch August 29, 2026 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant