[Webkit-unassigned] [Bug 89639] [EFL] Change format of return value of navigator.language

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 25 00:26:14 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=89639





--- Comment #14 from Kihong Kwon <kihong.kwon at samsung.com>  2012-06-25 00:26:12 PST ---
(In reply to comment #13)
> (From update of attachment 149154 [details])
> 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.

Basically, you are absolutely right.
But, in this case, return value of navigator.language is different in each ports.
For example, chromium-win port never pass this test case because of difference of return value.
Therefore, I think it is better test case adds under platform/efl.
(I can simplify my test case but it is not much different with qt because this is very simple patch and test.(Actually I don't think this test is really needed.)
How do you think about this?

> 
> > Source/WebCore/platform/efl/LanguageEfl.cpp:47
> > +    size_t position = locale.find('-');
> 
> Shouldn't you be looking for '_' here?
OK. It was my mistack. I will fix it.

-- 
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