diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
commit | 8dd16259287f58f9273002717ec4d27e97127719 (patch) | |
tree | 3863e62a53829a84037444beab3abd4ed9dfc7d0 /mobile/android/modules/geckoview/GeckoViewTranslations.sys.mjs | |
parent | Releasing progress-linux version 126.0.1-1~progress7.99u1. (diff) | |
download | firefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz firefox-8dd16259287f58f9273002717ec4d27e97127719.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | mobile/android/modules/geckoview/GeckoViewTranslations.sys.mjs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/mobile/android/modules/geckoview/GeckoViewTranslations.sys.mjs b/mobile/android/modules/geckoview/GeckoViewTranslations.sys.mjs index 7e74e7bf30..45b43ac9f9 100644 --- a/mobile/android/modules/geckoview/GeckoViewTranslations.sys.mjs +++ b/mobile/android/modules/geckoview/GeckoViewTranslations.sys.mjs @@ -50,8 +50,11 @@ export class GeckoViewTranslations extends GeckoViewModule { aData.toLanguage ); try { - this.getActor("Translations").translate(fromLanguage, toLanguage); - aCallback.onSuccess(); + this.getActor("Translations") + .translate(fromLanguage, toLanguage) + .then(() => { + aCallback.onSuccess(); + }); } catch (error) { aCallback.onError(`Could not translate: ${error}`); } @@ -101,10 +104,11 @@ export class GeckoViewTranslations extends GeckoViewModule { type: "GeckoView:Translations:Offer", }); break; - case "TranslationsParent:LanguageState": + case "TranslationsParent:LanguageState": { const { detectedLanguages, requestedTranslationPair, + hasVisibleChange, error, isEngineReady, } = aEvent.detail.actor.languageState; @@ -112,6 +116,7 @@ export class GeckoViewTranslations extends GeckoViewModule { const data = { detectedLanguages, requestedTranslationPair, + hasVisibleChange, error, isEngineReady, }; @@ -120,7 +125,9 @@ export class GeckoViewTranslations extends GeckoViewModule { type: "GeckoView:Translations:StateChange", data, }); + break; + } } } } |