CyberCRI / learn-ext

WeLearn Browser Extension
https://welearn.cri-paris.org
MIT License
11 stars 1 forks source link

Edit extension to support Chinese #173

Open jmsevin opened 4 years ago

prashnts commented 4 years ago

hey jm! could you explain this a bit? the way extension is structured, we won't need to edit it to add chinese support!

When we request preprocessing the url, it returns the page language (using the langid module), so if it is chinese it'd work still. We just need to specify the new languages in server side LanguageEnum.

prashnts commented 4 years ago

this is where we make request to api in extension. as you can see it uses the language from response for everything moving forward.

https://github.com/CyberCRI/learn-ext/blob/d32fbb8b615354dafdc4ecf8207926684328f9d2/src/pages/popover/overlay.js#L90-L99