Closed
Bug 949143
Opened 10 years ago
Closed 10 years ago
Translation bar: request doesn't disappear after switching language
Categories
(Websites :: Tabzilla, defect)
Websites
Tabzilla
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: flod, Assigned: kohei)
References
Details
(Whiteboard: [kb=1219847])
Attachments
(1 file)
Test case. 1) Open mozilla.org/de with a browser set to a different language (in my case Italian). 2) Say yes to the request of displaying the page in Italian. 3) The translation bar still shows asking if I want to display the page in Italian (but it's already in Italian).
Reporter | ||
Comment 1•10 years ago
|
||
I'm seeing this on OS 10.9, Firefox 29.0a1 (2013-12-11)
Comment 2•10 years ago
|
||
I can't reproduce with Firefox 26 on Linux
Reporter | ||
Updated•10 years ago
|
Summary: Translation bar: request should disappear after switching language → Translation bar: request doesn't disappear after switching language
Reporter | ||
Comment 3•10 years ago
|
||
Found the culprit Default value, translation bar doesn't work as expected intl.accept_languages = it-IT, it, en-US, en With these settings it disappears intl.accept_languages = it,it-it,en-us,en
Assignee | ||
Comment 4•10 years ago
|
||
I think I have added a code to deal with such a case (eg. it vs it-IT, fr vs fr-FR, etc.) but anyway let me check.
Assignee: nobody → kohei.yoshino
Status: NEW → ASSIGNED
Comment 5•10 years ago
|
||
locally, if I move this block at line 354: https://github.com/mozilla/bedrock/blob/master/bedrock/tabzilla/templates/tabzilla/tabzilla.js#L354 if (!userLang || !pageLang || userLang.toLowerCase() === pageLang.toLowerCase()) { console.log('boo'); return; } after line https://github.com/mozilla/bedrock/blob/master/bedrock/tabzilla/templates/tabzilla/tabzilla.js#L387 that is to say, after the final normalization of the language code, it works for me.
Comment 6•10 years ago
|
||
discar the console.log() part above, that was part of my testing ;)
Comment 7•10 years ago
|
||
FYI, This also affects Turkish.
Assignee | ||
Comment 8•10 years ago
|
||
Will take a look along with Bug 949828.
Assignee | ||
Comment 10•10 years ago
|
||
Thanks guys, I just sent a PR to fix the issue.
Assignee | ||
Updated•10 years ago
|
Whiteboard: [kb=1219847]
Comment 11•10 years ago
|
||
Commits pushed to master at https://github.com/mozilla/bedrock https://github.com/mozilla/bedrock/commit/ca890a88b362a2e73ec5e06da2637b33f54557b5 Fix Bug 949143 - Translation bar: request doesn't disappear after switching language https://github.com/mozilla/bedrock/commit/940cd70173ae452a0573d40019e741814ba6f417 Merge pull request #1537 from kyoshino/bug-949143-transbar-legacy Fix Bug 949143 - Translation bar: request doesn't disappear after switching language
Updated•10 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment 12•10 years ago
|
||
Should the fix be live at this point? Because it still doesn't work for Turkish.
Reporter | ||
Comment 13•10 years ago
|
||
It should be visible on www-dev.allizom.org in 15 minutes, still need to be pushed to prod (I guess later today).
Assignee | ||
Comment 14•10 years ago
|
||
Selim: can you verify the fix on https://www-dev.allizom.org/tr/ Now the Translation Bar should be hidden even if your navigator.language (the intl.accept_languages preference in Firefox) is tr-TR instead of tr. The fix should also work with other obsolete ab-CD style navigator.language like fr-FR, it-IT, el-GR or ja-JP.
Flags: needinfo?(selim)
Reporter | ||
Comment 15•10 years ago
|
||
Works for me on https://www-dev.allizom.org/it/ (bar doesn't appear). Funny thing is if I open https://www-dev.allizom.org/tr/ and choose YES to display the page in Italian, I get redirect to prod (https://www.mozilla.org/it)
Assignee | ||
Comment 16•10 years ago
|
||
(In reply to Francesco Lodolo [:flod] from comment #15) > Funny thing is if I open https://www-dev.allizom.org/tr/ and choose YES to > display the page in Italian, I get redirect to prod > (https://www.mozilla.org/it) Yes, because the destination is based on the alternate URL: <link rel="alternate" hreflang="it" href="http://www.mozilla.org/it/" title="Italiano">
You need to log in
before you can comment on or make changes to this bug.
Description
•