[Webkit-unassigned] [Bug 89639] [EFL] Change format of return value of navigator.language
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Jun 24 21:41:23 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=89639
--- Comment #13 from Raphael Kubo da Costa (rakuco) <rakuco at webkit.org> 2012-06-24 21:41:22 PST ---
(From update of attachment 149154)
View in context: https://bugs.webkit.org/attachment.cgi?id=149154&action=review
>>> Source/WebCore/ChangeLog:8
>>> + Change format of return value of navigator.language from xx-XX.UTF-8 to xx-XX.
>>
>> You need to explain why you are doing this. Please also note that 'UTF-8' is not hardcoded, it just happens to be the encoding you are using on your system. A more generic description would be along the lines of "Remove the encoding from the language returned by navigator.language".
>>
>> The `language' attribute of the navigator object does not seem to be part of any standard, so different browsers seem to return different values anyway. Do you know if "en-US" is currently more common than "en", for example?
>
> I think there is no correct answer for this now.
> But there is no browser displaying encoding with language.
> IMHO, It is better to remove encoding.
> xx(en) : Chrome(win/mac), Opera(all).
> xx-XX(en-US) : Firefox(all), Chrome(linux), safari(win).
> xx-xx(en-us) : safari(mac).
OK thanks, that's what I asked. In this case, it makes more sense to return "en-US" instead of just "en" indeed.
>>> Source/WebCore/ChangeLog:11
>>> + Test: platform/efl/fast/js/navigator-language.html
>>
>> I object to copying this test from Qt; it was moved to platform/qt in r113892 because it apparently tested something which was relevant only to that port.
>
> Did you mean we don't need to add this test case to the EFL?
Yes, I don't like keeping two almost identical copies of the same test in the tree; if the test also applies to ports other than Qt, it should be moved back to fast/js with a proper explanation (and perhaps skipped in ports where it does not make sense), otherwise another, specific test should be written.
> Source/WebCore/platform/efl/LanguageEfl.cpp:47
> + size_t position = locale.find('-');
Shouldn't you be looking for '_' here?
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list