Open Bug 1195068 Opened 9 years ago Updated 4 years ago

Implement standalone Translation Bar and Update Bar

Categories

(www.mozilla.org :: Pages & Content, defect)

Production
defect
Not set
normal

Tracking

(Not tracked)

People

(Reporter: kohei, Unassigned)

References

Details

(Whiteboard: [kb=1823966])

Since Tabzilla has been made static, we need the standalone Translation Bar and Update Bar. Not only www.mozilla.org but other sites like SUMO were using those tools.
I would like to take this one if there is no intended assignee.
Flags: needinfo?(jbertsch)
Flags: needinfo?(bsternthal)
(In reply to Schalk Neethling [:espressive] from comment #1)
> I would like to take this one if there is no intended assignee.

It's all yours!
Flags: needinfo?(jbertsch)
Flags: needinfo?(bsternthal)
Assignee: nobody → schalk.neethling.bugs
So this is going to be much the same as the new Tabzilla? You add it to your site?

With that, is the translation bar and update bar combined or, can the user user/developer choose?
Flags: needinfo?(malexis)
(In reply to Schalk Neethling [:espressive] from comment #4)
> So this is going to be much the same as the new Tabzilla? You add it to your
> site?
> 
> With that, is the translation bar and update bar combined or, can the user
> user/developer choose?

That's a product question that I don't have the answer for so passing to Jen. We can discuss when she's back on Wed.
Flags: needinfo?(malexis) → needinfo?(jbertsch)
(In reply to Schalk Neethling [:espressive] from comment #4)
> So this is going to be much the same as the new Tabzilla? You add it to your
> site?
> 
> With that, is the translation bar and update bar combined or, can the user
> user/developer choose?

I would vote for two separate bars so that each site owner could choose?  Want to ask on Web Dev with a cc to Kadir, Patrick, hoosteeno and Amy Tsay?
Flags: needinfo?(jbertsch)
Sure thing Jen. Just to be sure though, which Patrick is that? ;) Thanks!
Flags: needinfo?(jbertsch)
(In reply to Schalk Neethling [:espressive] from comment #7)
> Sure thing Jen. Just to be sure though, which Patrick is that? ;) Thanks!

Patrick McClard
Flags: needinfo?(jbertsch)
I did not get much feedback from the posting to the webdev channel but, I really think having these as two separate implementation makes sense. With that said, I will know more once I start extracting and putting these together as there may be dependencies between the two.
After having a look at the code there is enough cross dependency between the two to warrant having this in one repo instead of two but, we can still split or combine the two using different build targets that will be added.

So, a developer will be able to choose whether they want just the update/translation bar or both.
I have a question regarding the update bar, which is just about ready to ship.

This relies on knowing the latest Firefox version, of course. On bedrock, this is not a problem, as it can be read from the html element as an attribute. The question is, how will this be handled for other sites, whether that be a Mozilla property or not?

Is there a way we can get this with JS or, would we need to implement an Ajax call to get the latest version? Thanks
Flags: needinfo?(jbertsch)
I think I can answer the question here.

My original implementation was embedding the latest version directly to tabzilla.js, which was a Django template:

https://github.com/mozilla/bedrock/blob/master/bedrock/tabzilla/templates/tabzilla/tabzilla.js#L475

And the Translation Bar was retrieving localized strings using a separate Ajax call (because the current page and translated page are different languages):

https://github.com/mozilla/bedrock/blob/master/bedrock/tabzilla/templates/tabzilla/tabzilla.js#L462-L470

So we could implement those 2 info bars at once and get the latest version along with the localized strings. (in short, adding the version info to transbar.jsonp)

Bug 1146897 offers product details JSON files, but it may be overloaded, I guess.
Flags: needinfo?(jbertsch)
(In reply to Kohei Yoshino [:kohei] from comment #12)
> I think I can answer the question here.
> 
> My original implementation was embedding the latest version directly to
> tabzilla.js, which was a Django template:
> 
> https://github.com/mozilla/bedrock/blob/master/bedrock/tabzilla/templates/
> tabzilla/tabzilla.js#L475
> 
> And the Translation Bar was retrieving localized strings using a separate
> Ajax call (because the current page and translated page are different
> languages):
> 
> https://github.com/mozilla/bedrock/blob/master/bedrock/tabzilla/templates/
> tabzilla/tabzilla.js#L462-L470
> 
> So we could implement those 2 info bars at once and get the latest version
> along with the localized strings. (in short, adding the version info to
> transbar.jsonp)
> 
> Bug 1146897 offers product details JSON files, but it may be overloaded, I
> guess.

Exactly what I was pondering, thanks Kohei!
No longer blocks: 1217353
Depends on: 1217353
(In reply to Michal Stanke (Mozilla.cz) [:MikkCZ] from comment #14)
> What about https://github.com/mozilla/mozilla-infobar/?

This is the new infobar, we are currently implementing it on mozilla.org to test real world usage after which we will be releasing the above for general usage.
(In reply to Schalk Neethling [:espressive] from comment #15)
> (In reply to Michal Stanke (Mozilla.cz) [:MikkCZ] from comment #14)
> > What about https://github.com/mozilla/mozilla-infobar/?
> 
> This is the new infobar, we are currently implementing it on mozilla.org to
> test real world usage after which we will be releasing the above for general
> usage.


:espressive what is the current status of mozilla-infobar? Is it in a state where it could be used on sumo and unblock bug 1191994?
Flags: needinfo?(schalk.neethling.bugs)
(In reply to Josh Mize [:jgmize] from comment #16)
> (In reply to Schalk Neethling [:espressive] from comment #15)
> > (In reply to Michal Stanke (Mozilla.cz) [:MikkCZ] from comment #14)
> > > What about https://github.com/mozilla/mozilla-infobar/?
> > 
> > This is the new infobar, we are currently implementing it on mozilla.org to
> > test real world usage after which we will be releasing the above for general
> > usage.
> 
> 
> :espressive what is the current status of mozilla-infobar? Is it in a state
> where it could be used on sumo and unblock bug 1191994?

This has kinda fallen of the wagon. It is currently, and has been for a while, blocked on UX and design work. But people have been overloaded with other priorities and this kinda feel into the backlog.
Flags: needinfo?(schalk.neethling.bugs)
I wanna take this as the original infobar implementer if :espressive and others are busy. We should restore at least the former behaviour and design, right? Losing the Translation Bar is a UX regression for international visitors.
Basically I'd like to contribute on IA and UX things this year.
(In reply to Kohei Yoshino [:kohei] from comment #18)
> I wanna take this as the original infobar implementer if :espressive and
> others are busy. We should restore at least the former behaviour and design,
> right? Losing the Translation Bar is a UX regression for international
> visitors.

Thanks Kohei, that sounds awesome to me. I think the former behavior and design are exactly what is needed to migrate sites like sumo off of old tabzilla.
Thank Kohei, that has been done here:
https://github.com/mozilla/mozilla-infobar/ (standalone repo)

Here is the PR:
https://github.com/mozilla/bedrock/pull/3895

You will most likely need to speak to Jen and Holly to get the ball rolling again.
(In reply to Schalk Neethling [:espressive] from comment #21)
> Thank Kohei, that has been done here:
> https://github.com/mozilla/mozilla-infobar/ (standalone repo)

Thanks for the info :espressive. When you say "that has been done here", do you mean that as far as you understand it the implementation in that repo is fully ready as a drop-in replacement for production use in other sites like support.mozilla.org?

Kohei, would you be willing to work on a PR against https://github.com/mozilla/kitsune/ to replace old tabzilla with the new one plus this infobar?

> Here is the PR:
> https://github.com/mozilla/bedrock/pull/3895
> 
> You will most likely need to speak to Jen and Holly to get the ball rolling
> again.

To clarify I believe this is true for the bedrock PR, but for a sumo PR I don't believe we have any blockers. As I understand it Jen would only need to be involved for changes to bedrock (as the product manager), Holly should be consulted for design changes (which we are explicitly avoiding). Giorgos is now the primary developer on sumo, but I can help out with code reviews as necessary.
see comment #22
Flags: needinfo?(schalk.neethling.bugs)
Flags: needinfo?(kohei.yoshino)
Hey Josh and Kohei,

So I reckon this is one of the reasons we were looking into getting the code from the repo into bedrock, so we can determine whether this works as expected in an active website. This should work as is, but there might be some tweaking needed to the repo and the integration into 3rd party websites such as SUMO.

If Kohei is able to take this one, that would be awesome and I will be available for any questions that might arise. Thanks for picking this up, it has been dormant for to long.
Flags: needinfo?(schalk.neethling.bugs)
:kohei, are you working on this now?
Hello,

what is the status of this bug? It's been reported for more than a year now, but almost no progress has been made since. Repo mentioned in comment #22 has no commits since February.

I know this is not a big problem in English speaking countries, but because almost every single link on the internet contains that crappy /en-US/ language selector, it is making all our localization work pretty useless.
Users that don't speak English will leave such page (in en-US) almost immediately, and although asking them to click on another link to get to content in their language is not an ideal scenario, it would AT LEAST give them CHANCE to read it.
Assignee: schalk.neethling.bugs → nobody
Looks like we need this anyway! Will find time next month.
Assignee: nobody → kohei.yoshino
Flags: needinfo?(kohei.yoshino)
Assignee: kohei.yoshino → nobody
You need to log in before you can comment on or make changes to this bug.