Open sahuguet opened 4 years ago
yes, would love if you can help with this, otherwise it's on the list of issues to do :)
See https://github.com/tconley/screencovid.com/pull/23 .
I was NOT allowed to create a new branch and a PR. I updated my fork and created a PR from it.
I love the new infographics :-)
@sage-t @sahuguet I think it would be great for usability if on the menu bar there is a flag icon that represents the language, and user can click to change language directly from there. https://dribbble.com/shots/2386084-Language-Selection-Modal ?
Also, we could use the browser preferences to detect the language on initial visit https://developer.mozilla.org/en-US/docs/Web/API/NavigatorLanguage/language
All are good suggestions.
Keeping the ?lang attribute is important. A very common use-case is to distribute a link, e.g. via a tweet. Based on your audience, the language of the tweet and the link will be different.
agreed the ?lang get url is great
We also need translation for this part
if (totalscore > 212) {
$("#results").text("Your score of " + totalscore.toFixed(1) + " indicates that you should consult a doctor immediately");
} else {
$("#results").text("Your score of " + totalscore.toFixed(1) + " is below the threshold for COVID-19 pre-screening. However, if you have Difficulty Breathing, Chest Pain, Pressure, or Irregular Heartbeat, Bluish Lips, or Confusion, you should seek medical attention immediately.");
}
I'll work on these UI changes and automatic language detection tonight.
I sent a PR, pretty straightforward. But there seems to be some conflicts.
I still need to work to incorporate @sahuguet latest fix.
I'll work on these UI changes and automatic language detection tonight.
@sage-t - any progress? I've incorporated the other requests at this point. Make sure to grab the latest version as there's been lots of changes.
I've got language auto-detection working, tested by setting my browser to chinese and then it took me 15 minutes to figure out how to get it back to english.
I created a PR to add the flags, I'm working on highlighting the current language in the UI selectors still but that shouldn't take too long
Done!
great work @sage-t !
Is there a plan to provide translations for other languages?
https://github.com/guillaumepotier/gettext.js/ could be an easy way to doing that. I could not find a good jQuery-specific way of achieving this.
Thoughts?