French localisation & language selection to IMAGE UI
This is a part of #327
Changes made:
Multilang localisation
Refactored hardcoded text into locale messages:
Rendering options
Advanced options
Developer Mode
"Cancel" & "Save Changes" buttons
Misc. texts: Server, Developer Mode Description
Translated English locale messages to French
Added class="localisation" to be able to obtain a list of text fields from option.ts
Changed IDs of labels for consistency throughtout the locale messages files
Add
Language Selection
Added Language selection field to UI with drop-down box with 3 options: Automatic, English, French
Added async function to get user's language selection from extension
Added warning messages indicating limitation to non-English rendering options.
Other changes
Made cursor become a pointer when hover through "Cancel" or "Save Changes" buttons.
Minor formatting in options.html for visual and consistency.
Testings
In order for "Automatic" Language selection mode to work, browser's locale must be set to user's desire language. Follow guide here chrome.i18n How to set browser's locale
(Linux) E.g. I use Vivaldi browser on Arch Linux. To change browser's locale, I must change the $LANGUAGE environment variable. Because I never set it in /etc/environment, I must do: (different Linux distros may have different solution)
$ export LANGUAGE="fr" # only works for 1 terminal session
$ vivaldi-stable
The extension in Automatic Language mode will follow the browser's locale language, "en" xor "fr". Test on any graphic and verify.
NOTE: I accidentally pushed a commit that does not belong to this PR/branch; hence, should explains the force push above. The accidental commit is now cherry-picked to #330. Apologies :(
French localisation & language selection to IMAGE UI
Changes made:
Multilang localisation
class="localisation"
to be able to obtain a list of text fields fromoption.ts
Language Selection
async
function to get user's language selection from extensionOther changes
options.html
for visual and consistency.Testings
$LANGUAGE
environment variable. Because I never set it in/etc/environment
, I must do: (different Linux distros may have different solution)