Skip to content

Commit

Permalink
WNP 118 (#13619) (#13655)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephaniehobson authored Sep 25, 2023
1 parent 2fd9fc2 commit a3f2a8c
Show file tree
Hide file tree
Showing 17 changed files with 665 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 60 additions & 0 deletions bedrock/firefox/templates/firefox/whatsnew/whatsnew-fx118-de.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{#
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.
#}

{% extends "firefox/whatsnew/base.html" %}

{% block page_title %}What’s new with Firefox{% endblock %}

{#- This will appear as <meta property="og:description"> which can be used for social share -#}
{% block page_og_desc %}{{ ftl('whatsnew-page-description') }}{% endblock %}

{% block body_id %}firefox-whatsnew{% endblock %}

{% block page_css %}
{{ css_bundle('firefox_whatsnew_118') }}
{% endblock %}

{% block site_header %}{% endblock %}


{% block wnp_content %}
<section class="wnp-content-main">
<div class="mzp-l-content mzp-t-content-sm">
<aside class="wnp-swap">
<div class="wnp-swap-blurb-here">
<span class="wnp-swap-text-here" lang="es-ES">hola 🥘</span>
{% include 'firefox/whatsnew/includes/fx118/arrow-blue.svg' %}
</div>
<div class="wnp-swap-blurb-there">
<span class="wnp-swap-text-there" lang="de">hallo 🥨</span>
{% include 'firefox/whatsnew/includes/fx118/arrow-white.svg' %}
</div>
</aside>

<h2>Sag <span lang="es-ES">Hola</span> zu Firefox&nbsp;translations</h2>

<div id="wnp-cta">
<div id="cta-try">
<p>Übersetze das Web lokal auf deinem Gerät, damit deine Daten sicher bleiben. Firefox hat jetzt einen eingebauten Übersetzer, damit du nie wieder eine Drittanbieter-App zum Übersetzen brauchst.</p>
<p>Klicke auf das {% include 'firefox/whatsnew/includes/fx118/translate-icon.svg' %} Icon in der Adressleiste von Firefox und genieße noch mehr Inhalte aus dem Web.</p>
<a class="mzp-c-button mzp-t-product" href="https://www.mozilla.org/es-ES/" data-cta-type="button" data-cta-text="Try it now">Jetzt ausprobieren</a>
</div>

<div id="cta-default">
<p>Übersetze das Web lokal auf deinem Gerät, damit deine Daten sicher bleiben. Wenn du Firefox zu deinem Standardbrowser machst, brauchst du dank des eingebauten Übersetzers nie wieder eine andere App oder Website zum Übersetzen.</p>
<a class="mzp-c-button mzp-t-product" href="{{ url('firefox.set-as-default.thanks') }}" data-cta-type="button" data-cta-text="Set Firefox as your default browser">Mach Firefox zum Standardbrowser</a>
</div>
</div>

</div>

</section>
{% endblock %}

{% block js %}
{{ js_bundle('firefox_whatsnew_update') }}
{{ js_bundle('firefox_whatsnew_118') }}
{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{#
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.
#}

{% extends "firefox/whatsnew/base.html" %}

{% block page_title %}What’s new with Firefox{% endblock %}

{#- This will appear as <meta property="og:description"> which can be used for social share -#}
{% block page_og_desc %}{{ ftl('whatsnew-page-description') }}{% endblock %}

{% block body_id %}firefox-whatsnew{% endblock %}

{% block page_css %}
{{ css_bundle('firefox_whatsnew_118') }}
{% endblock %}

{% block site_header %}{% endblock %}


{% block wnp_content %}
<section class="wnp-content-main">
<div class="mzp-l-content mzp-t-content-sm">
<aside class="wnp-swap">
<div class="wnp-swap-blurb-here">
<span class="wnp-swap-text-here" lang="en">hello 🍁</span>
{% include 'firefox/whatsnew/includes/fx118/arrow-blue.svg' %}
</div>
<div class="wnp-swap-blurb-there">
<span class="wnp-swap-text-there" lang="fr">bonjour ⚜️</span>
{% include 'firefox/whatsnew/includes/fx118/arrow-white.svg' %}
</div>
</aside>

<h2>Say ‘<span lang="fr">Bonjour</span>’ to Firefox&nbsp;translations</h2>

<p>Translate the web within Firefox, so your data stays safe.</p>

<p>Click the {% include 'firefox/whatsnew/includes/fx118/translate-icon.svg' %} icon in Firefox’s address bar and enjoy content across the web.</p>

<p>
<a id="cta-now" class="mzp-c-button mzp-t-product" href="https://www.mozilla.org/fr/" data-cta-type="button" data-cta-text="Try it now">Try it now</a>
</p>

</div>

</section>
{% endblock %}

{% block js %}
{{ js_bundle('firefox_whatsnew_update') }}
{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{#
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.
#}

{% extends "firefox/whatsnew/base.html" %}

{% block page_title %}What’s new with Firefox{% endblock %}

{#- This will appear as <meta property="og:description"> which can be used for social share -#}
{% block page_og_desc %}{{ ftl('whatsnew-page-description') }}{% endblock %}

{% block body_id %}firefox-whatsnew{% endblock %}

{% block page_css %}
{{ css_bundle('firefox_whatsnew_118') }}
{% endblock %}

{% block site_header %}{% endblock %}


{% block wnp_content %}
<section class="wnp-content-main">
<div class="mzp-l-content mzp-t-content-sm">
<aside class="wnp-swap">
<div class="wnp-swap-blurb-here">
<span class="wnp-swap-text-here" lang="en">hello 🫖</span>
{% include 'firefox/whatsnew/includes/fx118/arrow-blue.svg' %}
</div>
<div class="wnp-swap-blurb-there">
<span class="wnp-swap-text-there" lang="fr">bonjour 🥖</span>
{% include 'firefox/whatsnew/includes/fx118/arrow-white.svg' %}
</div>
</aside>

<h2>Say ‘<span lang="fr">Bonjour</span>’ to Firefox&nbsp;translations</h2>

<div id="wnp-cta">
<div id="cta-try">
<p>Translate the web locally, so your data stays safe. Firefox now comes with an integrated translation tool, so you never have to use a third-party app again.</p>
<p>Click the {% include 'firefox/whatsnew/includes/fx118/translate-icon.svg' %} in Firefox’s address bar and enjoy content from around the world.</p>
<a class="mzp-c-button mzp-t-product" href="https://www.mozilla.org/fr/" data-cta-type="button" data-cta-text="Try it now">Try it now</a>
</div>

<div id="cta-default">
<p>Translate the web locally, so your data stays safe. Our translation tool is now integrated in Firefox, so by setting it as your default browser, you’d never have to use another app or website again.</p>
<a class="mzp-c-button mzp-t-product" href="{{ url('firefox.set-as-default.thanks') }}" data-cta-type="button" data-cta-text="Set Firefox as your default browser">Set Firefox as your default browser</a>
</div>
</div>

</div>

</section>
{% endblock %}

{% block js %}
{{ js_bundle('firefox_whatsnew_update') }}
{{ js_bundle('firefox_whatsnew_118') }}
{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{#
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.
#}

{% extends "firefox/whatsnew/base.html" %}

{% block page_title %}What’s new with Firefox{% endblock %}

{#- This will appear as <meta property="og:description"> which can be used for social share -#}
{% block page_og_desc %}{{ ftl('whatsnew-page-description') }}{% endblock %}

{% block body_id %}firefox-whatsnew{% endblock %}

{% block page_css %}
{{ css_bundle('firefox_whatsnew_118') }}
{% endblock %}

{% block site_header %}{% endblock %}


{% block wnp_content %}
<section class="wnp-content-main">
<div class="mzp-l-content mzp-t-content-sm">
<aside class="wnp-swap">
<div class="wnp-swap-blurb-here">
<span class="wnp-swap-text-here" lang="en-US">how are you? 🇺🇸</span>
{% include 'firefox/whatsnew/includes/fx118/arrow-blue.svg' %}
</div>
<div class="wnp-swap-blurb-there">
<span class="wnp-swap-text-there" lang="es-MX">cómo estás? 🇲🇽</span>
{% include 'firefox/whatsnew/includes/fx118/arrow-white.svg' %}
</div>
</aside>

<h2>Say ‘<span lang="es-MX">Hola</span>’ to Firefox&nbsp;translations</h2>

<p>Translate the web within Firefox, so your data stays safe.</p>

<p>Click the {% include 'firefox/whatsnew/includes/fx118/translate-icon.svg' %} icon in Firefox’s address bar and enjoy content across the web.</p>

<p>
<a id="cta-now" class="mzp-c-button mzp-t-product" href="https://www.mozilla.org/es-MX/" data-cta-type="button" data-cta-text="Try it now">Try it now</a>
</p>

</div>

</section>
{% endblock %}

{% block js %}
{{ js_bundle('firefox_whatsnew_update') }}
{% endblock %}
60 changes: 60 additions & 0 deletions bedrock/firefox/templates/firefox/whatsnew/whatsnew-fx118-fr.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{#
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.
#}

{% extends "firefox/whatsnew/base.html" %}

{% block page_title %}What’s new with Firefox{% endblock %}

{#- This will appear as <meta property="og:description"> which can be used for social share -#}
{% block page_og_desc %}{{ ftl('whatsnew-page-description') }}{% endblock %}

{% block body_id %}firefox-whatsnew{% endblock %}

{% block page_css %}
{{ css_bundle('firefox_whatsnew_118') }}
{% endblock %}

{% block site_header %}{% endblock %}


{% block wnp_content %}
<section class="wnp-content-main">
<div class="mzp-l-content mzp-t-content-sm">
<aside class="wnp-swap">
<div class="wnp-swap-blurb-here">
<span class="wnp-swap-text-here" lang="en-GB">hello 🫖</span>
{% include 'firefox/whatsnew/includes/fx118/arrow-blue.svg' %}
</div>
<div class="wnp-swap-blurb-there">
<span class="wnp-swap-text-there" lang="fr">bonjour 🥖</span>
{% include 'firefox/whatsnew/includes/fx118/arrow-white.svg' %}
</div>
</aside>

<h2>Dites ‘<span lang="en-GB">Hello</span>’ à Firefox&nbsp;translations</h2>

<div id="wnp-cta">
<div id="cta-try">
<p>Traduisez le web localement, pour que vos données restent sécurisées. Firefox est désormais doté d’un outil de traduction intégré, de sorte que vous n'aurez plus jamais besoin d'utiliser d’application tierce.</p>
<p>Cliquez sur l'icône {% include 'firefox/whatsnew/includes/fx118/translate-icon.svg' %} dans la barre d'adresse de Firefox et profitez de plus de contenu sur le Web.</p>
<a class="mzp-c-button mzp-t-product" href="https://www.mozilla.org/en-GB/" data-cta-type="button" data-cta-text="Try it now">Essayer maintenant</a>
</div>

<div id="cta-default">
<p>Traduisez le web localement, pour que vos données restent sécurisées. En faisant de Firefox votre navigateur par défaut, profitez de son outil de traduction intégré sans plus avoir jamais besoin d'utiliser d’application tierce.</p>
<a class="mzp-c-button mzp-t-product" href="{{ url('firefox.set-as-default.thanks') }}" data-cta-type="button" data-cta-text="Set Firefox as your default browser">Faire de Firefox votre navigateur par défaut</a>
</div>
</div>

</div>

</section>
{% endblock %}

{% block js %}
{{ js_bundle('firefox_whatsnew_update') }}
{{ js_bundle('firefox_whatsnew_118') }}
{% endblock %}
49 changes: 49 additions & 0 deletions bedrock/firefox/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,55 @@ def test_fx_117_0_0_en_us_cn(self, render_mock):

# end 117.0 whatsnew tests

# begin 118.0 whatsnew tests

@override_settings(DEV=True)
def test_fx_118_0_0_en_us(self, render_mock):
"""Should use whatsnew-fx118-en template for en-US locale"""
req = self.rf.get("/firefox/whatsnew/")
req.locale = "en-US"
self.view(req, version="118.0")
template = render_mock.call_args[0][1]
assert template == ["firefox/whatsnew/whatsnew-fx118-en-US.html"]

@override_settings(DEV=True)
def test_fx_118_0_0_en_gb(self, render_mock):
"""Should use whatsnew-fx118-uk template for en-GB locale"""
req = self.rf.get("/firefox/whatsnew/")
req.locale = "en-GB"
self.view(req, version="118.0")
template = render_mock.call_args[0][1]
assert template == ["firefox/whatsnew/whatsnew-fx118-en-GB.html"]

@override_settings(DEV=True)
def test_fx_118_0_0_en_us_gb(self, render_mock):
"""Should use whatsnew-fx118-uk template for en-US locale if country is GB"""
req = self.rf.get("/firefox/whatsnew/", HTTP_CF_IPCOUNTRY="GB")
req.locale = "en-US"
self.view(req, version="118.0")
template = render_mock.call_args[0][1]
assert template == ["firefox/whatsnew/whatsnew-fx118-en-GB.html"]

@override_settings(DEV=True)
def test_fx_118_0_0_de(self, render_mock):
"""Should use whatsnew-fx118-de template for de locale"""
req = self.rf.get("/firefox/whatsnew/")
req.locale = "de"
self.view(req, version="118.0")
template = render_mock.call_args[0][1]
assert template == ["firefox/whatsnew/whatsnew-fx118-de.html"]

@override_settings(DEV=True)
def test_fx_118_0_0_fr(self, render_mock):
"""Should use whatsnew-fx118-fr template for fr locale"""
req = self.rf.get("/firefox/whatsnew/")
req.locale = "fr"
self.view(req, version="118.0")
template = render_mock.call_args[0][1]
assert template == ["firefox/whatsnew/whatsnew-fx118-fr.html"]

# end 118.0 whatsnew tests


@patch("bedrock.firefox.views.l10n_utils.render", return_value=HttpResponse())
class TestFirstRun(TestCase):
Expand Down
Loading

0 comments on commit a3f2a8c

Please sign in to comment.