[openstreetmap/openstreetmap-website] language fallback problem in OSM website. (#2647)
notifications at github.com
Tue Jun 9 11:00:55 UTC 2020
> I suspect I know what's going on with the first case - because you have `ja` listed right at the end we preserve that as very low priority but as you don't have `ko` listed explicitly we will insert it after the last of the Korean variants (`ko-hani`) that you do have listed so it winds up taking priority over Japanese.
> If you didn't have `ja` listed explicitly then we would have inserted it after the last of the Japanese variants (`ja-hani`) which would then have been before `ko` in the list.
I see. Adding ko to the end of the list indeed changed the display language into ja instead.
> In the second case because you have Vietnamese variants listed we insert `vi` after the last of them as a fallback so that then gets selected as there are no other matches as I don't think `zh-Hans` will match at all.
I see, Thanks for your input.
> Probably because you have such a ridiculously insane language preference that you just break everything!
> In fact it looks like you have changed it again? That looks different to what you had before?
> The main problem is that there is competition between you listing every possible combination and our code trying to cater to more typical users by automatically generating additional likely matches based on what they do provide.
> My most recent change attempts to put explicit choices before generates choices in the list but maybe it's failing.
> I'll have a look when I can but this stuff is complicated and as you've demonstrated fixing one case often breaks others.
The general idea behind my language preference is Standard Traditional Chinese > Cantonese > Classical Chinese > Han script entry in other languages > English > Japanese, then within the Standard Traditional Chinese, the preference have been set to prefer Hong Kong form over unspecified form over the Taiwan form. And for English, it have been set to display HK>SG>GB>US regional variant name over unspecific English name. And then a number of different capitalization and different form of omission have been added in-between the list trying to catch cases where they have been input differently by editors. Apparently I have missed zh-Hans in the process.
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rails-dev