default to locale-specific about:home for China
Categories
(Firefox :: General, defect)
Tracking
()
People
(Reporter: htang, Assigned: shaohua.wen)
References
Details
(Whiteboard: [about-home])
Attachments
(2 files, 6 obsolete files)
8.07 KB,
patch
|
Details | Diff | Splinter Review | |
1.24 KB,
patch
|
Pike
:
review+
Gavin
:
feedback+
|
Details | Diff | Splinter Review |
Hello, We have been using a localized start page: "http://zh-cn.start3.mozilla.com/firefox/?client=firefox-a&rls=org.mozilla:zh-CN:official" in FF3.x chinese simplified version for quite a while. We realized that in FF4.0 it start up "about:home" page which is quite different from what Chinese users are expecting for. It is possible to keep this localized start page in FF4 chinese simplified version ? basically to open the URL (mentioned above) ? or the same kind page is also hosted by MozillaOnline in China: http://i.firefox.com.cn It can be used as well, depending on which way is easier for you. Thanks in advance for the consideration.
This would take code changes I believe (see bug 563723)
Comment 2•12 years ago
|
||
At a minimum it would require a repack of the Chinese localized builds to include an override of the homepage pref value. I don't think that's feasible at this point (and I'm not sure it's a good idea even if it were - having zh-CN builds behave differently than all others in this regard would be suboptimal).
Google service is terriblly slow and unstabale in China, since all China queries are redirected to Hong Kong Site. In the localized start page, we provide users more options.
Updated•12 years ago
|
Hello there, Anyone can give us an update on this request ? I am wondering if there is any chance to get it fixed before next 4.0 patch. thanks. Hong
Comment 5•12 years ago
|
||
I don't see any realistic way for this to block Macaw if you want to merge the Chinese code into the built-in about:home code and then only show it in a single locale. That's a change that's going to take testing, and we currently don't even have an assignee.
Updated•12 years ago
|
Comment 6•12 years ago
|
||
Comment 7•12 years ago
|
||
Add the ability to override about:* per locale and add an entry for zh-CN, zh-HK and zh-MO to point to Mozilla China's hosted start page. The Chinese market requires a different start page, and this is currently solved with an add-on. We should integrate this into the core directly, amongst others because the new Firefox/Android frontend won't have add-ons initially. The particular layout of the Chinese start page is not up for discussion in this bug. Thats a country/locale specific preference, and Mozilla China owns that feature. The decision to host the page online instead of embedded in the download is also not up for debate in this bug. Thats also for Mozilla China to decide.
Comment 8•12 years ago
|
||
Hong, the attached patch redirects about:home to http://i.firefox.com.cn, however, this breaks relative urls and your start page doesn't render right. The easiest fix would be to use absolute urls in your start page, but I don't know whether that works with your mirroring setup. Can you talk to your webdevs about this? If they prefer to stick to relative urls, we can redirect about:home to a local file with a proper redirection to the final url (I wanted to avoid that since it might cause a small delay). Let me know if you need help testing this patch.
Updated•12 years ago
|
Comment 9•12 years ago
|
||
Better default in case pref reading fails.
Updated•12 years ago
|
Reporter | ||
Comment 10•12 years ago
|
||
(In reply to Andreas Gal :gal from comment #8) > Hong, the attached patch redirects about:home to http://i.firefox.com.cn, > however, this breaks relative urls and your start page doesn't render right. > The easiest fix would be to use absolute urls in your start page, but I > don't know whether that works with your mirroring setup. Can you talk to > your webdevs about this? If they prefer to stick to relative urls, we can > redirect about:home to a local file with a proper redirection to the final > url (I wanted to avoid that since it might cause a small delay). Let me know > if you need help testing this patch. Andreas, Thanks a lot for the support and speedy response. Our webdev is fixing the problem right now. I will let you know when we are ready. Thanks !
Comment 11•12 years ago
|
||
review ping
Reporter | ||
Comment 12•12 years ago
|
||
(In reply to Andreas Gal :gal from comment #8) > Hong, the attached patch redirects about:home to http://i.firefox.com.cn, > however, this breaks relative urls and your start page doesn't render right. > The easiest fix would be to use absolute urls in your start page, but I > don't know whether that works with your mirroring setup. Can you talk to > your webdevs about this? If they prefer to stick to relative urls, we can > redirect about:home to a local file with a proper redirection to the final > url (I wanted to avoid that since it might cause a small delay). Let me know > if you need help testing this patch. Fixed the problem. Please use http://start.firefoxchina.cn instead. Only for zh-CN. Thanks !!!
Comment 13•12 years ago
|
||
(In reply to Andreas Gal :gal from comment #7) > The decision to host the page online instead of embedded in the download is also > not up for debate in this bug. Thats also for Mozilla China to decide. Maybe so, but it's unnecessarily confrontational to frame things this way. We should all be working together to ensure that the default experience for Firefox users is optimal, and absolute statements about what is or isn't "up for debate" aren't helpful. It would be good to know why Mozilla China feels that hosting the start page online is a better choice than embedding it into the product, given that we've made the opposite decision for Firefox proper. Building the page in doesn't necessarily imply that it couldn't be customized for Chinese users (to address comment 3), or updated periodically (as our release schedules allow).
Comment 14•12 years ago
|
||
Comment on attachment 568820 [details] [diff] [review] patch At the very least, this will break BrowserOnAboutPageLoad(), which expects about:home to be our hardcoded page. I'm also a little bit wary of the default snippet stuff, which exposes the snippets and default search engine information to about:home. If we go this route, it seems like it would be safer overall to change the home page pref itself, rather than changing the underlying URL for about:home. (mozilla::Preferences::GetCString is the new preferred pref API BTW)
Comment 15•12 years ago
|
||
(In reply to Gavin Sharp (use gavin@gavinsharp.com for email) from comment #13) > (In reply to Andreas Gal :gal from comment #7) > > The decision to host the page online instead of embedded in the download is also > > not up for debate in this bug. Thats also for Mozilla China to decide. > > Maybe so, but it's unnecessarily confrontational to frame things this way. > We should all be working together to ensure that the default experience for > Firefox users is optimal, and absolute statements about what is or isn't "up > for debate" aren't helpful. I didn't say thats not up for debate. It very much is. _Just not in this bug_. This bug is about making the current Chinese setup work. If you have a good understanding of the Chinese market and what people expect from their start page, you should get in touch with Hong and her team. I am sure they are happy to discuss that and we can file follow-up bugs. > > It would be good to know why Mozilla China feels that hosting the start page > online is a better choice than embedding it into the product, given that > we've made the opposite decision for Firefox proper. Building the page in > doesn't necessarily imply that it couldn't be customized for Chinese users > (to address comment 3), or updated periodically (as our release schedules > allow). Again, a good discussion to have in a different bug. I happen to agree. We should embed the Chinese site, it saves bandwidth and provides for faster tab loads. Bug again, not really what I am trying to solve with this bug, hence the clear statements about the scope of this bug (which is really all those were).
Comment 16•12 years ago
|
||
Comment 17•12 years ago
|
||
Comment 18•12 years ago
|
||
I don't think we want a patch to tweak about:home to redirect to the world either. If zh-CN really needs to have a different home-page than the rest, putting that URL into firefox-l10n.js in the localization should be the right thing to do. BUT: browser.startup.homepage is handled as a localized pref only, but the properties file isn't in l10n anymore. That's kinda backwards. Can we make the users for that pref to fall back to the plain pref in case getComplexPref fails? Example: In nsBrowserContentHandler.js' get startpage(), get startPage() { var uri = Services.prefs.getComplexValue("browser.startup.homepage", nsIPrefLocalizedString).data; raises an exception, and doesn't get to the if (!uri) { part. Which wouldn't help in this case, either.
Comment 19•12 years ago
|
||
comment #18: that won't allow to offer session restore as part of the start page UI, since its not "about:home", but its no worse than what they have now (they customize to a different start page using an addon), so its a strict improvement if we fix this at the l10n level. I am not opposed. If Gavin is more comfortable with this proposal, I will whip up a fix for the issues you mentioned.
Reporter | ||
Comment 20•12 years ago
|
||
It also works for us, thanks !
Comment 21•12 years ago
|
||
(In reply to Andreas Gal :gal from comment #19) > strict improvement if we fix this at the l10n level. I am not opposed. If > Gavin is more comfortable with this proposal, I will whip up a fix for the > issues you mentioned. Yes, this sounds good. We should simplify the home page pref stuff. Getting rid of browserconfig.properties and adding getCharPref fallback (and consolidating the code in browser.js's getHomePage and nsBrowserContentHandler's startPage getter) would be righteous. Then we can just make the firefox-l10n change Axel suggests for the relevant locales.
Comment 22•12 years ago
|
||
Ok, I am totally new to that code but I will take a stab. I might find you in the office tomorrow for additional pointers.
Comment 23•12 years ago
|
||
Please don't take this the wrong way, but this seems like a perfect "new bug" type of fix and I know we have engineers in the China office. I can think of a million other projects that Andreas can be on that are higher priority than this (though it is awfully nice of him to hop on it). Andreas, can you hand this off? I doubt it would take even the greenest engineer over a week. Your attention is likely better spent elsewhere, and if this is a major going concern for China we have directed resources and can spec accordingly. We need more China customization patches coming into mainline and this bug seems like a perfect candidate to start/continue the trend.
Comment 24•12 years ago
|
||
Sure, I am sure the China office is happy to work on this. I just want to make sure we see some action on this bug. It was filed over 6 months ago.
Reporter | ||
Comment 25•12 years ago
|
||
Yes, I will have our developer to look into it. Andreas, really appreciate your help !
Comment 26•12 years ago
|
||
Hong, we can drive it through as well if you can't find resources. This also seems like a great bug for a community member to hop in. Let me know which way you want to go and we'll hopefully get this in this week (to make fx10)
Reporter | ||
Comment 27•12 years ago
|
||
(In reply to Christian Legnitto [:LegNeato] from comment #26) > Hong, we can drive it through as well if you can't find resources. This also > seems like a great bug for a community member to hop in. > > Let me know which way you want to go and we'll hopefully get this in this > week (to make fx10) We are getting there, and will send you the patch after we finish the testing. It will be by the end of today (Beijing time). It is also good opportunity for our engineer to go through this process. Thanks for the support and it will be great if we can get this in this week.
Comment 28•12 years ago
|
||
By following the Axel Hecht's suggestion in comment #18, I have created a patch of localization (zh-CN) in the attachment. It just put the new URL into firefox-l10n.js in the zh-CN version, instead of "about:home" redirection. Please let me know for any suggestion.
Comment 29•12 years ago
|
||
Comment on attachment 570963 [details] [diff] [review] patch for zh-CN Review of attachment 570963 [details] [diff] [review]: ----------------------------------------------------------------- I've tried a similar patch, but that didn't work, see my comment 18. I'm putting this down as an r-, as this doesn't work as is. If we get a patch to the browser code so that it does work, please re-request review.
Comment 30•12 years ago
|
||
This patch modify "browser.startup.homepage" to "chrome://branding/locale/brand.properties",and put the startup URL into 'brand.properties' I've tested,no exception raised at there(as comment 18). Please re-review.
Comment 31•12 years ago
|
||
This patch modify "browser.startup.homepage" to "chrome://browser/locale/browser.properties",and put the startup URL into 'browser.properties' I move the startup URL to 'chrome://browser/locale/browser.properties'. because it only work on official version and doesn't work on aurora and nightly version when we put the startup into brand.properties(as comment 30) Please re-review this one instead
Comment 32•12 years ago
|
||
Comment on attachment 571258 [details] [diff] [review] patch for zh-CN This should work as a zh-CN-only solution. It would be nice to implement the changes described in comment 21 so that this patch could be simpler (avoid the need for the browser.properties change), but we don't need to block on that.
Comment 33•12 years ago
|
||
Comment on attachment 571258 [details] [diff] [review] patch for zh-CN Review of attachment 571258 [details] [diff] [review]: ----------------------------------------------------------------- I *really* prefer to get gavin's stuff working, but this is good enough 'til that patch makes it through the channels. One obvious caveat is that this patch will at least report an obsolete string on the dashboard, and it can, theoretically conflict with a landing of the same key in browser.dtd.
Reporter | ||
Comment 34•12 years ago
|
||
Thanks. How about to get this patch in for now and in the meantime we will try the change described in comment 21.
Comment 35•12 years ago
|
||
(In reply to Axel Hecht [:Pike] from comment #33) > Comment on attachment 571258 [details] [diff] [review] [diff] [details] [review] > patch for zh-CN > > Review of attachment 571258 [details] [diff] [review] [diff] [details] [review]: > ----------------------------------------------------------------- > > I *really* prefer to get gavin's stuff working, but this is good enough 'til > that patch makes it through the channels. > > One obvious caveat is that this patch will at least report an obsolete > string on the dashboard, and it can, theoretically conflict with a landing > of the same key in browser.dtd. Does that prevent us from landing this now? Will the zh-CN localizers be confused by the new "obsolete" string? What would be the fallout of a conflict?
Comment 36•12 years ago
|
||
My r+ menat to say that we probably want the zh-CN patch in the meatime. I'd rely on mozilla-online to sync with the localizers to resolve any confusion. If the locliazer removes the obsolete string, there's no homepage, basically. fx comes up with about:blank.
Comment 37•12 years ago
|
||
Hong, do you have commit access to mozilla-central or do you want me to land this for you?
Comment 38•12 years ago
|
||
This needs to land in the zh-CN l10n repos, probably even starting in beta, and then merge back down to aurora and central (to not transplant without need). Once we have a fix in fx to make this simpler, we need to land a patch in zh-CN that goes the new style, and let that bubble up the channels as usual.
Reporter | ||
Comment 39•12 years ago
|
||
(In reply to Christian Legnitto [:LegNeato] from comment #37) > Hong, do you have commit access to mozilla-central or do you want me to land > this for you? No, we do not have commit access to mozilla-central, please help us land the patch. thanks !
Comment 40•11 years ago
|
||
To clarify, the intermediate fix only needs to land on the zh-CN repo, no code changes on mozilla-central or friends is needed.
Assignee | ||
Comment 41•11 years ago
|
||
Hong has communicated with me, maybe I can take this but and help landing the patch, is that OK?
Comment 42•11 years ago
|
||
Sure.
Assignee | ||
Comment 43•11 years ago
|
||
Aurora: aurora/zh-CN$ hg ci -m "Bug 642106 - default to locale-specific about:home for China r=axel f=gavin.sharp" browser/chrome/browser/browser.properties browser/firefox-l10n.js 提交修改集 378:1e3144c6000a Beta: beta/zh-CN$ hg ci -m "Bug 642106 - default to locale-specific about:home for China r=axel f=gavin.sharp" browser/chrome/browser/browser.properties browser/firefox-l10n.js 提交修改集 617:abc8b39c1247
Comment 44•11 years ago
|
||
Shaohua Wen, will you land this patch on l10n-central as well?
Comment 45•11 years ago
|
||
I don't think the zh-CN team is working on central these days. As we don't automatically migrate l10n from central to aurora, that's fine. Gavin, any suggestion on how to close in on comment 21, i.e., getting a better code support for this?
Comment 47•8 years ago
|
||
Any reason to leave this bug open?
Assignee | ||
Comment 48•8 years ago
|
||
Yes, it should be closed as it landed in all the channels already. Br. Holy
Comment 49•1 year ago
|
||
Sorry to bother, but some medium have reported that Firefox will change users' setting of home page to https://start.firefoxchina.cn
in background, even if users have chose another homepage, which is unintended.
I believed that this kind of behavior is against Mozilla's value and spirit. Is this a feature, a bug or just a fake news?
Comment 50•1 year ago
|
||
(In reply to Yao Nianqing from comment #49)
Sorry to bother, but some medium have reported that Firefox will change users' setting of home page to
https://start.firefoxchina.cn
in background, even if users have chose another homepage, which is unintended.I believed that this kind of behavior is against Mozilla's value and spirit. Is this a feature, a bug or just a fake news?
Hi, I've read the linked v2ex thread. STR as described by the original author:
- Default state is "Custom URLs…" and the url being "https://start.firefoxchina.cn/";
- Customize the homepage url;
- Select the "Firefox Home (Default)" option;
- Select the "Custom URLs…" option again, at which point the url is "https://start.firefoxchina.cn/", not their customized value.
Behind the scene, when they select the "Firefox Home (Default)" option, any customized value stored in the browser.startup.homepage
pref is lost. At no point does Firefox change their customized homepage url WITHOUT their action.
I believe this is a misunderstanding, potentially caused by the preference UI, that the customized url might be kept intact while switching between "Firefox Home (Default)", "Custom URLs…", "Blank Page" and any extension provided homepage.
Description
•