Closed Bug 914730 Opened 11 years ago Closed 11 years ago

Add language selector to pages using a non-standard footer

Categories

(www.mozilla.org :: Bedrock, defect, P3)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: pmac, Assigned: kohei)

References

Details

(Whiteboard: [kb=1112692] )

Pages like /firefox/new/, but there may be others.
Priority: -- → P3
Whiteboard: [kb=1112692]
/firefox/new/ -- firefox/base-resp.html + firefox/includes/simple_footer.html
/firefox/fx/, /dnt/, etc. -- firefox/base-resp.html
/firefox/central/, /firefox/features/, etc. -- firefox/base.html
Assignee: nobody → kohei.yoshino
Status: NEW → ASSIGNED
(In reply to Kohei Yoshino [:kohei] from comment #1)
> /firefox/new/ -- firefox/base-resp.html + firefox/includes/simple_footer.html
> /firefox/fx/, /dnt/, etc. -- firefox/base-resp.html
> /firefox/central/, /firefox/features/, etc. -- firefox/base.html

How soon can you get it added to the firefox/includes/simple_footer.html template? This is more important than any other pages because the metrics show a decent amount of traffic comes to the page with a different lang there is no easy way to switch locales on the page. Users could click the "system & languages" link on the download button, but that may not be idea given that page is not localized.
I'll send a PR later today or tomorrow.
There's a complication. The simple_footer.html is also used on the new (still in PR) /firefox/download/ page. This page is special because it's turned off the ?lang=de function as the lang parameter on that page indicates the language of the Fx build the user wants. This will cause the language switcher to fail to function the way it does now.

I don't think this page is a particularly good candidate for the lang switcher anyway due to the fact that reloading the page would result in another download. But if we do want it on there we may have to change the way the language switcher works to avoid reliance on the ?lang param.
(In reply to Paul McLanahan [:pmac] from comment #4)
> There's a complication. The simple_footer.html is also used on the new
> (still in PR) /firefox/download/ page. This page is special because it's
> turned off the ?lang=de function as the lang parameter on that page
> indicates the language of the Fx build the user wants. This will cause the
> language switcher to fail to function the way it does now.

How about we wait till the unified page is out the door to add it to /firefox/new/? The unified page will stay /firefox/new/ for a while until the data looks fine. The the current /firefox/new/ and the upcoming /firefox/new/ the only pages that use the simple_footer.html?

> 
> I don't think this page is a particularly good candidate for the lang
> switcher anyway due to the fact that reloading the page would result in
> another download. 

The primary use-case for the lang switcher is actually on the download page? Why? it is one of the most visited page and we get a lot of visitors to the en-US page when they have their browser set to another locale because the en-US page has such good SEO rank. A reload of the page won't cause in another download as long as they don't switch on the second scene when #download-fx is in the URL. Why would it cause another download on the first scene?

> But if we do want it on there we may have to change the
> way the language switcher works to avoid reliance on the ?lang param.

Is it just because the parameters are the same and something other than ?lang, e.g. ?language, would work?
(In reply to Chris More [:cmore] from comment #5)
> How about we wait till the unified page is out the door to add it to
> /firefox/new/? The unified page will stay /firefox/new/ for a while until
> the data looks fine. The the current /firefox/new/ and the upcoming
> /firefox/new/ the only pages that use the simple_footer.html?

The upcoming bedrock version of /firefox/download/ uses it too. That's what I'm talking about, just the interstitial page that people see when they click the download button from other pages. 

> The primary use-case for the lang switcher is actually on the download page?
> Why? it is one of the most visited page and we get a lot of visitors to the
> en-US page when they have their browser set to another locale because the
> en-US page has such good SEO rank. A reload of the page won't cause in
> another download as long as they don't switch on the second scene when
> #download-fx is in the URL. Why would it cause another download on the first
> scene?

Again, I'm just talking about /firefox/download/ (currently firefox/download.html). This page is only seen when you're downloading, so if you switched languages it would start another download. When we fully rid ourselves of this page this issue will no longer exist.

> Is it just because the parameters are the same and something other than
> ?lang, e.g. ?language, would work?

It would work with another param, but that param has been in use for a long time, and works across most mozilla sites because it's hardcoded into the locale middleware in funfactory. I've had to patch funfactory to allow me to exempt /firefox/download/ from recognizing the lang param in the middleware so that downloading can work.
(In reply to Paul McLanahan [:pmac] from comment #6)
> (In reply to Chris More [:cmore] from comment #5)
> > How about we wait till the unified page is out the door to add it to
> > /firefox/new/? The unified page will stay /firefox/new/ for a while until
> > the data looks fine. The the current /firefox/new/ and the upcoming
> > /firefox/new/ the only pages that use the simple_footer.html?
> 
> The upcoming bedrock version of /firefox/download/ uses it too. That's what
> I'm talking about, just the interstitial page that people see when they
> click the download button from other pages. 
> 
> > The primary use-case for the lang switcher is actually on the download page?
> > Why? it is one of the most visited page and we get a lot of visitors to the
> > en-US page when they have their browser set to another locale because the
> > en-US page has such good SEO rank. A reload of the page won't cause in
> > another download as long as they don't switch on the second scene when
> > #download-fx is in the URL. Why would it cause another download on the first
> > scene?
> 
> Again, I'm just talking about /firefox/download/ (currently
> firefox/download.html). This page is only seen when you're downloading, so
> if you switched languages it would start another download. When we fully rid
> ourselves of this page this issue will no longer exist.
> 
> > Is it just because the parameters are the same and something other than
> > ?lang, e.g. ?language, would work?
> 
> It would work with another param, but that param has been in use for a long
> time, and works across most mozilla sites because it's hardcoded into the
> locale middleware in funfactory. I've had to patch funfactory to allow me to
> exempt /firefox/download/ from recognizing the lang param in the middleware
> so that downloading can work.

Ok, that is what was confusing because we have /products/download.html (not /firefox/download.html) and that's the interstitial orange page. The /firefox/new/ page will eventually become /firefox/download/ at the end of the unified download project and the interstitial page will eventually become the second scene of the /firefox/new/ page. The interstitial will go away all together some day in the future when download buttons point to the second scene.

Did you mean /products/download.html in the comments above?
(In reply to Chris More [:cmore] from comment #7)
> Did you mean /products/download.html in the comments above?

I did. I got confused also because https://github.com/mozilla/bedrock/pull/1218 ports /products/download.html as /firefox/download/. You and :sgarrity should hash out if that's appropriate or not. The page is clearly all about downloading firefox, so the URL makes sense to me, but I do know it's slated for repurposing.
(In reply to Kohei Yoshino [:kohei] from comment #1)
> /firefox/fx/, /dnt/, etc. -- firefox/base-resp.html

firefox/base-resp.html already has a lang switcher. The footer layout has not been updated on my local server because of caches. So please discard this.

> /firefox/new/ -- firefox/base-resp.html + firefox/includes/simple_footer.html
> /firefox/central/, /firefox/features/, etc. -- firefox/base.html

Pull request: https://github.com/mozilla/bedrock/pull/1257

The lang switcher can be disabled on /firefox/download/ by adding an empty block to the page template:

> {% block lang_switcher %}{% endblock %}
Thanks, Kohei! I can't wait to get this on /firefox/new/ since we get a lot of traffic to the en-US page from other languages and it is not easy switch languages.
Commits pushed to master at https://github.com/mozilla/bedrock

https://github.com/mozilla/bedrock/commit/8ebaa6632855ef2b9dec594f308798abe88c0b98
Bug 914730 - Add language selector to pages using a non-standard footer

https://github.com/mozilla/bedrock/commit/cb54ed066457456c9be3fe04c24cbe8afab8f279
Merge pull request #1257 from kyoshino/bug-914730-lang-switcher

Bug 914730 - Add language selector to pages using a non-standard footer
Looks nice: https://www-dev.allizom.org/en-US/firefox/new/
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
verified fixed http://www.mozilla.org/en-US/firefox/new/
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.