• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

mozilla-extensions/firefox-translations: This is a mirror of https://github.com/ ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

mozilla-extensions/firefox-translations

开源软件地址:

https://github.com/mozilla-extensions/firefox-translations

开源编程语言:

JavaScript 98.8%

开源软件介绍:

Build CodeQL End-to-End Tests Firefox Translations - Install Nightly CODE OF CONDUCT LICENSE

Firefox Translations

Firefox Translations is a WebExtension that enables client side in-page translations for web browsers.

Testing

Nightly builds

You can test nightly builds of the extension in Firefox Nightly or Developer Edition in one of the languages supported by following the steps below:

  • Type about:config in the navigation bar and set the following preferences:
    xpinstall.signatures.required to false
    extensions.experiments.enabled to true
  • Then install the extension by clicking here Firefox Translations - Install Nightly
  • You may need to restart your browser and Firefox Translations will be ready to use. Just browse to a website in one of the languages supported and the option to translate should be displayed.

Development

3rd party dependencies

The extension does not utilize any npm modules, and the only vendored dependencies within are:

  • Bergamot Translator

    • A WebAssembly wrapper around the actual Neural Machine Translator, Marian. The code to build the WASM module can be found on its repository
  • Fasttext

    • We bundle the WebAssembly port of fasttext along its compressed model in order to detect the page's language. Instructions to build the WebAssembly module can be found here
  • Sentry

  • serialize-error

    • code of serialize-error npm package is bundled for serialization of exceptions to report errors from content scripts to background script

How to run

Updating telemetry schema

After 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.

Updating bergamot-translator WASM module

Replace

  • extension/controller/translation/bergamot-translation-worker.js
  • extension/controller/translation/bergamot-translator-worker-without-wormhole.js
  • extension/model/static/translation/bergamot-translator-worker-with-wormhole.wasm
  • extension/model/static/translation/bergamot-translator-worker-without-wormhole.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.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap