Closed Bug 1817084 Opened 2 years ago Closed 1 year ago

Remove old translations code

Categories

(Firefox :: Translations, task, P3)

task

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox116 --- fixed

People

(Reporter: gregtatum, Assigned: gregtatum)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files, 2 obsolete files)

With the new implementation, that old code can go away. This bug is for tracking that. I'd like to keep it in for a bit until we get some of the prototypes more settled.

Heads-up that the extension relies on some of that code, and if that gets removed, it would break it and leave users without any option if the integrated version is not being shipped yet.

I sent a patch removing some bits of UI in bug 1817053. I didn't touch anything else, but at least the first patch or something like that is needed to remove -moz-image-region (bug 1817071). I confirmed that the extension works just fine with those changes, is that all I need?

I discussed this with the team, and we're going to remove the code now, since there are two bugs touching the code now. We'll leave in the code the addon is relying on, and ensure that it works.

Assignee: nobody → gtatum
Priority: P3 → P2
Blocks: 1820214
Blocks: 1820240
No longer blocks: 1820240
Blocks: 1584605

In order to remove CLD2, we'll need to migrate to the new fastText language detector, which the translations infrastructure will rely upon. This will involve a download for the first time it is run, since we don't ship with the wasm blob or language models. This could cause a behavior change, or for the language detection to fail if the download fails. I'm going to block on Bug 1818603 now since this touches the language identification code.

Here is a searchfox search of consumers.

  • The extension API uses browser.i18n.detectLanguage.
  • Reader mode uses it to detect the article language.

:zombie, :mixedpuppy As module owners of the web extensions, do you have any issues with me moving to use our new language detection library? It's using fastText, and should provide more accurate results. The trade off is that it requires a download upon the first use.

I'm not seeing code owners around a decision for Reader Mode, so I'll rely on my reviewer.

The downloads for fastText are a 875k wasm, and 938k language model.

Flags: needinfo?(tomica)
Flags: needinfo?(mixedpuppy)

This directly effects a public extension API. If an extension calls the api, that can be the trigger to download a couple MB. What happens if there is no network connection? Why isn't this being bundled by default and only downloading to update?

Flags: needinfo?(mixedpuppy) → needinfo?(gtatum)
Flags: needinfo?(tomica)

That's a good point, we'll need to compare the binary size of swapping out the two systems. We can package using this method: https://firefox-source-docs.mozilla.org/services/settings/index.html#packaging-attachments

I'll bring this up in our next engineering sync on this project.

Flags: needinfo?(gtatum)

I'm not actively working on this, and we need to figure out the CLD2 -> fast text transition in order for this to happen.

Assignee: gtatum → nobody
Priority: P2 → P3
Attachment #9321125 - Attachment is obsolete: true
Attachment #9321124 - Attachment is obsolete: true

We should still do this, but I don't think it should be tied to the Desktop MVP launch.

No longer blocks: 1820214

Could this be scheduled for early H2, as it blocks completing the esm-ification work?

Flags: needinfo?(gtatum)

The old translations code was the last consumer of this code.

Depends on D181700

We're keeping CLD2 for now, but removing the old translations code.

Flags: needinfo?(gtatum)
Assignee: nobody → gtatum
Status: NEW → ASSIGNED
Attachment #9340527 - Attachment description: WIP: Bug 1817084 - Remove now unused Http.sys.mjs; r?nordzilla! → Bug 1817084 - Remove now unused Http.sys.mjs; r?nordzilla!
Attachment #9340400 - Attachment description: WIP: Bug 1817084 - Remove old translations code; r?nordzilla! → Bug 1817084 - Remove old translations code; r?nordzilla!
Pushed by gtatum@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8aa536206a69 Remove old translations code; r=settings-reviewers,fluent-reviewers,nordzilla,mconley,flod https://hg.mozilla.org/integration/autoland/rev/c7677f0d1451 Remove now unused Http.sys.mjs; r=nordzilla
No longer blocks: fx-translation
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
Depends on: 1844125
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: