Closed
Bug 713464
Opened 13 years ago
Closed 13 years ago
English labels displayed initially on multilanguage apk instead of localized strings
Categories
(Firefox for Android Graveyard :: General, defect, P3)
Tracking
(firefox11 fixed, blocking-fennec1.0 beta+, fennec11+)
RESOLVED
FIXED
Firefox 12
People
(Reporter: flod, Assigned: sriram)
References
Details
Attachments
(3 files)
84.91 KB,
image/png
|
Details | |
114.79 KB,
image/jpeg
|
Details | |
2.51 KB,
patch
|
mfinkle
:
review+
akeybl
:
approval-mozilla-aurora+
akeybl
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
Just installed the latest build on Asus EeePad: Mozilla/5.0 (Android; Linux armv7l; rv:12.0a1) Gecko/20111225 Firefox/12.0a1 Fennec/12.0a1.
The first time you start the browser, some strings in the top right menu are in English:
* Bookmark or Remove (checkbox)
* Request Desktop Site
If I open "Impostazioni" (Settings) I get all strings in English, same thing if I try to use "Elimina impostazioni sito" (Clear Site Settings).
It's enough to rotate the screen to see all localized strings as expected.
The only things that remain in English are:
* the whole start page's content (Top Sites, etc.)
* Request Desktop Site/Request Mobile Site
About the second string I searched mxr but I can't find any evident explanation
http://mxr.mozilla.org/mozilla-central/search?string=agent_request_desktop&find=mobile
Reporter | ||
Comment 1•13 years ago
|
||
Similar behavior on Samsung Galaxy S II with 2.3.3, so not just related to HoneyComb.
In this case the number of strings that always remain in English after a screen rotation is bigger: only "Bookmark" and "Other" are translated, menu displayed pressing "Other" is completely in English.
Reporter | ||
Comment 2•13 years ago
|
||
With 20111226 build "Request Desktop Site" is displayed localized, usually it changes after you create a new tab or switch to a different one.
Also all buttons on my Samsung Galaxy S II with 2.2.3 are localized after a screen rotation.
The only problem standing is the one described in the summary: initially Firefox is a mix of English and localized strings.
Comment 3•13 years ago
|
||
Sriram - Is this an inflation issue? Maybe something is racing?
Assignee: nobody → sriram
Priority: -- → P3
Comment 4•13 years ago
|
||
Having the same problem for es-ES (tested both HTC Desire and Xperia Neo V, GB). Is there any chance this bug gets attention in a near future? I cannot test my translation properly, and I'd love to do it in the early stages of aurora cycle.
Comment 5•13 years ago
|
||
Stas, can you confirm this?
Comment 6•13 years ago
|
||
I can confirm this bug for Russian locale on HTC Desire with CyanogenMod 7.1.0 installed.
Reporter | ||
Comment 7•13 years ago
|
||
(In reply to Guillermo López (:willyaranda) from comment #4)
> I cannot test my translation properly, and I'd love to do it in the early
> stages of aurora cycle.
Rotating the screen doesn't work for you?
Comment 8•13 years ago
|
||
Also, if you can reproduce it, and look at adb logcat for anything surprising?
Comment 9•13 years ago
|
||
(In reply to flod (Francesco Lodolo) from comment #7)
> (In reply to Guillermo López (:willyaranda) from comment #4)
> > I cannot test my translation properly, and I'd love to do it in the early
> > stages of aurora cycle.
> Rotating the screen doesn't work for you?
nope, menu pop-up stays in a mixed state (everything except "Bookmarks" ("Marcadores") in English if I rotate.
But in the Settings menu, rotation changes the language to es-ES.
(In reply to Axel Hecht [:Pike] from comment #8)
> Also, if you can reproduce it, and look at adb logcat for anything
> surprising?
Anything suspicious, no ERRORs in GeckoApp or related.
Comment 10•13 years ago
|
||
Well, if I rotate a few times the phone, it *maybe* change the language. Now I've seen everything translated in menu pop-up except "Bookmarks" (so inverted from my previous comments).
But still, not working with a simple rotation.
Updated•13 years ago
|
tracking-fennec: --- → 11+
Comment 12•13 years ago
|
||
I know this is bugspam, but I just read the announcement in dev.l10n by Jeff about localizing Fennec11 (Native) and I think this bug should be fixed ASAP (or at least before transplanting aurora->beta if beta will go to the market as usual).
I can't test my language properly (I can blindly test comparing with en-US, but this is not ideal) and I've found a few string that doesn't fit in the screen and I needed to shorten them.
Comment 13•13 years ago
|
||
If this bug only truly affects multilanguage APKs, then we could use the new single language APKs to test languages:
http://ftp.mozilla.org/pub/mozilla.org/mobile/nightly/latest-mozilla-aurora-android-l10n/
Comment 14•13 years ago
|
||
(In reply to Mark Finkle (:mfinkle) from comment #13)
> If this bug only truly affects multilanguage APKs, then we could use the new
> single language APKs to test languages:
>
> http://ftp.mozilla.org/pub/mozilla.org/mobile/nightly/latest-mozilla-aurora-
> android-l10n/
Ok, thanks for pointing this to me. Anyway, are you going to ship multilocale builds for Firefox for Android in the market? Or just single locales depending on the location provided by the Market?
Thanks!
Comment 15•13 years ago
|
||
We'll need the multi-apk for the amazon market, so we can't really ignore this bug.
Reporter | ||
Comment 16•13 years ago
|
||
Still not clear to me (I asked in the first comment): about:home is supposed to be in English or localized?
Take for example "Top Sites": it's localized in my repository but still displayed in English in the build, the rotation trick doesn't work here.
http://mxr.mozilla.org/l10n-mozilla-aurora/source/it/mobile/android/base/android_strings.dtd#4
Even if we're going to ship single locale builds, I think it would be useful to give this bug a clear priority.
Comment 17•13 years ago
|
||
(In reply to flod (Francesco Lodolo) from comment #16)
> Created attachment 589108 [details]
> about:home screenshot on Aurora
>
> Still not clear to me (I asked in the first comment): about:home is supposed
> to be in English or localized?
>
> Take for example "Top Sites": it's localized in my repository but still
> displayed in English in the build, the rotation trick doesn't work here.
> http://mxr.mozilla.org/l10n-mozilla-aurora/source/it/mobile/android/base/
> android_strings.dtd#4
Should be fixed by bug 712970
Updated•13 years ago
|
Keywords: fennecnative-betablocker
Assignee | ||
Comment 18•13 years ago
|
||
Since I'm unable to make multi-locale builds, I couldn't try testing this.
From what I remember from initial code (from when the screenshots where taken):
1. Bookmarks had two different strings ("Bookmark" and "Remove") which were changed based on whether the site was bookmarked or not. This was changing in code in java. Now, only one string "Bookmark" is being used.
2. I am not sure about "Request Desktop site". But I don't find that menu anymore.
Now, when the value is changed in code, the android tries to get "localized" string always. In this case, the localized string would be from en-US as the device might have been running on English (US) phones. Note: This is device wide locale.
Android cannot get localized strings based on Fennec's language (as the device's locale is still different). Fennec should request it to be run on a different locale than the system's, so that Android can do it for us. However, our current code doesn't support this. We only have "one" strings.xml file in res/values/ -- which will be the default resource used.
I am not sure if multiple resource folders (of form ab-CD) are generated and placed inside res/values. If they aren't then changing strings cannot happen.
Still, from the screenshots, and the recent code changes to menu, I believe this problem wouldn't exist anymore.
Comment 19•13 years ago
|
||
http://ftp.mozilla.org/pub/mozilla.org/mobile/nightly/latest-mozilla-central-android/
I've tried latest nightly and the problem is still there. Sometimes English, sometimes Spanish…
Reporter | ||
Comment 20•13 years ago
|
||
(In reply to Sriram Ramasubramanian [:sriram] from comment #18)
> Still, from the screenshots, and the recent code changes to menu, I believe
> this problem wouldn't exist anymore.
Wrong ;-)
Request Desktop site is gone, menus changed structure but the problem is still the same (ALL preferences and dialogs are displayed in English until you do a screen rotation, sometimes more than one).
Assignee | ||
Comment 21•13 years ago
|
||
I could see the preferences start in English and change to the language after rotation. But the menus were working fine for me.
Assignee | ||
Comment 22•13 years ago
|
||
I am unable to build a multi-locale clone. I tried setting the device language to French and loading the app (ideally getLocale() should return French, though resources will be in english).
Both for preferences and awesome-screen, when the activity first loads it says English. On rotation, it says French. I am unable to understand what is causing the issue for the same.
https://hg.mozilla.org/mozilla-central/file/tip/mobile/android/base/GeckoThread.java#l86 - This piece of code is confusing me. Does this set the locale to entire application or just the activity?
Assignee | ||
Comment 23•13 years ago
|
||
Phew! Finally with Mark's help we found the issue :)
The "setSelectedLocale()" method is still called from Gecko side.
Earlier we had an option to run Firefox in a language other than system's language.
However, this is not supported as of now.
Gecko resets the locale to en-US by calling this function with an empty string.
This affects GeckoPreferences activity in multi-locale builds by making it start in en-US (as the locale is reset).
With this fix, fennec wouldn't have issues with multi-locales.
Attachment #592969 -
Flags: review?(mark.finkle)
Comment 24•13 years ago
|
||
Comment on attachment 592969 [details] [diff] [review]
Patch
># HG changeset patch
># User Sriram Ramasubramanian <sriram@mozilla.com>
># Date 1327980911 28800
># Node ID 4fd7aa4c5622c199a0ac061122447eafddb956b0
># Parent bfeeb813aef2dfe25a74343034664127d954b274
>Bug 713464: Application Locale should not be reset from CPP.
>
>diff --git a/mobile/android/base/GeckoAppShell.java b/mobile/android/base/GeckoAppShell.java
>--- a/mobile/android/base/GeckoAppShell.java
>+++ b/mobile/android/base/GeckoAppShell.java
>@@ -1142,38 +1142,44 @@ public class GeckoAppShell
> ConnectivityManager cm = (ConnectivityManager)
> GeckoApp.mAppContext.getSystemService(Context.CONNECTIVITY_SERVICE);
> if (cm.getActiveNetworkInfo() == null)
> return false;
> return true;
> }
>
> public static void setSelectedLocale(String localeCode) {
>+ /* Bug 713464: This method is still called from Gecko side.
>+ Earlier we had an option to run Firefox in a language other than system's language.
>+ However, this is not supported as of now.
>+ Gecko resets the locale to en-US by calling this function with an empty string.
>+ This affects GeckoPreferences activity in multi-locale builds */
>+
> /* We're not using this, not need to save it (see bug 635342)
Can you add a trailing */ at the end of this line?
Attachment #592969 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 25•13 years ago
|
||
Pushed to inbound with required changes.
http://hg.mozilla.org/integration/mozilla-inbound/rev/a3358c5fa80a
Comment 26•13 years ago
|
||
Sweet.
Should there be a follow-up to comment out the locale setting code in https://hg.mozilla.org/mozilla-central/file/tip/mobile/android/base/GeckoThread.java#l86, too?
Comment 27•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/a3358c5fa80a
Leaving open for comment 26.
Status: NEW → ASSIGNED
Target Milestone: --- → Firefox 12
Assignee | ||
Comment 28•13 years ago
|
||
(In reply to Axel Hecht [:Pike] from comment #26)
> Sweet.
>
> Should there be a follow-up to comment out the locale setting code in
> https://hg.mozilla.org/mozilla-central/file/tip/mobile/android/base/
> GeckoThread.java#l86, too?
The locale setting code in GeckoThread.java does not harm now. I would like to keep it as it is until we know for sure the multi-locales are working fine.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 29•13 years ago
|
||
Comment on attachment 592969 [details] [diff] [review]
Patch
[Approval Request Comment]
Regression caused by (bug #): Bug 635432
User impact if declined:
Multi-locale builds will show Preferences screen in English and then change to system's locale on rotation. This will cause confusion to users.
Testing completed (on m-c, etc.): Landed on m-c on 01/31
Risk to taking this patch (and alternatives if risky): None. Gecko is aware of the locale that the device is in. We are just blocking it from overwriting the locale.
String changes made by this patch: None.
Attachment #592969 -
Flags: approval-mozilla-aurora?
Comment 30•13 years ago
|
||
(In reply to Sriram Ramasubramanian [:sriram] from comment #18)
> Since I'm unable to make multi-locale builds, I couldn't try testing this.
why are you unable to make multi-locale builds?
Assignee | ||
Comment 31•13 years ago
|
||
Somehow different locales aren't being packed when i build and do | make package |. Not sure what am i doing wrongly.
Comment 32•13 years ago
|
||
you need to re-pack for multilocale builds, using this script https://hg.mozilla.org/build/mozharness/file/62e67a176fec/scripts/multil10n.py
Comment 33•13 years ago
|
||
After the merge-%; chrome-% dance for a few locales, you call
make package MOZ_CHROME_MULTILOCALE="de fr pl it zu" AB_CD=multi
Comment 34•13 years ago
|
||
Comment on attachment 592969 [details] [diff] [review]
Patch
[Triage Comment]
Approved for Aurora 12 and Beta 11.
Attachment #592969 -
Flags: approval-mozilla-beta+
Attachment #592969 -
Flags: approval-mozilla-aurora?
Attachment #592969 -
Flags: approval-mozilla-aurora+
Assignee | ||
Comment 35•13 years ago
|
||
Comment 36•13 years ago
|
||
I believe this still needs to be fixed on Beta 11.
Comment 37•13 years ago
|
||
status-firefox11:
--- → fixed
Comment 38•13 years ago
|
||
mozilla-aurora build 2012-02-03 nl confirmed fixed
Status: RESOLVED → VERIFIED
Comment 39•13 years ago
|
||
sorry can not confirm it, i did not installed the multi version i noticed today.
i can not find a aurora multi build.
Status: VERIFIED → RESOLVED
Closed: 13 years ago → 13 years ago
Updated•13 years ago
|
blocking-fennec1.0: --- → beta+
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•