Add a display-language setting, so the extension can speak a language other than Thunderbird's #8

Open
opened 2026-10-01 07:21:57 +00:00 by tiagoagueda · 0 comments
Owner

The list asks: "On plugin settings, enable display language override."

The skeleton speaks the language Thunderbird is set to. Every sentence comes through t() in src/lib/i18n.js, which is the browser extension's file and asks Thunderbird's own i18n.getMessage. That call follows the application's language and cannot be told to use another.

What the extension should do

  • A setting on the settings page: "Follow Thunderbird" first, then the languages the extension ships, each named in itself with its own lang attribute. Kept in storage.local, as the address and the token are.
  • The loader is the browser extension's. postulo/postulo-chromium#11 proposes loading the chosen catalogue from the extension's own files and resolving sentences by the same rules. src/lib/i18n.js is shared, so that work arrives here through npm run shared:sync; this issue is the setting, and checking the loader works in Thunderbird.
  • The popup, the settings page and any window of the extension's follow the choice, and say their language and direction from the chosen catalogue.
  • The tooltips of the two buttons follow it too, through action.setTitle and messageDisplayAction.setTitle.

Decisions

  • What cannot follow. The description in Thunderbird's list of add-ons comes from the manifest and stays in Thunderbird's language. Recommended: accept it, and say so under the setting.
  • Postulo's own sentences. A refusal Postulo words (a 403, a 422) follows the Accept-Language the request carries. Recommended: send the chosen language's tag, as postulo/postulo-chromium#11 proposes.
  • Stored as a tag. Recommended: the canonical BCP 47 tag (pt-PT), never a folder name (postulo/postulo#337).

Needs from the server

Not filed on postulo/postulo. A "same as my Postulo" choice would need the account's language from the API, which no call returns.

Done when

  • The settings page offers "Follow Thunderbird" and every shipped language; choosing one switches the popup and the settings page, and survives a restart.
  • With "Follow Thunderbird", nothing changes from today.
  • test/i18n.test.mjs requires every new key in every language the extension ships, with identical placeholders: three today, more once #7 lands.

From the list of Thunderbird extension improvements of 2026-09-30.

The list asks: "On plugin settings, enable display language override." The skeleton speaks the language Thunderbird is set to. Every sentence comes through `t()` in `src/lib/i18n.js`, which is the browser extension's file and asks Thunderbird's own `i18n.getMessage`. That call follows the application's language and cannot be told to use another. ## What the extension should do - **A setting** on the settings page: "Follow Thunderbird" first, then the languages the extension ships, each named in itself with its own `lang` attribute. Kept in `storage.local`, as the address and the token are. - **The loader is the browser extension's.** postulo/postulo-chromium#11 proposes loading the chosen catalogue from the extension's own files and resolving sentences by the same rules. `src/lib/i18n.js` is shared, so that work arrives here through `npm run shared:sync`; this issue is the setting, and checking the loader works in Thunderbird. - The popup, the settings page and any window of the extension's follow the choice, and say their language and direction from the chosen catalogue. - The tooltips of the two buttons follow it too, through `action.setTitle` and `messageDisplayAction.setTitle`. ## Decisions - **What cannot follow.** The description in Thunderbird's list of add-ons comes from the manifest and stays in Thunderbird's language. Recommended: accept it, and say so under the setting. - **Postulo's own sentences.** A refusal Postulo words (a 403, a 422) follows the `Accept-Language` the request carries. Recommended: send the chosen language's tag, as postulo/postulo-chromium#11 proposes. - **Stored as a tag.** Recommended: the canonical BCP 47 tag (`pt-PT`), never a folder name (postulo/postulo#337). ## Needs from the server Not filed on postulo/postulo. A "same as my Postulo" choice would need the account's language from the API, which no call returns. ## Done when - The settings page offers "Follow Thunderbird" and every shipped language; choosing one switches the popup and the settings page, and survives a restart. - With "Follow Thunderbird", nothing changes from today. - `test/i18n.test.mjs` requires every new key in every language the extension ships, with identical placeholders: three today, more once #7 lands. From the list of Thunderbird extension improvements of 2026-09-30.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Postulo/postulo-thunderbird#8
No description provided.