Please open new issues in https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox&component=Translation
Firefox Translations was a WebExtension that enabled client side in-page translations for web browsers.
Firefox Translations was developed with The Bergamot Project Consortium, coordinated by the University of Edinburgh with partners Charles University in Prague, the University of Sheffield, University of Tartu, and Mozilla. This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 825303. 🇪🇺
The current release version is available for installation on Mozilla Add-ons
Follow the steps below to install the extension on Firefox Nightly or Beta for Android:
Create a collection on AMO
(we already provide a collection here) and starting from the section Enable general extension support setting in Nightly
17436609
in the Collection owner
field, and fxt
in the Collection name
field Add-ons
+
icon to have it installedCustom Addon-on collection
, just by clicking at it and clearing the fields, so you could have the stock addons listed again. You can test nightly builds of the extension in Firefox Nightly or Developer Edition in one of the supported languages by following the steps below:
about:config
in the navigation bar and set the following preferences: xpinstall.signatures.required to false
extensions.experiments.enabled to true
https://user-images.githubusercontent.com/973388/205549475-8036df98-d5b5-4baa-af8f-350f7962f18e.mov
You can test the addon on Android by following the steps below:
npm install
adb shell pm grant org.mozilla.fenix android.permission.READ_EXTERNAL_STORAGE
in your terminal so the addon could be pushed to your phoneadb devices
in your terminal, copy the device id, and replace the string <device id from adb devices>
on package.json by itnpm run android -- --android-device=<ANDROID_DEVICE_ID>
in your terminal to install the addon in your phone and have the browser automatically started (or npm run android-win -- --android-device=<ANDROID_DEVICE_ID>
if developing on a Windows system) That should be enough to have the addon installed on Firefox in your Android. Folow the steps in the video below to learn how to use it.
https://user-images.githubusercontent.com/973388/222513958-89a51f7c-985a-45ee-94f6-c78a31e20a2e.mp4
The extension does not utilize any npm modules, and the only vendored dependencies within are:
Bergamot Translator
Fasttext
Sentry
serialize-error
npm install
npm run once
and wait until Nightly startsabout:config
and set extensions.experiments.enabled
to trueAfter adding new metrics to extension/model/telemetry/metrics.yaml
or pings to extension/model/telemetry/pings.yaml
, run
bash scripts/update-telemetry-schema.sh
to regenerate JS telemetry schema.
Replace
extension/controller/translation/bergamot-translation-worker.js
extension/model/static/translation/bergamot-translator-worker.wasm
with the new artifacts and then execute:
bash scripts/update-bergamot-translator.sh
to regenerate JS version file. This version is reported in telemetry.