Country flag doesn't display in ColorMyWorld on Windows
On Windows countries flags don't appear in popup when there is a click on the country. The country code is displayed instead.
Works on other OS.
Let me work on this issues
the problem lies with the icons in /activities/ColorMyWorld.activity/lib/flag.js
IN WINDOWS
IN LINUX
open up the flag.js in github (browser)
in windows you see the country code but in linux its icons
""" Flag emojis often don't work properly on Windows because Microsoft has deliberately chosen not to include support for them in their standard emoji font, meaning that when you try to display a flag emoji, it won't render correctly, usually appearing as the country code letters instead of the visual flag image; this decision is likely due to the complexities of representing all country flags accurately and potentially sensitive political issues surrounding certain flags. """
source: google
My idea on fixing this problem will be to use country images
Have a folder /flag which as all the flags and use that to render the flags in the humane.log
Found 2 sources for flags
- https://hampusborgos.github.io/country-flags/
- https://flagpedia.net/download or share your preferred source
if this fix is ok for you please reply with the source that you prefer i will start to work on it
On Windows countries flags don't appear in popup when there is a click on the country. The country code is displayed instead.
Works on other OS.
There could be 2 solutions:
- To fetch the flags online ( Example api : https://flagcdn.com/ )
- Another approach using SVG flags instead of emoji flags which will work consistently across all platforms including Windows.
Ig the second approach will be better as it will maintain a consistency on all the platforms the only issue in this approach that i can feel is that this might increase the number of svgs to handle to a greater extent, but if this is fine with you it can be worked upon.
What are you thougts on this @llaske ?
I've read this notice regarding the Microsoft decision to not include flag emoji. So we have no choice to use images instead.
Three important things however:
- Images should use a free/libre/open source licence, it seems to be the case for Flagpedia : https://flagpedia.net/terms
- Images should be host in the activity. Sugarizer must be able to run without Internet access
- Images should be small: we don't want to add megabytes of images
Noted working on it
Merged in https://github.com/llaske/sugarizer/pull/1758