Lingua Libre SignIt translate a word in (French) Sign Language videos.
This extension allows you to translate a word into French sign language on any web page. When you read a text and come across a word you donβt know, highlight that word, right click and click on the Sign it icon: the sign in LSF and the definition of the word in French will appear on a window. If a word is not available in LSF, we invite you to record it with our easy-to-use webapp on https://lingualibre.org. The definitions come from the French Wiktionary to which you can also contribute: https://fr.wiktionary.org.
Manual install is possible for Chrome, Chromium. Should be eqully possible with Windows Edge.
Firefox note: install of Firefox via snap install are not compatible with npm web-ext due to path changes, please install Firefox from deb.
Clone the Repository and Install Dependencies:
git clone <repository-url>
cd <repository-directory>
npm install
Bump Version:
package.json
and manifest.json
, e.g., change 1.0.12
to 1.0.13
.Build the Firefox Extension:
npm run web-ext:build
.zip
file.bin is not recognized as an internal or external command, operable program or batch file
, use Git Bash to run the following command:
chmod +x bin/build.sh
Test the Extension in Browsers:
npm run web-ext:test-firefox
npm run web-ext:test-chromium
package.json
.See also Mozillaβs web-ext
about:debugging#/runtime/this-firefox
> Section Temporary extensions
: βLingua Libre SignItβ > Click Inspect
. See also: inspect Firefox extension.chrome://extensions/
> Find βLingua Libre SignItβ : click Inspect views service worker
or `Errorsabout:debugging#/runtime/this-firefox
> Load temporary Add-on
: load ./dist/lingua_libre_signit-{latest}.zipchrome://extensions/
> Click Load unpacked
: find SignIt root directory.
βββ _locales/ (inactive)
βββ manifest.json (v.3) β defines extensions and dependencies rights.
βββ background-script.js β main script (Firefox browser).
βββ sw.js β main script (Chromium browsers).
βββ SignItCoreContent.js β creates duo panels "Video | Definition"
βββ SignItVideosGallery.js β given urls, creates gallery of videos.
βββ SignItVideosIframe.html β contains intermediate iframe for videos and twsospeed feature.
βββ content_scripts/
| βββ signit.js β creates above text SignIt popup
| βββ wpintegration.js β on wikimedia sites, if page's title has a sign language video available, then display smartly.
βββ popup/
βββ popup.js β creates top bar SignIt icon's popup, with search, history and settings.
βββ SearchWidget.js β handle the search queries
Chrome web store had started deprecating the web extensions with manifest version 2 and since we were moving to chrome for bigger market share , we had to migrate our extension as per MV3 in order to publish it. Below are a few points on the achievements , challenges faced and hurdles that still persist :-
popup.js
messages have been passed for various functions that are present in sw.js
or background-script.js
, well i.e., because popup and other content scripts no longer have context of background page which happened to be the case in MV2.banana.i18n
, message passing is used. Reason being , earlier we could fetch banana when we fetched the context of background page using browser.rutime.getBackgroundPage()
,but since we can no longer do that , message passing seemed the only right option. Setback of using this approach is that things become asynchronous , and you have to await
until the message is fulfilled. It did become problematic when working inside constructor functions. Still has a lot of room for improvement and it is something that should be worked upon in future.While there were other options like making your own i18n function , based on the arguments received from sw.js
, but that was a repetitive task when using i18n inside multiple files.
Other option was to use browser.i18n
native API. This was an ok option but didnβt allow users to change to their desired language , only changed them when browserβs language was different. For someone who didnβt want the extension to run in his native language or wanted to run it in different language had no control.
declarativeNetRequest
API was certainly an alternative but it is not yet fully functional. We canβt append headers , not even a single one despite being mentioned in docs.We look for volunteers:
| Wikimedia Foundation | Wikimedia France | URFIST Occitanie | Google Summer of Code |:β-:|:β-:|:β-:|:β-:| | 2016-present | 2018 | 2023-2024 | 2024 | | | |
Lingua Libre | Wiktionary | Wikidata | Wikimedia Commons |
---|---|---|---|