Bug 1968 - (int-91572/int-121261) Accept-Language based on "Regional settings" instead of "Device language"
(int-91572/int-121261)
: Accept-Language based on "Regional settings" instead of "Device language"
Status: RESOLVED FIXED
Product: Browser
MicroB engine
: 5.0-beta
: All Maemo
: Low normal (vote)
: 5.0 (1.2009.41-10)
Assigned To: Oleg Romashin
: microb-bugs
: http://maps.google.com/
: easyfix
:
:
  Show dependency tree
 
Reported: 2007-09-04 00:21 UTC by Henri Sivonen
Modified: 2009-06-24 16:11 UTC (History)
3 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Henri Sivonen (reporter) 2007-09-04 00:21:34 UTC
MicroB 0.0.8-3

EXPECTED OUTCOME:
Expected the HTTP layer to advertise Accept-Language: en-US and expected to see
Google Maps in English. Expected the Accept-Language value to be picked based
on the UI language.

ACTUAL OUTCOME:
The HTTP layer advertises Accept-Language: sv and Google Maps shows up in
Swedish. The Accept-Language value is picked based on number format settings.

STEPS TO REPRODUCE THE PROBLEM:
1. Go to Control Panel > Personalization > Language and Region.
2. Choose English (USA) as the device language.
3. Choose Svenska (Sverige) as regional settings in order to get sensible
ISO-compliant date and time formats.
4. Reboot.
5. Load http://maps.google.com/ in the MicroB engine.
6. Load http://www.delorie.com:81/some/url.txt
Comment 1 timeless 2008-07-18 18:27:54 UTC
http://mxr.maemo.org/garage/search?string=language&find=microb-eal&filter=^[^\0]*$

http://mxr.maemo.org/garage/source/browser/mozilla/trunk/microb-eal/src/gmozillaweb.c#723

seems to be the right file. posting a patch might get it fixed sooner.

so the function is g_mozilla_web_set_language
2052     gchar *lang = getenv("LANG");
2053     g_mozilla_web_set_language (self, lang ? lang :
getenv("LC_MESSAGES"));

and it uses "LANG" or "LC_MESSAGES" a patch to make it use something else would
speed things up :)
Comment 2 Andre Klapper maemo.org 2008-11-03 21:30:15 UTC
Confirming.
Comment 3 Faheem Pervez maemo.org 2008-11-10 22:55:41 UTC
(In reply to comment #1)
> http://mxr.maemo.org/garage/search?string=language&find=microb-eal&filter=^[^\0]*$
> 
> http://mxr.maemo.org/garage/source/browser/mozilla/trunk/microb-eal/src/gmozillaweb.c#723
> 
> seems to be the right file. posting a patch might get it fixed sooner.
> 
> so the function is g_mozilla_web_set_language
> 2052     gchar *lang = getenv("LANG");
> 2053     g_mozilla_web_set_language (self, lang ? lang :
> getenv("LC_MESSAGES"));
> 
> and it uses "LANG" or "LC_MESSAGES" a patch to make it use something else would
> speed things up :)
> 

LC_MESSAGES should be used instead of LANG. After following the steps to
reproduce, LC_MESSAGES is the only variable which remains correctly as en_US.

"locale" output after setting language to English (USA) & regional setting to
Swedish:

LANG=sv_SE
LC_CTYPE="sv_SE"
LC_NUMERIC="sv_SE"
LC_TIME="sv_SE"
LC_COLLATE="sv_SE"
LC_MONETARY="sv_SE"
LC_MESSAGES=en_US
LC_PAPER="sv_SE"
LC_NAME="sv_SE"
LC_ADDRESS="sv_SE"
LC_TELEPHONE="sv_SE"
LC_MEASUREMENT="sv_SE"
LC_IDENTIFICATION="sv_SE"
LC_ALL=
Comment 4 Andre Klapper maemo.org 2009-04-23 17:42:04 UTC
WONTFIX for Diablo (not important enough). Should be tested again in Fremantle
once that's possible.
Comment 5 Javier Jardón 2009-04-26 21:37:07 UTC
Still valid for 4.1.3 (5.2008.43-7) maemo version
Comment 6 Andre Klapper maemo.org 2009-06-24 16:11:58 UTC
This issue has been FIXED in the internal Fremantle version.

Unfortunately this is a WONTFIX for Diablo as Diablo is in maintenance mode and
Nokia will only provide bugfixes for critical issues if at all.
For your interest the Mer project aims to provide a community backport of
Fremantle for N8x0 devices. See http://wiki.maemo.org/Mer for more information.