Skip to content

Wrap the strings of Settings' Accounts, Saved searches, Gmail and Notifications pages in Lingui - #1210

Merged
timche merged 10 commits into
betafrom
i18n-settings-b
Oct 21, 2026
Merged

timche merged 10 commits into
betafrom
i18n-settings-b

Conversation

@timche

@timche timche commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Settings' Accounts, Saved searches, Gmail, Label colors and Notifications pages now go through Lingui, so a later catalog can translate them. That includes their dialogs, form errors, toasts and notification sound names. The English is unchanged, so nothing visible changes until a non-English catalog ships, and there's no changelog line. This is slice 4's third pull request, after #1206 (#1206) and #1208 (#1208). The last Settings one covers Workspace apps, Extensions and License.

What changed

  • SettingsDialogContent is a new renderer wrapper around packages/ui's DialogContent that passes the translated "Close" label. All six dialogs here use it, and so does config-select-field, so a dialog can't show an English close label without notice.
  • Form errors.
    • @meru/shared/schemas.ts keeps its validators but no longer holds messages.
    • The saved-search and label-color forms extend those schemas inside the component with t, so the messages are translated and the rules are unchanged.
  • Notification sound names (Breeze, Chime, Duet, Knock, Linen) are msg descriptors, translated where they're shown. The stored keys don't change.
  • The four pages:
    • Weekday buttons come from Intl.DateTimeFormat and keep their Monday-first order. Volume comes from Intl.NumberFormat as a percent.
    • The platform-specific download-click copy is a select().
    • Accounts' option labels are one msg record shared by the switches and the badges.
    • Page titles come from settingsPageLabels.
    • The Pro banner's per-page text is wrapped, text only.
    • Example placeholders ("Work", "Friends") are wrapped, and title and aria-label text is wrapped.
  • Gmail's own words.
    • Sentences that quote Gmail's interface carry translator comments naming the quoted term as Gmail's own, to be written as Gmail writes it in that language. This covers View entire message, the ••• button, Gmail's Upgrade button, Primary, Important, the pop-out and the out-of-office banner.
    • The translate skill's glossary gains entries with Gmail's wording in all ten languages for Primary, Important and pop-out. "View entire message" and Gmail's Upgrade button tell the translator to use what Gmail shows.
    • "•••" and search operators such as label:friends is:unread stay verbatim.
  • Lint.
    • Eight files join LOCALIZED_FILES: the five pages, lib/notifications/index.ts, shared/schemas.ts and the wrapper.
    • maturity joins ignoreNames.
  • Left in English on purpose:
    • "Gmail" as the page title.
    • User data: account and saved-search labels and queries.
    • dnd-kit's screen-reader announcements for reordering, which a later pull request covers for every list that can be reordered.

Proof

Lint count. Run with this branch's oxlint.config.ts.

Before, on origin/beta's source:

packages/renderer/routes/settings/saved-searches.tsx:52:22: error lingui(no-unlocalized-strings): String not marked for translation.
packages/renderer/routes/settings/notifications.tsx:41:32: error lingui(no-unlocalized-strings): String not marked for translation.
…
174 lingui(no-unlocalized-strings) errors across 7 files (notifications.tsx 50, gmail/index.tsx 47, accounts.tsx 31, saved-searches.tsx 19, label-colors.tsx 17, lib/notifications/index.ts 5, shared/schemas.ts 5)

After, on this branch: bun run lint exits 0 with no errors.

Pseudo-locale run. Each side ran licensed, on a scratch copy of the test profile, with the whole catalog pseudolocalized into the en slot.

English parity. Review used dev builds of beta and of this branch on fresh profiles. It dumped the rendered text and the title, aria-label and placeholder attributes across 16 states: every page, dialog, validation error and alert. The two dumps are byte-identical. In the running app, weekdays render Mon…Sun, and volume matches the old text at every slider step.

Checks

Check Result
bun test --isolate 1591 pass, 0 fail
bun run fmt:check, lint, types, build:js pass
lingui compile --strict, check sync --clean, check missing --mode catalog, i18n:check pass
End-to-end suite (English) 95 passed, 10 skipped

Risk

  • English: the review's byte-identical comparison above covers it.
  • Shared schemas: they lost their messages, but the renderer is the only consumer, and validation conditions and the fields errors attach to are unchanged.

Revert

Revert the squash commit. Nothing touches config or stored data; sound keys are unchanged.

Not verified

  • Windows and Linux copy: the download-click wording for Windows and Linux comes from the code, run on macOS only.
  • Gmail's own wording: Gmail's per-language wording for "View entire message" and its Upgrade button is unknown. The glossary asks translators to read it off Gmail.

Noted, not changed

  • "Show in folder" vs "Show in Finder": Notifications' download setting says "Show in folder" while the notification's own button reads "Show in Finder", "Show in File Explorer" or "Show in your file manager". The English is kept as it is.
  • Form errors and window focus: a field's form error clears when the window loses focus while that field is focused. This is TanStack Form's blur behavior, unchanged here. It's why the dialog screenshots show only the query or color error.

Before: Settings > Gmail under the pseudo-locale, page copy in plain English

After: Settings > Gmail pseudolocalized, the Gmail title plain

@timche
timche merged commit 67eaf73 into beta Oct 21, 2026
9 checks passed
@timche
timche deleted the i18n-settings-b branch October 21, 2026 13:12
timche added a commit that referenced this pull request Oct 23, 2026
…ifications pages in Lingui (#1210)

* Give Settings' dialogs their translated close label from one wrapper

* Build the saved search and label color forms' schemas in the renderer, with translated messages

* Translate the notification sounds' names

* Wrap the strings of Settings' Accounts page in Lingui

* Wrap the strings of Settings' Saved searches page in Lingui

* Wrap the strings of Settings' Gmail page and its label colors in Lingui

* Wrap the strings of Settings' Notifications page in Lingui, with weekdays and volume from Intl

* Extract the wrapped Settings strings into the English catalog

* Add Gmail's words for Primary, Important and a pop-out to the glossary

* Share the account options' labels between their switches and badges
timche added a commit that referenced this pull request Oct 24, 2026
…ifications pages in Lingui (#1210)

* Give Settings' dialogs their translated close label from one wrapper

* Build the saved search and label color forms' schemas in the renderer, with translated messages

* Translate the notification sounds' names

* Wrap the strings of Settings' Accounts page in Lingui

* Wrap the strings of Settings' Saved searches page in Lingui

* Wrap the strings of Settings' Gmail page and its label colors in Lingui

* Wrap the strings of Settings' Notifications page in Lingui, with weekdays and volume from Intl

* Extract the wrapped Settings strings into the English catalog

* Add Gmail's words for Primary, Important and a pop-out to the glossary

* Share the account options' labels between their switches and badges
timche added a commit that referenced this pull request Oct 28, 2026
…ifications pages in Lingui (#1210)

* Give Settings' dialogs their translated close label from one wrapper

* Build the saved search and label color forms' schemas in the renderer, with translated messages

* Translate the notification sounds' names

* Wrap the strings of Settings' Accounts page in Lingui

* Wrap the strings of Settings' Saved searches page in Lingui

* Wrap the strings of Settings' Gmail page and its label colors in Lingui

* Wrap the strings of Settings' Notifications page in Lingui, with weekdays and volume from Intl

* Extract the wrapped Settings strings into the English catalog

* Add Gmail's words for Primary, Important and a pop-out to the glossary

* Share the account options' labels between their switches and badges
timche added a commit that referenced this pull request Oct 30, 2026
…ifications pages in Lingui (#1210)

* Give Settings' dialogs their translated close label from one wrapper

* Build the saved search and label color forms' schemas in the renderer, with translated messages

* Translate the notification sounds' names

* Wrap the strings of Settings' Accounts page in Lingui

* Wrap the strings of Settings' Saved searches page in Lingui

* Wrap the strings of Settings' Gmail page and its label colors in Lingui

* Wrap the strings of Settings' Notifications page in Lingui, with weekdays and volume from Intl

* Extract the wrapped Settings strings into the English catalog

* Add Gmail's words for Primary, Important and a pop-out to the glossary

* Share the account options' labels between their switches and badges
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.

1 participant