Bug 1882542 - Eagerly Calculate an Initial Translation Download Size
commit8b1a4d734e2d6e4a9254f73fd9cad91462b4fd12
authorohall-m <ohall@mozilla.com>
Thu, 29 Feb 2024 16:48:01 +0000 (29 11:48 -0500)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 4 Mar 2024 19:08:20 +0000 (4 19:08 +0000)
tree50b3d277eb4ae88c520d855423333896b78e48be
parent67d2218fce039862c429fd12c9eaaf149fd8c24d
Bug 1882542 - Eagerly Calculate an Initial Translation Download Size

This bug adds:
* When `TranslateExpectedAction` occurs, then calculate the expected
translations model download size.

More background: `TranslateExpectedAction` indicates we have a default
`from` (page language) and a default `to` (user preferred) language
to initialize the translations dialog with expected values.

This queries how large of a download the translation
pair will be eagerly, so we have an initial value for the default recommendation.
mobile/android/android-components/components/browser/state/src/main/java/mozilla/components/browser/state/engine/middleware/TranslationsMiddleware.kt
mobile/android/android-components/components/browser/state/src/test/java/mozilla/components/browser/state/engine/middleware/TranslationsMiddlewareTest.kt