Bug 559960 - [all Lang]Translation is not available with 3.6 release
[all Lang]Translation is not available with 3.6 release
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: firefox (Show other bugs)
13
All Linux
high Severity medium
: ---
: ---
Assigned To: Martin Stransky
Fedora Extras Quality Assurance
: i18n, Reopened
: 558226 (view as bug list)
Depends On:
Blocks: F13Blocker/F13FinalBlocker 581392
  Show dependency treegraph
 
Reported: 2010-01-29 08:39 EST by Praveen Arimbrathodiyil
Modified: 2013-06-17 00:07 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 580444 581392 (view as bug list)
Environment:
Last Closed: 2010-04-13 06:45:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
screenshot of firefox by default (217.38 KB, image/png)
2010-02-17 02:04 EST, Mamoru TASAKA
no flags Details
screenshot with setting LC_MESSAGES explicitly (180.83 KB, image/png)
2010-02-17 02:05 EST, Mamoru TASAKA
no flags Details
Another screenshot with setting LC_MESSAGES explicitly (179.73 KB, image/png)
2010-02-17 02:06 EST, Mamoru TASAKA
no flags Details
patch to firefox.in (1.14 KB, patch)
2010-02-24 08:52 EST, Martin Stransky
no flags Details | Diff
another fix (1.04 KB, patch)
2010-04-13 05:27 EDT, Martin Stransky
no flags Details | Diff

  None (edit)
Description Praveen Arimbrathodiyil 2010-01-29 08:39:34 EST
Description of problem:
Firefox does not start with Malayalam interface even though locale is set to ml_IN (other applications are correctly picking up the locale) and 3.6 release has Malayalam translations.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. select Malayalam locale from login screen
2. open firefox
3. observe interface language
  
Actual results:

firefox is started in English

Expected results:
firefox should choose the correct interface based on locale

Additional info:
I can see Malayalam langpack is installed /usr/lib64/firefox-3.6/langpacks/langpack-ml@firefox.mozilla.org by the rpm
Comment 1 A S Alam 2010-01-29 12:05:17 EST
Translation for any language is not working 
Tested with: hi_IN, fr_FR, de_DE, zh_TW

Version:
firefox-3.6.1-1.fc13
Comment 2 Mamoru TASAKA 2010-02-16 22:57:14 EST
Even in ja_JP.UTF-8 environment, with 
firefox-3.6.1-1.fc13.i686
xulrunner-1.9.2.1-1.fc13.i686

All menus are displayed in English.

One problem is that /usr/bin/firefox reads:
-----------------------------------------------------------------
   188      SHORTMOZLOCALE=`echo $LC_MESSAGES | sed "s|_\([^.]*\).*||g"`
   189      MOZLOCALE=`echo $LC_MESSAGES | sed "s|_\([^.]*\).*|-\1|g"`
   190  
   191      # Try to link global langpacks to an extension directory
   192      if [ -f $MOZ_LANGPACKS_DIR/langpack-${SHORTMOZLOCALE}@firefox.mozilla.org/chrome/$SHORTMOZLOCALE.jar ]; then
-----------------------------------------------------------------

However:
-----------------------------------------------------------------
[tasaka1@localhost ~]$ set | grep '^LANG'
LANG=ja_JP.UTF-8
[tasaka1@localhost ~]$ set | grep '^LC'
[tasaka1@localhost ~]$ echo $LC_MESSAGES

[tasaka1@localhost ~]$ locale
LANG=ja_JP.UTF-8
LC_CTYPE="ja_JP.UTF-8"
LC_NUMERIC="ja_JP.UTF-8"
LC_TIME="ja_JP.UTF-8"
LC_COLLATE="ja_JP.UTF-8"
LC_MONETARY="ja_JP.UTF-8"
LC_MESSAGES="ja_JP.UTF-8"
LC_PAPER="ja_JP.UTF-8"
LC_NAME="ja_JP.UTF-8"
LC_ADDRESS="ja_JP.UTF-8"
LC_TELEPHONE="ja_JP.UTF-8"
LC_MEASUREMENT="ja_JP.UTF-8"
LC_IDENTIFICATION="ja_JP.UTF-8"
LC_ALL=
---------------------------------------------------------------------

i.e. LC_MESSAGES is empty, only LANG=ja_JP.UTF-8 is set by default.

However even after I set LC_MESSAGES=ja_JP.UTF-8 ; search engine still
show entries for English users (i.e. for Japanese search engine list
should show Wikipedia(ja), however search engine list still shows
Wikipedia(en))
Comment 3 Mamoru TASAKA 2010-02-17 02:04:22 EST
Created attachment 394688 [details]
screenshot of firefox by default

Some screenshot

By default, only LANG=ja_JP.UTF-8 is set. With this,
firefox shows menus and so on all in English.
Comment 4 Mamoru TASAKA 2010-02-17 02:05:23 EST
Created attachment 394689 [details]
screenshot with setting LC_MESSAGES explicitly

With setting LC_MESSAGES=ja_JP.UTF-8 firefox shows Japanese
menus.
Comment 5 Mamoru TASAKA 2010-02-17 02:06:57 EST
Created attachment 394690 [details]
Another screenshot with setting LC_MESSAGES explicitly

However search engine still shows entries for English users.
For example search engine shows "Wikipedia (en)" entry, not
"Wikipedia (ja)" entry.
Comment 6 Martin Stransky 2010-02-17 02:16:26 EST
see https://bugzilla.redhat.com/show_bug.cgi?id=441973 we switched from $LANG to $LC_MESSAGES.
Comment 7 fujiwara 2010-02-17 02:29:33 EST
> see https://bugzilla.redhat.com/show_bug.cgi?id=441973 we switched from $LANG
to $LC_MESSAGES.

If you use the shell script to detect locales, I think it's better to follow setlocale(3).

MOZLOCALE=$LC_ALL
MOZLOCALE=${MOZLOCALE:-LC_MESSAGES}
MOZLOCALE=${MOZLOCALE:-LANG}
MOZLOCALE=`echo $MOZLOCALE | sed "s|_\([^.]*\).*|-\1|g"`
Comment 8 fujiwara 2010-02-17 02:33:14 EST
typo:
-MOZLOCALE=${MOZLOCALE:-$LC_MESSAGES}
+MOZLOCALE=${MOZLOCALE:-$LC_MESSAGES}
Comment 9 Martin Stransky 2010-02-24 08:32:12 EST
*** Bug 558226 has been marked as a duplicate of this bug. ***
Comment 10 Martin Stransky 2010-02-24 08:52:05 EST
Created attachment 396064 [details]
patch to firefox.in
Comment 11 Martin Stransky 2010-02-24 09:13:51 EST
Added to firefox-3.6.1-2.fc14
Comment 12 drago01 2010-02-27 07:15:33 EST
(In reply to comment #11)
> Added to firefox-3.6.1-2.fc14    

Can we get this change into f13 too?
Comment 13 Bug Zapper 2010-03-15 10:17:36 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 13 development cycle.
Changing version to '13'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 14 Martin Stransky 2010-03-18 09:11:01 EDT
Already in firefox-3.6.1-2.fc13, closing.
Comment 15 drago01 2010-03-20 07:54:39 EDT
(In reply to comment #14)
> Already in firefox-3.6.1-2.fc13, closing.    

You have to push it as an update (same as you would do in F12) or it will only sit in koji.
Comment 16 A S Alam 2010-03-25 22:40:31 EDT
with today's update,
firefox-3.6.2-1.fc13.x86_64 is still not translated
Comment 17 fujiwara 2010-03-26 00:13:19 EDT
(In reply to comment #16)
> firefox-3.6.2-1.fc13.x86_64 is still not translated    

In my env, the same firefox is translated with LANG= ja_JP.utf8, de_DE.utf8 and
fr_FR.utf8.
Comment 18 A S Alam 2010-03-26 01:00:11 EDT
sorry about raw comment #16, 

following is Not working while upstream released [1]:
bn_IN
zh_TW
zh_CN
gu_IN
hi_IN
nn_NO
pt_BR
pt_PT
pa_IN
es_AR
es_ES

it seems there is issue with locale name (LL-RR)
Mozilla upstream releases use "-" (pt-BR) instead of "_" (pt_BR)

which is not with glibc with following warning

"Gtk-WARNING **: Locale not supported by C library.
	Using the fallback 'C' locale"

Test Case:
1. LANG=pt_BR.UTF-8 firefox , result - firefox will be in English
2. LANG=pt-BR.UTF-8 firefox, result - firefox will be in pt_BR, but glibc error.


[1] http://www.mozilla.com/en-US/firefox/all.html
Comment 19 fujiwara 2010-03-26 01:26:10 EDT
I guess the latest issue might be another regression bug.

--- /usr/bin/firefox.orig	2010-03-26 14:12:18.000000000 +0900
+++ /usr/bin/firefox	2010-03-26 14:23:22.000000000 +0900
@@ -191,7 +191,7 @@
     # Try without a local variant first, then with a local variant
     # So that pt-BR doesn't try to use pt for example
     SHORTMOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*||g"`
-    MOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*|-\1|g"`
+    MOZLOCALE=`echo $CURRENT_LOCALE | sed "s|\(.*\)_\([^.]*\).*|\1-\2|g"`
 
     # Try to link global langpacks to an extension directory
     if [ -f $MOZ_LANGPACKS_DIR/langpack-${SHORTMOZLOCALE}@firefox.mozilla.org/chrome/$SHORTMOZLOCALE.jar ]; then
@@ -203,6 +203,15 @@
                   $MOZ_EXTENSIONS_PROFILE_DIR/langpack-${SHORTMOZLOCALE}@firefox.mozilla.org
             echo "$MOZ_EXTENSIONS_PROFILE_DIR/langpack-${SHORTMOZLOCALE}@firefox.mozilla.org" > $FEDORA_LANGPACK_CONFIG
         fi
+    elif [ -f $MOZ_LANGPACKS_DIR/langpack-${MOZLOCALE}@firefox.mozilla.org/chrome/$MOZLOCALE.jar ]; then
+        if [ -d $MOZ_EXTENSIONS_PROFILE_DIR/langpack-${MOZLOCALE}@firefox.mozilla.org ]; then
+            rmdir "$MOZ_EXTENSIONS_PROFILE_DIR/langpack-${MOZLOCALE}@firefox.mozilla.org" > /dev/null 2>&1
+        fi 
+        if ! [ -e $MOZ_EXTENSIONS_PROFILE_DIR/langpack-${MOZLOCALE}@firefox.mozilla.org ]; then
+            ln -s $MOZ_LANGPACKS_DIR/langpack-${MOZLOCALE}@firefox.mozilla.org \
+                  $MOZ_EXTENSIONS_PROFILE_DIR/langpack-${MOZLOCALE}@firefox.mozilla.org
+            echo "$MOZ_EXTENSIONS_PROFILE_DIR/langpack-${MOZLOCALE}@firefox.mozilla.org" > $FEDORA_LANGPACK_CONFIG
+        fi
     elif [ -f $MOZ_EXTENSIONS_DIR/langpack-${MOZLOCALE}@firefox.mozilla.org/chrome/$MOZLOCALE.jar ]; then
         if [ -d $MOZ_EXTENSIONS_PROFILE_DIR/langpack-${MOZLOCALE}@firefox.mozilla.org ]; then
             rmdir "$MOZ_EXTENSIONS_PROFILE_DIR/langpack-${MOZLOCALE}@firefox.mozilla.org" > /dev/null 2>&1
Comment 20 Mamoru TASAKA 2010-04-08 05:47:08 EDT
Same issue appears on thunderbird-3.0.4-1.fc13.i686, so cloning
for thunderbird.
Comment 21 A S Alam 2010-04-11 01:56:17 EDT
firefox-3.6.3-2.fc13.x86_64 still has problem with pa_IN lang
Comment 22 Martin Stransky 2010-04-13 05:27:15 EDT
Created attachment 406188 [details]
another fix
Comment 23 Martin Stransky 2010-04-13 06:45:49 EDT
Added to firefox-3.6.3-4.fc13
Comment 24 fujiwara 2010-04-13 22:21:46 EDT
(In reply to comment #22)
> Created an attachment (id=406188) [details]
> another fix    

Cool.
Hmm.., I cannot remember why I tried to modify $MOZLOCALE .
Comment 25 Iván Jiménez 2010-05-07 21:19:16 EDT
It isn't completely fixed:

LANG=es_CO.UTF-8 firefox (appears in english)
LANG=es_ES.UTF-8 firefox (appears in spanish)

Same happens if es_XX hasn't a langpack (eg es_EC), I think these cases should fallback to es.
Comment 26 Iván Jiménez 2010-05-10 13:53:14 EDT
On further testing, the interface isn't translated for any system locale if there are firefox langpacks with regional variants and not using that variant, eg:

LANG=zh_HK.UTF-8 firefox (appears in english)
LANG=zh_TW.UTF-8 firefox (appears in chinese)
because there is 
/usr/lib64/firefox-3.6/langpacks/langpack-zh-CN@firefox.mozilla.org/ and
/usr/lib64/firefox-3.6/langpacks/langpack-zh-TW@firefox.mozilla.org/

but

LANG=de_AT.UTF-8 firefox (appears in german)
LANG=de_DE.UTF-8 firefox (appears in german)

because there is only 
/usr/lib64/firefox-3.6/langpacks/langpack-de@firefox.mozilla.org/

Should I open a new bug? at least for a lot of spanish latin american users (those not in AR, CL, ES and MX) it's breaking translations.
Comment 27 Martin Stransky 2010-05-10 14:33:22 EDT
(In reply to comment #26)
> Should I open a new bug? at least for a lot of spanish latin american users
> (those not in AR, CL, ES and MX) it's breaking translations.    

Do you run firefox-3.6.3-4.fc13?
Comment 28 Iván Jiménez 2010-05-11 22:23:03 EDT
(In reply to comment #27)
> Do you run firefox-3.6.3-4.fc13?    

Yes (sorry for not mentioning it). I can reproduce it in an updated installation and in a nigthly live image from about 29 abr.
Comment 29 fujiwara 2010-05-13 21:47:54 EDT
I think it's better if zh_HK community could provide /usr/lib64/firefox-3.6/langpacks/langpack-zh-HK@firefox.mozilla.org/chrome/zh-HK.jar

On the other hand, firefox.spec might provide a symlink while I think a short locale zh could be zh-cn but not zh-tw.

ZH_TW_DIR=%_libdir/firefox-3.6/langpacks/langpack-zh-TW@firefox.mozilla.org/chrome
ZH_HK_DIR=`echo "$ZH_TW_DIR" | sed -e 's|zh-TW|zh-HK|g'`

if [ -f $RPM_BUILD_ROOT$ZH_TW_DIR/zh-TW.jar ] && [ ! -f $RPM_BUILD_ROOT$ZH_HK_DIR/zh_HK.jar ] ; then
  if [ ! -d $RPM_BUILD_ROOT$ZH_HK_DIR ] ; then
    mkdir -p $RPM_BUILD_ROOT$ZH_HK_DIR
  fi
  (cd $RPM_BUILD_ROOT$ZH_HK_DIR; ln -s $ZH_TW_DIR/zh-TW.jar zh_HK.jar)
fi


To fix other short locale issues, probably it's better to swap the lines of $SHORTMOZLOCALE and $MOZLOCALE in /usr/bin/firefox and then the language community could provide the short locale jar files for the fallback languages.

--- /usr/bin/firefox.orig	2010-05-14 10:39:18.000000000 +0900
+++ /usr/bin/firefox	2010-05-14 10:43:58.000000000 +0900
@@ -194,16 +194,7 @@
     MOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*|-\1|g"`
 
     # Try to link global langpacks to an extension directory
-    if [ -f $MOZ_LANGPACKS_DIR/langpack-${SHORTMOZLOCALE}@firefox.mozilla.org/chrome/$SHORTMOZLOCALE.jar ]; then
-        if [ -d $MOZ_EXTENSIONS_PROFILE_DIR/langpack-${SHORTMOZLOCALE}@firefox.mozilla.org ]; then
-            rmdir "$MOZ_EXTENSIONS_PROFILE_DIR/langpack-${SHORTMOZLOCALE}@firefox.mozilla.org" > /dev/null 2>&1
-        fi 
-        if ! [ -e $MOZ_EXTENSIONS_PROFILE_DIR/langpack-${SHORTMOZLOCALE}@firefox.mozilla.org ]; then
-            ln -s $MOZ_LANGPACKS_DIR/langpack-${SHORTMOZLOCALE}@firefox.mozilla.org \
-                  $MOZ_EXTENSIONS_PROFILE_DIR/langpack-${SHORTMOZLOCALE}@firefox.mozilla.org
-            echo "$MOZ_EXTENSIONS_PROFILE_DIR/langpack-${SHORTMOZLOCALE}@firefox.mozilla.org" > $FEDORA_LANGPACK_CONFIG
-        fi
-    elif [ -f $MOZ_LANGPACKS_DIR/langpack-${MOZLOCALE}@firefox.mozilla.org/chrome/$MOZLOCALE.jar ]; then
+    if [ -f $MOZ_LANGPACKS_DIR/langpack-${MOZLOCALE}@firefox.mozilla.org/chrome/$MOZLOCALE.jar ]; then
         if [ -d $MOZ_EXTENSIONS_PROFILE_DIR/langpack-${MOZLOCALE}@firefox.mozilla.org ]; then
             rmdir "$MOZ_EXTENSIONS_PROFILE_DIR/langpack-${MOZLOCALE}@firefox.mozilla.org" > /dev/null 2>&1
         fi 
@@ -212,6 +203,15 @@
                   $MOZ_EXTENSIONS_PROFILE_DIR/langpack-${MOZLOCALE}@firefox.mozilla.org
             echo "$MOZ_EXTENSIONS_PROFILE_DIR/langpack-${MOZLOCALE}@firefox.mozilla.org" > $FEDORA_LANGPACK_CONFIG
         fi
+    elif [ -f $MOZ_LANGPACKS_DIR/langpack-${SHORTMOZLOCALE}@firefox.mozilla.org/chrome/$SHORTMOZLOCALE.jar ]; then
+        if [ -d $MOZ_EXTENSIONS_PROFILE_DIR/langpack-${SHORTMOZLOCALE}@firefox.mozilla.org ]; then
+            rmdir "$MOZ_EXTENSIONS_PROFILE_DIR/langpack-${SHORTMOZLOCALE}@firefox.mozilla.org" > /dev/null 2>&1
+        fi 
+        if ! [ -e $MOZ_EXTENSIONS_PROFILE_DIR/langpack-${SHORTMOZLOCALE}@firefox.mozilla.org ]; then
+            ln -s $MOZ_LANGPACKS_DIR/langpack-${SHORTMOZLOCALE}@firefox.mozilla.org \
+                  $MOZ_EXTENSIONS_PROFILE_DIR/langpack-${SHORTMOZLOCALE}@firefox.mozilla.org
+            echo "$MOZ_EXTENSIONS_PROFILE_DIR/langpack-${SHORTMOZLOCALE}@firefox.mozilla.org" > $FEDORA_LANGPACK_CONFIG
+        fi
     fi
 
     # And set it up for mozilla
Comment 30 Iván Jiménez 2010-05-28 21:43:47 EDT
Any progress on this? It's not just the interface, but websites (like facebook) appear in English when they sould appear in Spanish, which is confusing for users. In Fedora 12, Firefox uses es_AR locale when system uses es_CO.
Comment 31 Iván Jiménez 2010-06-25 07:48:30 EDT
(In reply to comment #29)
> I think it's better if zh_HK community could provide
> /usr/lib64/firefox-3.6/langpacks/langpack-zh-HK@firefox.mozilla.org/chrome/zh-HK.jar
>
For latin america it wouldn't be easy (too many regional variants).

> On the other hand, firefox.spec might provide a symlink while I think a short
> locale zh could be zh-cn but not zh-tw.
> 
Could it be tried in a package? (for all affected locales). It's not just the interface, but pages appear in english even if there are other language variants, eg in facebook.com. It's making f13 web experience worse than f12; it also doesn't happen in ubuntu.

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