Closed
Bug 1154980
Opened 10 years ago
Closed 10 years ago
Localize first run pager titles
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox38 verified, firefox39 fixed, firefox40 fixed, fennec38+)
RESOLVED
FIXED
Firefox 40
People
(Reporter: liuche, Assigned: liuche)
References
Details
Attachments
(2 files, 1 obsolete file)
4.74 KB,
patch
|
Sylvestre
:
approval-mozilla-aurora+
Sylvestre
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
39 bytes,
text/x-review-board-request
|
ally
:
review+
|
Details |
The title isn't localized - oops!
Assignee | ||
Comment 1•10 years ago
|
||
/r/7103 - Bug 1154980 - Localize first run pager titles. r=ally
Pull down this commit:
hg pull -r 6320cbbd29f7166fd421d5ee60f31f16489acbd9 https://reviewboard-hg.mozilla.org/gecko/
Attachment #8593153 -
Flags: review?(ally)
Comment 2•10 years ago
|
||
Does this also affect 38? Isn't that where this landed?
Assignee | ||
Updated•10 years ago
|
Comment 3•10 years ago
|
||
It may be worth asking the l10n team if we can get a late string in, at least for 39.
Assignee | ||
Comment 4•10 years ago
|
||
Flod: we're missing a localizable string in the first run experience that is riding the trains with 38 - how would you feel about a late string addition to 39?
Flags: needinfo?(francesco.lodolo)
Comment 5•10 years ago
|
||
Comment on attachment 8593153 [details]
MozReview Request: bz://1154980/liuche
https://reviewboard.mozilla.org/r/7101/#review5947
::: mobile/android/base/firstrun/FirstrunPager.java
(Diff revision 1)
> - final Fragment fragment = Fragment.instantiate(context, panels.get(i).getResource());
> + final Fragment fragment = Fragment.instantiate(context, panels.get(i).getClassname());
Could you explain why you needed to change this line for my benefit?
::: mobile/android/base/firstrun/FirstrunPagerConfig.java
(Diff revision 1)
> - private String title;
> + private int titleRes;
Why do you need this variable?
I'm afraid I don't understand some of the mechanism for localization here, so can't in good conscious r+ it. f+ for now and we can talk about it tomorrow morning.
Attachment #8593153 -
Flags: review?(ally)
Comment 6•10 years ago
|
||
(In reply to Chenxia Liu [:liuche] from comment #4)
> Flod: we're missing a localizable string in the first run experience that is
> riding the trains with 38 - how would you feel about a late string addition
> to 39?
I'm confused: 38 or 39 (aurora)? To be honest I'd be a lot happier with strings not landing on Aurora.
Counter question: how do you feel about a compromise reusing an existing string for the title, and fix it properly (new string) on 40? I'm looking at "Welcome to &brandShortName;"
http://hg.mozilla.org/releases/mozilla-aurora/file/8eab810238ea/mobile/android/base/locales/en-US/android_strings.dtd#l9
The pro is that the string would also be available on 38 if you need.
Flags: needinfo?(francesco.lodolo)
Assignee | ||
Comment 7•10 years ago
|
||
https://reviewboard.mozilla.org/r/7101/#review5969
> Could you explain why you needed to change this line for my benefit?
This patch is mostly renaming some methods to be more explicit about what they're doing. The one substantial change is pulling a string resource from our localized resources instead of hard-coding the string in Java.
If you don't understand the Android code, definitely take a look at Android docs. This line is how you instantiate a Fragment:
http://developer.android.com/reference/android/app/Fragment.html#instantiate%28android.content.Context, java.lang.String%29
Here, I renamed the method to be more explicit, so instead of "getResource" I changed it to "getClassname".
> Why do you need this variable?
This variable is for storing the resource so we can fetch it in the PagerAdapter, which this is a subclass of. See the changes to firstrun/FirstrunPager.java. You'll see that it's a method change.
PagerAdapter: http://developer.android.com/reference/android/support/v4/view/PagerAdapter.html#getPageTitle%28int%29
Ok, let's talk about this over vidyo or something. The localization is basically the same as desktop localization, except that Android uses a strings.xml file, so we also need to reference the dtd strings in strings.xml.in, which gets preprocessed.
Basically, you add the actual strings to mobile/android/base/locales/en-US/android_strings.dtd, which will be localized. Then you add it to mobile/android/base/strings.xml.in so that they will be preprocessed so Android can use them.
Take a glance at this Android doc about resources, which should look familiar to our tree structure inside of mobile/android/base/resources:
http://developer.android.com/guide/topics/resources/providing-resources.html
Comment 8•10 years ago
|
||
I like flod's proposed compromise. If we can move on that, I think it's the best solution considering where we are in the cycle.
Assignee | ||
Comment 9•10 years ago
|
||
(In reply to Francesco Lodolo [:flod] (UTC+2) from comment #6)
> (In reply to Chenxia Liu [:liuche] from comment #4)
> > Flod: we're missing a localizable string in the first run experience that is
> > riding the trains with 38 - how would you feel about a late string addition
> > to 39?
>
> I'm confused: 38 or 39 (aurora)? To be honest I'd be a lot happier with
> strings not landing on Aurora.
>
> Counter question: how do you feel about a compromise reusing an existing
> string for the title, and fix it properly (new string) on 40? I'm looking at
> "Welcome to &brandShortName;"
> http://hg.mozilla.org/releases/mozilla-aurora/file/8eab810238ea/mobile/
> android/base/locales/en-US/android_strings.dtd#l9
>
> The pro is that the string would also be available on 38 if you need.
Good call, I think that will be okay. I'm needinfo-ing Matej just to give him a heads up that on 38 and 39, our title will be "Welcome to Firefox" instead of just "Welcome". (I assume this is better than the string not being localized at all.)
Updated•10 years ago
|
Attachment #8593153 -
Flags: review+
Comment 10•10 years ago
|
||
Comment on attachment 8593153 [details]
MozReview Request: bz://1154980/liuche
https://reviewboard.mozilla.org/r/7101/#review5975
Ship It!
Comment 11•10 years ago
|
||
viydo chat. r+
Assignee | ||
Comment 13•10 years ago
|
||
Status: NEW → ASSIGNED
Target Milestone: --- → Firefox 40
Assignee | ||
Comment 14•10 years ago
|
||
I'll also be adding an aurora and beta patch, to use onboard_start_message2, which is already localized.
Assignee | ||
Comment 15•10 years ago
|
||
Approval Request Comment
[Feature/regressing bug #]: Bug 1063844 didn't localize new string
[User impact if declined]: new non-English locale users will see an unlocalized title in the first run experience
[Describe test coverage new/current, TreeHerder]: local testing, try:
Beta: https://treeherder.mozilla.org/#/jobs?repo=try&revision=7ed8585cb6ba
Aurora: https://treeherder.mozilla.org/#/jobs?repo=try&revision=a77a8bf18a9a
[Risks and why]: low, adding code path to use a resource instead of a hard-coded string
[String/UUID change made/needed]: none
Attachment #8594253 -
Flags: approval-mozilla-beta?
Attachment #8594253 -
Flags: approval-mozilla-aurora?
Comment 16•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment 17•10 years ago
|
||
Comment on attachment 8594253 [details] [diff] [review]
Aurora/Beta patch: Use existing string.
Should be in 38 beta 6
Attachment #8594253 -
Flags: approval-mozilla-beta?
Attachment #8594253 -
Flags: approval-mozilla-beta+
Attachment #8594253 -
Flags: approval-mozilla-aurora?
Attachment #8594253 -
Flags: approval-mozilla-aurora+
Comment 18•10 years ago
|
||
Comment 19•10 years ago
|
||
Updated•10 years ago
|
tracking-fennec: ? → 38+
Comment 20•10 years ago
|
||
Verified as fixed on Firefox 38.0b8.
Still needs to be verified on Nightly/Aurora
Assignee | ||
Comment 21•9 years ago
|
||
Attachment #8593153 -
Attachment is obsolete: true
Attachment #8620055 -
Flags: review+
Assignee | ||
Comment 22•9 years ago
|
||
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
•