Closed Bug 1840702 Opened 3 years ago Closed 2 months ago

Dynamically update the language list when new models are released

Categories

(Firefox :: Translations, defect)

Desktop
Unspecified
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: anatal, Unassigned)

Details

After the Hungarian to English model was approved in Remote Settings, the translation icon started to be displayed in Hungarian pages along the option to download the models on about:preferences, but Hungarian wasn't listed as an option in the source language dropdown in the translation popup, which remained empty, and it started to be displayed only after the browser was restarted.

Severity: -- → S3

Probably we are not refreshing the list on a cron. We are not going to ship new languages too frequently, so we can consider this even lower severity than S3.

Severity: S3 → S4

The UI is cached. We should invalidate and rebuild it when updates are received from remote settings.

The remote settings are updated here: https://searchfox.org/mozilla-central/rev/b60cb73160843adb5a5a3ec8058e75a69b46acf7/toolkit/components/translations/actors/TranslationsParent.sys.mjs#975-1020

Since this code is in toolkit, we'll need to dispatch some kind of event that the UI can listen to, similar to the language state:

https://searchfox.org/mozilla-central/rev/b60cb73160843adb5a5a3ec8058e75a69b46acf7/toolkit/components/translations/actors/TranslationsParent.sys.mjs#2632-2640

The language list is built here: https://searchfox.org/mozilla-central/rev/b60cb73160843adb5a5a3ec8058e75a69b46acf7/browser/components/translations/content/TranslationsPanelShared.sys.mjs#67

It is done lazily on the first open.

Summary: Source language in the translations popup is not being displayed after a new model is released → Dynamically update the language list when new models are released

I believe that this has long been fixed.

Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.