Skip to content

Commit

Permalink
Only show language tools link when app is firefox (#9927)
Browse files Browse the repository at this point in the history
  • Loading branch information
willdurand committed Nov 7, 2018
1 parent 9e5486d commit 5a55e6c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/olympia/amo/templates/amo/site_nav.html
Expand Up @@ -74,9 +74,9 @@
{% if request and request.APP == amo.FIREFOX %}
<li class="more-mobile"><a href="{{ locale_url(amo.ANDROID.short) }}">
{{ _('Add-ons for Mobile') }}</a></li>
<li class="more-lang"><a href="{{ url('browse.language-tools') }}">
{{ _('Dictionaries & Language Packs') }}</a></li>
{% endif %}
<li class="more-lang"><a href="{{ url('browse.language-tools') }}">
{{ _('Dictionaries & Language Packs') }}</a></li>
<li><a href="{{ url('browse.search-tools') }}">{{ _('Search Tools') }}</a></li>
<li><a href="{{ url('devhub.index') }}">{{ _('Developer Hub') }}</a></li>
</ul>
Expand Down
4 changes: 4 additions & 0 deletions src/olympia/amo/tests/test_views.py
Expand Up @@ -356,6 +356,10 @@ def test_dictionaries_link(self):
assert doc('#site-nav #more .more-lang a').attr('href') == (
reverse('browse.language-tools'))

def test_no_dictionaries_link_when_not_firefox(self):
doc = pq(test.Client().get('/android', follow=True).content)
assert doc('#site-nav #more .more-lang').length == 0

def test_mobile_link_firefox(self):
doc = pq(test.Client().get('/firefox', follow=True).content)
assert doc('#site-nav #more .more-mobile a').length == 1
Expand Down

0 comments on commit 5a55e6c

Please sign in to comment.