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.
- Firefox > Open: https://addons.mozilla.org/en-US/firefox/addon/lingua-libre-signit/ > Install.
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:
- Edit
package.json
andmanifest.json
, e.g., change1.0.12
to1.0.13
.
- Edit
-
Build the Firefox Extension:
npm run web-ext:build
- This will build the Firefox extension into an installable
.zip
file. - Note for Windows Users: If you encounter the error
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
- This will build the Firefox extension into an installable
-
Test the Extension in Browsers:
- Firefox:
npm run web-ext:test-firefox
- Chromium:
npm run web-ext:test-chromium
- These commands will open the web browsers with the latest development version of SignIt and the URL defined in
package.json
.
- Firefox:
See also Mozilla's web-ext
- Firefox > Open url
about:debugging#/runtime/this-firefox
> SectionTemporary extensions
: "Lingua Libre SignIt" > ClickInspect
. See also: inspect Firefox extension. - Chromium > Open url
chrome://extensions/
> Find 'Lingua Libre SignIt' : clickInspect views service worker
or `Errors
- Firefox > Open url
about:debugging#/runtime/this-firefox
>Load temporary Add-on
: load ./dist/lingua_libre_signit-{latest}.zip - Chromium > Open url
chrome://extensions/
> ClickLoad 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 :-
- In
popup.js
messages have been passed for various functions that are present insw.js
orbackground-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. - i18n : Even for
banana.i18n
, message passing is used. Reason being , earlier we could fetch banana when we fetched the context of background page usingbrowser.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 toawait
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.
- iframe instead of video tag : This fix was made so that extension could work on sites with stricter CSPs like github or X.
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:
- Co-owners, JS developers
- Signers
- Github: Lingua-libre/SignIt/Issues β tickets manager
- Github: Lingua-libre/SignIt β code (JS)
- Translate SignIt's user interface
- :meta:Lingua Libre/SignIt β Wikimedia project page with mission statement.
- Lingualibre.org > Recording Studio β online tool to record words, once you specify a sign language, you can record videos of signed word at 400 per hour. They will be automatically available to SignIt.
- Lingua Libre SignIt for Firefox β a browser extension to click words in browser and show sign language videos generated via Lingualibre.
Wikimedia Foundation | Wikimedia France | URFIST Occitanie | Google Summer of Code |
---|---|---|---|
2016-present | 2018 | 2023-2024 | 2024 |
Lingua Libre | Wiktionary | Wikidata | Wikimedia Commons |
---|---|---|---|