diff --git a/bedrock/firefox/templates/firefox/whatsnew/includes/mofo-donate-cta.html b/bedrock/firefox/templates/firefox/whatsnew/includes/mofo-donate-cta.html new file mode 100644 index 00000000000..eff8f559947 --- /dev/null +++ b/bedrock/firefox/templates/firefox/whatsnew/includes/mofo-donate-cta.html @@ -0,0 +1,34 @@ +{# + 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/. +#} + +{% if LANG == 'fr' %} + {% set donate_cta = "Faire un don à la Fondation Mozilla" %} +{% elif LANG == 'de' %} + {% set donate_cta = "Spende an die Mozilla Foundation" %} +{% elif LANG == 'es-ES' %} + {% set donate_cta = "Donar a la Fundación Mozilla" %} +{% elif LANG == 'it' %} + {% set donate_cta = "Dona alla Mozilla Foundation" %} +{% elif LANG == 'pl' %} + {% set donate_cta = "Wesprzyj Fundację Mozilli darowizną" %} +{% else %} + {% set donate_cta = "Donate to the Mozilla Foundation" %} +{% endif %} + +
+ + + + + + + {% if ftl_has_messages('whatsnew-donate-to-mofo') %} + {{ ftl('whatsnew-donate-to-mofo') }} + {% else %} + {{ donate_cta }} + {% endif %} + +
diff --git a/bedrock/firefox/templates/firefox/whatsnew/index-thanks.html b/bedrock/firefox/templates/firefox/whatsnew/index-thanks.html new file mode 100644 index 00000000000..c3a5ecafacf --- /dev/null +++ b/bedrock/firefox/templates/firefox/whatsnew/index-thanks.html @@ -0,0 +1,42 @@ +{# + 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 %}{{ ftl('whatsnew-page-title') }}{% endblock %} +{% block page_desc %}{{ ftl('whatsnew-page-description') }}{% endblock %} + +{#- This will appear as which can be used for social share -#} +{% block page_og_desc %}{{ ftl('whatsnew-page-description') }}{% endblock %} + +{% block body_id %}firefox-whatsnew{% endblock %} +{% block body_class %}{% endblock %} + +{% block site_header %}{% endblock %} + +{% block page_css %} + {{ css_bundle('firefox_whatsnew') }} +{% endblock %} + +{% block wnp_content %} +
+
+

{{ ftl('whatsnew-thanks-for-choosing') }}

+
+
+ + +{% endblock %} + +{% block js %} + {{ js_bundle('firefox_whatsnew') }} +{% endblock %} diff --git a/bedrock/firefox/templates/firefox/whatsnew/index.html b/bedrock/firefox/templates/firefox/whatsnew/index.html index 6f13abc2209..b130654884f 100644 --- a/bedrock/firefox/templates/firefox/whatsnew/index.html +++ b/bedrock/firefox/templates/firefox/whatsnew/index.html @@ -45,6 +45,14 @@

{{ ftl('whatsnew-s2d-download-firefox-for-your') }} + + {% endblock %} {% block js %} diff --git a/bedrock/firefox/templates/firefox/whatsnew/whatsnew-fx128-eu-addons.html b/bedrock/firefox/templates/firefox/whatsnew/whatsnew-fx128-eu-addons.html new file mode 100644 index 00000000000..d23e7301b5c --- /dev/null +++ b/bedrock/firefox/templates/firefox/whatsnew/whatsnew-fx128-eu-addons.html @@ -0,0 +1,110 @@ +{# + 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/. +#} + +{% from "macros-protocol.html" import split with context %} + +{% extends "firefox/whatsnew/base.html" %} + +{% block page_title %}{{ ftl('whatsnew-page-title') }}{% endblock %} + +{#- This will appear as which can be used for social share -#} +{% block page_og_desc %}{{ ftl('whatsnew-page-description') }}{% endblock %} + +{% block body_id %}firefox-whatsnew{% endblock %} + +{% block site_header %}{% endblock %} + +{% block page_css %} + {{ css_bundle('protocol-split') }} + {{ css_bundle('firefox_whatsnew_128_eu') }} +{% endblock %} + +{% block experiments %} + {% if switch('experiment-firefox-whatsnew-128-eu') %} + {{ js_bundle('firefox_whatsnew_128_eu') }} + {% endif %} +{% endblock %} + +{% if LANG == 'fr' %} + {% set main_title = "Un navigateur qui vous ressemble" %} + {% set image_alt_text = "Mon Firefox: Plus de vitesse. Plus de sécurité. Plus de fun." %} + {% set main_tagline = "Découvrez des extensions qui rendent votre navigation encore plus rapide, plus sûre et plus fun." %} + {% set page_cta = "Personnaliser mon Firefox" %} + {% set cta_link = "https://addons.mozilla.org/fr/firefox/" %} + +{% elif LANG == 'de' %} + {% set main_title = "Ein wirklich persönlicher Browser" %} + {% set image_alt_text = "Mein Firefox: Schneller. Sicherer. Persönlicher." %} + {% set main_tagline = "Entdecke Erweiterungen, die dein Browsing schneller, sicherer und persönlicher machen." %} + {% set page_cta = "Personalisiere deinen Firefox" %} + {% set cta_link = "https://addons.mozilla.org/de/firefox/" %} + +{% elif LANG == 'es-ES' %} + {% set main_title = "Un navegador que se adapta a ti" %} + {% set image_alt_text = "Mi Firefox: Más velocidad. Más seguridad. Más diversión." %} + {% set main_tagline = "Descubre las extensiones que hacen tu navegación aún más rápida, segura y divertida." %} + {% set page_cta = "Personaliza tu Firefox" %} + {% set cta_link = "https://addons.mozilla.org/es/firefox/" %} + +{% elif LANG == 'it' %} + {% set main_title = "Un browser che si adatta a te" %} + {% set image_alt_text = "Il mio Firefox: Più veloce. Più sicuro. Più divertente." %} + {% set main_tagline = "Scopri tutte le estensioni che rendono la tua navigazione ancora più veloce, sicura e divertente." %} + {% set page_cta = "Personalizza il tuo Firefox" %} + {% set cta_link = "https://addons.mozilla.org/it/firefox/" %} + +{% elif LANG == 'pl' %} + {% set main_title = "Przeglądarka na miarę twoich potrzeb" %} + {% set image_alt_text = "Mój Firefox: Szybciej. Bezpieczniej. Ciekawiej." %} + {% set main_tagline = "Odkryj rozszerzenia, z którymi przeglądanie będzie jeszcze szybsze, jeszcze bezpieczniejsze i jeszcze fajniejsze" %} + {% set page_cta = "Spersonalizuj swojego Firefoksa" %} + {% set cta_link = "https://addons.mozilla.org/pl/firefox/" %} + +{% else %} + {% set main_title = "A browser that’s truly yours" %} + {% set image_alt_text = "My Firefox: More Speed. More Security. More Fun." %} + {% set main_tagline = "Discover extensions that make your browsing even faster, safer and more fun." %} + {% set page_cta = "Personalise your Firefox" %} + {% set cta_link = "https://addons.mozilla.org/en-GB/firefox/" %} +{% endif %} + +{% block wnp_content %} +
+
+

{{ main_title }}

+ + {{ picture( + url='img/firefox/wnp-128/addon.svg', + optional_attributes={ + 'class': 'wnp-main-image', + 'alt': image_alt_text, + 'width': '554', + 'height': '300', + 'l10n': True, + } + ) }} + +

+ {{ main_tagline }} +

+ +

+ + {{ page_cta }} + +

+
+
+ + +{% endblock %} + +{% block js %} + {{ js_bundle('firefox_whatsnew_128_eu') }} +{% endblock %} diff --git a/bedrock/firefox/templates/firefox/whatsnew/whatsnew-fx128-eu-donate.html b/bedrock/firefox/templates/firefox/whatsnew/whatsnew-fx128-eu-donate.html new file mode 100644 index 00000000000..92cbccdd3f0 --- /dev/null +++ b/bedrock/firefox/templates/firefox/whatsnew/whatsnew-fx128-eu-donate.html @@ -0,0 +1,115 @@ +{# + 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 %}{{ ftl('whatsnew-page-title') }}{% endblock %} + +{#- This will appear as which can be used for social share -#} +{% block page_og_desc %}{{ ftl('whatsnew-page-description') }}{% endblock %} + +{% block body_id %}firefox-whatsnew{% endblock %} + +{% block site_header %}{% endblock %} + +{% block page_css %} + {{ css_bundle('firefox_whatsnew_128_eu') }} +{% endblock %} + +{% block experiments %} + {% if switch('experiment-firefox-whatsnew-128-eu') %} + {{ js_bundle('firefox_whatsnew_128_eu') }} + {% endif %} +{% endblock %} + +{% if LANG == 'fr' %} + {% set main_title = "Faites un don à la Fondation Mozilla, l'organisme à but non lucratif derrière Firefox" %} + + {% if variant == '2' %} + {% set main_tagline = "Firefox est un navigateur rapide comme l'éclair qui ne sacrifie pas votre vie privée avec des politiques de confidentialité douteuses. Ce navigateur est soutenu par la Fondation Mozilla - un mouvement mondial de gens qui travaillent à garder l'Internet ouvert et accessible à tous." %} + {% set secondary_tagline = "Vous avez choisi Firefox comme navigateur Internet, et maintenant nous espérons que vous ferez le prochain pas pour reprendre le contrôle d’Internet. Faites un don aujourd'hui à la Fondation Mozilla." %} + {% set donate_link = "https://foundation.mozilla.org/?form=Firefox-FR-B" %} + {% elif variant == '3' %} + {% set main_tagline = "Merci d'utiliser Firefox, le navigateur soutenu par la Fondation Mozilla. Rejoignez maintenant l'organisation qui mobilise les gens dans le monde entier pour protéger notre vie privée en ligne, exiger des grandes entreprises technologiques qu’elles rendent des comptes, et établir une IA digne de confiance. Ensemble, nous pouvons construire le mouvement qui garantira que l'avenir de l'Internet place les individus au centre." %} + {% set secondary_tagline = "Si vous êtes prêt à reprendre le contrôle d'Internet avec nous, pouvez-vous faire un don à la Fondation Mozilla dès aujourd'hui ?" %} + {% set donate_link = "https://foundation.mozilla.org/?form=Firefox-FR-C" %} + {% endif %} + + {% set page_cta = "Faire un don" %} + {% set cta_link = "https://addons.mozilla.org/fr/firefox/" %} + +{% elif LANG == 'de' %} + {% set main_title = "Spende der Mozilla Foundation, der Non-Profit-Organisation hinter Firefox" %} + + {% if variant == '2' %} + {% set main_tagline = "Firefox ist ein blitzschneller Browser, der dich nicht mit fragwürdigen Datenschutzrichtlinien oder Hintertürchen für Werbetreibende hintergeht. Dieser Browser wird von der Mozilla Foundation unterstützt – eine globale Bewegung von Menschen, die daran arbeiten, das Internet offen und allen zugänglich zu machen." %} + {% set secondary_tagline = "Du hast Firefox als Browser gewählt – jetzt würden wir uns freuen, wenn du den nächsten Schritt machst, das Internet zurückzuerobern. Spende noch heute an die Mozilla Foundation." %} + {% set donate_link = "https://foundation.mozilla.org/?form=Firefox-DE-B" %} + {% elif variant == '3' %} + {% set main_tagline = "Vielen Dank, dass du Firefox nutzt – der Browser, der von der Non-Profit-Organisation Mozilla Foundation unterstützt wird. Werde jetzt Teil der Organisation, die weltweit Menschen vereint, um gemeinsam online die Privatsphäre zu schützen, große Tech-Unternehmen verantwortlich zu machen und vertrauenswürdige KI zu etablieren. Gemeinsam müssen wir dafür sorgen, dass das Internet der Zukunft den Menschen über alles stellt." %} + {% set secondary_tagline = "Wenn du bereit bist, dir das Internet zurückzuholen, kannst du noch heute der Mozilla Foundation etwas spenden?" %} + {% set donate_link = "https://foundation.mozilla.org/?form=Firefox-DE-C" %} + {% endif %} + + {% set page_cta = "Spenden" %} + {% set cta_link = "https://addons.mozilla.org/de/firefox/" %} + +{% else %} + {% set main_title = "Donate to the Mozilla Foundation, the non-profit behind Firefox" %} + + {% if variant == '2' %} + {% set main_tagline = "Firefox is a lightning-fast browser that doesn't sell you out with shady privacy policies or back doors for advertisers. This browser is backed by the Mozilla Foundation – a global movement of people working to keep the internet open and accessible to all." %} + {% set secondary_tagline = "You chose Firefox as your internet browser, and now we hope you’ll take the next step to reclaim the internet. Make a donation today to the Mozilla Foundation." %} + {% set donate_link = "https://foundation.mozilla.org/?form=Firefox-UK-B" %} + {% elif variant == '3' %} + {% set main_tagline = "Thanks for using Firefox, which is backed by the non-profit Mozilla Foundation. Now join the organization that mobilizes people worldwide to protect our privacy online, hold big tech companies accountable, and establish trustworthy AI. Together we must build the movement to ensure the future of the internet puts people first." %} + {% set secondary_tagline = "If you are ready to reclaim the internet, can you make a donation to the Mozilla Foundation today?" %} + {% set donate_link = "https://foundation.mozilla.org/?form=Firefox-UK-C" %} + {% endif %} + + {% set page_cta = "Donate" %} + {% set cta_link = "https://addons.mozilla.org/en-GB/firefox/" %} +{% endif %} + +{% block wnp_content %} +
+
+ {{ picture( + url='img/firefox/whatsnew/whatsnew128-eu/firefox-and-mozilla.png', + optional_attributes={ + 'class': 'wnp-main-image', + 'width': '554', + 'height': '300' + } + ) }} + +

{{ main_title }}

+ +
+ {% if variant == '2' %} +

{{ main_tagline }}

+

{{ secondary_tagline }}

+ {% elif variant == '3' %} +

{{ main_tagline }}

+

{{ secondary_tagline }}

+ {% endif %} +
+ +

+ + {{ page_cta }} + ❤️ + +

+
+
+ + + +{% endblock %} + diff --git a/bedrock/firefox/templates/firefox/whatsnew/whatsnew-fx128-na.html b/bedrock/firefox/templates/firefox/whatsnew/whatsnew-fx128-na.html new file mode 100644 index 00000000000..a5bf48a1d5d --- /dev/null +++ b/bedrock/firefox/templates/firefox/whatsnew/whatsnew-fx128-na.html @@ -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/. +#} + +{% from "macros.html" import video_inline_embed with context %} +{% from "macros-protocol.html" import picto with context %} + +{% extends "firefox/whatsnew/base.html" %} + +{% block page_title %}{{ ftl('whatsnew-page-title') }}{% endblock %} + +{#- This will appear as which can be used for social share -#} +{% block page_og_desc %}{{ ftl('whatsnew-page-description') }}{% endblock %} + +{% block body_id %}firefox-whatsnew{% endblock %} + +{% block site_header %}{% endblock %} + +{% block page_css %} + {{ css_bundle('firefox_whatsnew_128_na') }} +{% endblock %} + +{% block wnp_content %} +
+
+ {{ video_inline_embed( + id='9RLq8JDY0mI', + title='Stick the landing with Firefox', + image=resp_img( + url='img/firefox/whatsnew/whatsnew128-na/gymnast.png', + optional_attributes={ + 'width': '1024', + 'height': '576' + } + ), + ) }} +

World-class multitasking

+ +

Picture-In-Picture lets you watch every cartwheel and handspring without putting your life on pause. Just click the Picture-in-Picture button to pop out any video.

+ +

+ + Learn more + +

+
+
+ + +{% endblock %} + +{% block js %} + {{ js_bundle('video-inline-embed') }} + {{ js_bundle('firefox_whatsnew_128_na') }} +{% endblock %} diff --git a/bedrock/firefox/tests/test_base.py b/bedrock/firefox/tests/test_base.py index b1940ed42e2..bdccb662f0a 100644 --- a/bedrock/firefox/tests/test_base.py +++ b/bedrock/firefox/tests/test_base.py @@ -726,6 +726,136 @@ def test_fx_127_0_0_pl(self, render_mock): # end 127.0 whatsnew tests + # begin 128.0 whatsnew tests + + @override_settings(DEV=True) + def test_fx_128_0_0_en_us(self, render_mock): + """Should use whatsnew-fx128-na template for en-US locale""" + req = self.rf.get("/firefox/whatsnew/") + req.locale = "en-US" + self.view(req, version="128.0") + template = render_mock.call_args[0][1] + assert template == ["firefox/whatsnew/whatsnew-fx128-na.html"] + + @override_settings(DEV=True) + def test_fx_128_0_0_en_ca(self, render_mock): + """Should use whatsnew-fx128-na template for en-CA locale""" + req = self.rf.get("/firefox/whatsnew/") + req.locale = "en-CA" + self.view(req, version="128.0") + template = render_mock.call_args[0][1] + assert template == ["firefox/whatsnew/whatsnew-fx128-na.html"] + + @override_settings(DEV=True) + def test_fx_128_0_0_en_gb_v1(self, render_mock): + """Should use whatsnew-fx128-eu-addons template for en-GB locale and v=1""" + req = self.rf.get("/firefox/whatsnew/") + req.locale = "en-GB" + self.view(req, version="128.0") + template = render_mock.call_args[0][1] + assert template == ["firefox/whatsnew/whatsnew-fx128-eu-addons.html"] + + @override_settings(DEV=True) + def test_fx_128_0_0_fr_v1(self, render_mock): + """Should use whatsnew-fx128-eu-addons template for fr locale and v=1""" + req = self.rf.get("/firefox/whatsnew/") + req.locale = "fr" + self.view(req, version="128.0") + template = render_mock.call_args[0][1] + assert template == ["firefox/whatsnew/whatsnew-fx128-eu-addons.html"] + + @override_settings(DEV=True) + def test_fx_128_0_0_de_v1(self, render_mock): + """Should use whatsnew-fx128-eu-addons template for de locale and v=1""" + req = self.rf.get("/firefox/whatsnew/") + req.locale = "de" + self.view(req, version="128.0") + template = render_mock.call_args[0][1] + assert template == ["firefox/whatsnew/whatsnew-fx128-eu-addons.html"] + + @override_settings(DEV=True) + def test_fx_128_0_0_es_es_v1(self, render_mock): + """Should use whatsnew-fx128-eu-addons template for es-ES locale and v=1""" + req = self.rf.get("/firefox/whatsnew/") + req.locale = "es-ES" + self.view(req, version="128.0") + template = render_mock.call_args[0][1] + assert template == ["firefox/whatsnew/whatsnew-fx128-eu-addons.html"] + + @override_settings(DEV=True) + def test_fx_128_0_0_it_v1(self, render_mock): + """Should use whatsnew-fx128-eu-addons template for it locale and v=1""" + req = self.rf.get("/firefox/whatsnew/") + req.locale = "it" + self.view(req, version="128.0") + template = render_mock.call_args[0][1] + assert template == ["firefox/whatsnew/whatsnew-fx128-eu-addons.html"] + + @override_settings(DEV=True) + def test_fx_128_0_0_pl_v1(self, render_mock): + """Should use whatsnew-fx128-eu-addons template for pl locale and v=1""" + req = self.rf.get("/firefox/whatsnew/") + req.locale = "pl" + self.view(req, version="128.0") + template = render_mock.call_args[0][1] + assert template == ["firefox/whatsnew/whatsnew-fx128-eu-addons.html"] + + @override_settings(DEV=True) + def test_fx_128_0_0_en_gb_v2(self, render_mock): + """Should use whatsnew-fx128-eu-donate template for en-GB locale and v=2""" + req = self.rf.get("/firefox/whatsnew/?v=2") + req.locale = "en-GB" + self.view(req, version="128.0") + template = render_mock.call_args[0][1] + assert template == ["firefox/whatsnew/whatsnew-fx128-eu-donate.html"] + + @override_settings(DEV=True) + def test_fx_128_0_0_fr_v2(self, render_mock): + """Should use whatsnew-fx128-eu-donate template for fr locale and v=2""" + req = self.rf.get("/firefox/whatsnew/?v=2") + req.locale = "fr" + self.view(req, version="128.0") + template = render_mock.call_args[0][1] + assert template == ["firefox/whatsnew/whatsnew-fx128-eu-donate.html"] + + @override_settings(DEV=True) + def test_fx_128_0_0_de_v2(self, render_mock): + """Should use whatsnew-fx128-eu-donate template for de locale and v=2""" + req = self.rf.get("/firefox/whatsnew/?v=2") + req.locale = "de" + self.view(req, version="128.0") + template = render_mock.call_args[0][1] + assert template == ["firefox/whatsnew/whatsnew-fx128-eu-donate.html"] + + @override_settings(DEV=True) + def test_fx_128_0_0_en_gb_v3(self, render_mock): + """Should use whatsnew-fx128-eu-donate template for en-GB locale and v=3""" + req = self.rf.get("/firefox/whatsnew/?v=3") + req.locale = "en-GB" + self.view(req, version="128.0") + template = render_mock.call_args[0][1] + assert template == ["firefox/whatsnew/whatsnew-fx128-eu-donate.html"] + + @override_settings(DEV=True) + def test_fx_128_0_0_fr_v3(self, render_mock): + """Should use whatsnew-fx128-eu-donate template for fr locale and v=3""" + req = self.rf.get("/firefox/whatsnew/?v=3") + req.locale = "fr" + self.view(req, version="128.0") + template = render_mock.call_args[0][1] + assert template == ["firefox/whatsnew/whatsnew-fx128-eu-donate.html"] + + @override_settings(DEV=True) + def test_fx_128_0_0_de_v3(self, render_mock): + """Should use whatsnew-fx128-eu-donate template for de locale and v=3""" + req = self.rf.get("/firefox/whatsnew/?v=3") + req.locale = "de" + self.view(req, version="128.0") + template = render_mock.call_args[0][1] + assert template == ["firefox/whatsnew/whatsnew-fx128-eu-donate.html"] + + # end 127.0 whatsnew tests + @patch("bedrock.firefox.views.l10n_utils.render", return_value=HttpResponse()) class TestFirstRun(TestCase): diff --git a/bedrock/firefox/views.py b/bedrock/firefox/views.py index dbc23375799..ae0144e7019 100644 --- a/bedrock/firefox/views.py +++ b/bedrock/firefox/views.py @@ -371,6 +371,7 @@ class WhatsnewView(L10nTemplateView): "firefox/developer/whatsnew-mdnplus.html": ["firefox/whatsnew/whatsnew-developer-mdnplus"], "firefox/nightly/whatsnew.html": ["firefox/nightly/whatsnew", "firefox/whatsnew/whatsnew"], "firefox/whatsnew/index.html": ["firefox/whatsnew/whatsnew-s2d", "firefox/whatsnew/whatsnew"], + "firefox/whatsnew/index-thanks.html": ["firefox/whatsnew/whatsnew"], "firefox/whatsnew/whatsnew-fx125-na.html": ["firefox/whatsnew/whatsnew"], "firefox/whatsnew/whatsnew-fx125-eu.html": ["firefox/whatsnew/whatsnew"], "firefox/whatsnew/whatsnew-fx126beta-de.html": ["firefox/whatsnew/whatsnew"], @@ -382,6 +383,9 @@ class WhatsnewView(L10nTemplateView): "firefox/whatsnew/whatsnew-fx126-eu.html": ["firefox/whatsnew/whatsnew"], "firefox/whatsnew/whatsnew-fx127-na.html": ["firefox/whatsnew/whatsnew"], "firefox/whatsnew/whatsnew-fx127-eu.html": ["firefox/whatsnew/whatsnew"], + "firefox/whatsnew/whatsnew-fx128-na.html": ["firefox/whatsnew/whatsnew"], + "firefox/whatsnew/whatsnew-fx128-eu-addons.html": ["firefox/whatsnew/whatsnew"], + "firefox/whatsnew/whatsnew-fx128-eu-donate.html": ["firefox/whatsnew/whatsnew"], } # specific templates that should not be rendered in @@ -430,6 +434,8 @@ def get_template_names(self): locale = l10n_utils.get_locale(self.request) version = self.kwargs.get("version") or "" variant = self.request.GET.get("v", None) + nimbus_branch = self.request.GET.get("branch", None) + nimbus_variant = self.request.GET.get("variant", None) # ensure variant matches pre-defined value if variant not in self.variations: @@ -471,6 +477,30 @@ def get_template_names(self): template = "firefox/whatsnew/index.html" else: template = "firefox/whatsnew/index.html" + elif version.startswith("128."): + if locale in ["de", "fr", "en-GB"]: + if variant == "2" or variant == "3": + template = "firefox/whatsnew/whatsnew-fx128-eu-donate.html" + else: + template = "firefox/whatsnew/whatsnew-fx128-eu-addons.html" + elif locale in ["es-ES", "it", "pl"]: + template = "firefox/whatsnew/whatsnew-fx128-eu-addons.html" + elif locale.startswith("en-"): + if country == "GB": + if variant == "2" or variant == "3": + template = "firefox/whatsnew/whatsnew-fx128-eu-donate.html" + else: + template = "firefox/whatsnew/whatsnew-fx128-eu-addons.html" + else: + if nimbus_branch == "experiment-wnp-128-na-pip": + if nimbus_variant == "v1": + template = "firefox/whatsnew/index-thanks.html" + else: + template = "firefox/whatsnew/whatsnew-fx128-na.html" + else: + template = "firefox/whatsnew/whatsnew-fx128-na.html" + else: + template = "firefox/whatsnew/index.html" elif version.startswith("127."): if locale in ["de", "fr", "en-GB", "es-ES", "it", "pl"]: template = "firefox/whatsnew/whatsnew-fx127-eu.html" diff --git a/l10n/en/firefox/whatsnew/whatsnew.ftl b/l10n/en/firefox/whatsnew/whatsnew.ftl index a482bcf0035..9cd4dd81d54 100644 --- a/l10n/en/firefox/whatsnew/whatsnew.ftl +++ b/l10n/en/firefox/whatsnew/whatsnew.ftl @@ -23,3 +23,7 @@ whatsnew-release-notes-v2 = Read the Release Notes to know more whatsnew-release-notes = Read the Release Notes to know more about what’s new in your { -brand-name-firefox } browser. whatsnew-signoff = Powered by { -brand-name-mozilla }. Putting people before profits since 1998. + +whatsnew-donate-to-mofo = Donate to the { -brand-name-mozilla-foundation } + +whatsnew-thanks-for-choosing = Thanks for choosing { -brand-name-firefox } diff --git a/media/css/firefox/whatsnew/includes/_mofo-donate-cta.scss b/media/css/firefox/whatsnew/includes/_mofo-donate-cta.scss new file mode 100644 index 00000000000..6f6d625a91e --- /dev/null +++ b/media/css/firefox/whatsnew/includes/_mofo-donate-cta.scss @@ -0,0 +1,23 @@ +// 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/. + +@import '~@mozilla-protocol/core/protocol/css/includes/lib'; +@import 'dark-mode'; + +/* stylelint-disable declaration-no-important */ + +@media (prefers-color-scheme: dark) { + .wnp-donate-wrapper { + .mzp-c-button { + color: $color-white !important; + border-color: $color-white !important; + + &:hover, + &:focus, + &:active { + color: $color-black !important; + } + } + } +} diff --git a/media/css/firefox/whatsnew/whatsnew-128-eu.scss b/media/css/firefox/whatsnew/whatsnew-128-eu.scss new file mode 100644 index 00000000000..7f26d6f6d40 --- /dev/null +++ b/media/css/firefox/whatsnew/whatsnew-128-eu.scss @@ -0,0 +1,61 @@ +// 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/. + +@import 'includes/base'; +@import '~@mozilla-protocol/core/protocol/css/includes/lib'; +@import '~@mozilla-protocol/core/protocol/css/components/notification-bar'; +@import 'includes/dark-mode'; +@import 'includes/mofo-donate-cta'; + +.wnp-content-main { + background-color: $color-marketing-gray-10; + color: $color-black; + text-align: center; +} + +.wnp-content-addons { + .wnp-main-title { + display: inline-block; + margin-bottom: $layout-md; + } +} + +.wnp-main-tagline { + @include text-body-xl; + margin-top: $layout-md; +} + +.wnp-main-image { + display: block; + margin: 0 auto $spacing-2xl; +} + +.wnp-main-cta { + display: block; + margin-bottom: $layout-xl; +} + +.wnp-content-donate { + .wnp-main-cta { + a { + @include text-body-xl; + padding: $spacing-md $spacing-2xl; + } + } +} + +@media (prefers-color-scheme: dark) { + .wnp-content-main { + background: $color-dark-gray-40; + } + + .wnp-main-title, + .wnp-main-tagline { + color: $title-text-color-inverse; + + @supports (--css: variables) { + color: var(--title-text-color-inverse); + } + } +} diff --git a/media/css/firefox/whatsnew/whatsnew-128-na.scss b/media/css/firefox/whatsnew/whatsnew-128-na.scss new file mode 100644 index 00000000000..d0d4fca10f2 --- /dev/null +++ b/media/css/firefox/whatsnew/whatsnew-128-na.scss @@ -0,0 +1,85 @@ +// 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/. + +@import 'includes/base'; +@import '~@mozilla-protocol/core/protocol/css/includes/lib'; +@import '~@mozilla-protocol/core/protocol/css/components/notification-bar'; +@import "../../protocol/components/video"; +@import 'includes/mofo-donate-cta'; + + +.wnp-content-main { + background-color: #F8F6F4; + text-align: center +} + +.c-video-wrapper { + z-index: 10; + + .mzp-c-video { + overflow: visible; + position: relative; + + @media (min-width: 920px) { + &::before { + background-image: url("/media/img/firefox/whatsnew/whatsnew128-na/video-pseudo-background.png"); + background-repeat: no-repeat; + content: ""; + height: 556px; + width: 710px; + position: absolute; + left: 30px; + top: 19px; + background-size: contain; + z-index: -1; + } + } + + img { + border-radius: 20px; + } + } +} + +.wnp-main-title { + @include text-title-lg; + margin-top: $spacing-lg; + @media #{$mq-md} { + margin-top: $layout-xl; + } +} + +.wnp-main-tagline { + @include text-body-xl; +} + +.has-pip-icon strong { + @include image-replaced; + @include background-size(2.25ex, 2.25ex); + background-image: url("/media/img/firefox/whatsnew/whatsnew128-na/pip-icon.svg"); + background-repeat: no-repeat; + display: inline-block; + height: 2.25ex; + margin-bottom: -0.5ex; + width: 2.25ex; +} + +@media (prefers-color-scheme: dark) { + .wnp-content-main { + background: $color-dark-gray-40; + } + + .wnp-main-title, + .wnp-main-tagline { + color: $title-text-color-inverse; + + @supports (--css: variables) { + color: var(--title-text-color-inverse); + } + } + + .has-pip-icon strong { + background-image: url("/media/img/firefox/whatsnew/whatsnew128-na/pip-icon-white.svg"); + } +} diff --git a/media/css/firefox/whatsnew/whatsnew.scss b/media/css/firefox/whatsnew/whatsnew.scss index d5b75a98958..85896b541cc 100644 --- a/media/css/firefox/whatsnew/whatsnew.scss +++ b/media/css/firefox/whatsnew/whatsnew.scss @@ -9,6 +9,7 @@ $image-path: '/media/protocol/img'; @import '~@mozilla-protocol/core/protocol/css/components/notification-bar'; @import 'includes/base'; @import 'includes/dark-mode'; +@import 'includes/mofo-donate-cta'; // * -------------------------------------------------------------------------- */ // Main content @@ -42,6 +43,10 @@ $image-path: '/media/protocol/img'; } } +.c-nimbus-128-title { + @include text-title-xl; +} + .wnp-main-tagline { @include text-body-lg; } diff --git a/media/img/firefox/whatsnew/whatsnew128-eu/extensions.svg b/media/img/firefox/whatsnew/whatsnew128-eu/extensions.svg new file mode 100644 index 00000000000..ad0cc897f11 --- /dev/null +++ b/media/img/firefox/whatsnew/whatsnew128-eu/extensions.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/media/img/firefox/whatsnew/whatsnew128-eu/firefox-and-mozilla.png b/media/img/firefox/whatsnew/whatsnew128-eu/firefox-and-mozilla.png new file mode 100644 index 00000000000..26e2f962840 Binary files /dev/null and b/media/img/firefox/whatsnew/whatsnew128-eu/firefox-and-mozilla.png differ diff --git a/media/img/firefox/whatsnew/whatsnew128-na/gymnast.png b/media/img/firefox/whatsnew/whatsnew128-na/gymnast.png new file mode 100644 index 00000000000..587a13d7097 Binary files /dev/null and b/media/img/firefox/whatsnew/whatsnew128-na/gymnast.png differ diff --git a/media/img/firefox/whatsnew/whatsnew128-na/pip-icon-white.svg b/media/img/firefox/whatsnew/whatsnew128-na/pip-icon-white.svg new file mode 100644 index 00000000000..9ff70200162 --- /dev/null +++ b/media/img/firefox/whatsnew/whatsnew128-na/pip-icon-white.svg @@ -0,0 +1 @@ + diff --git a/media/img/firefox/whatsnew/whatsnew128-na/pip-icon.svg b/media/img/firefox/whatsnew/whatsnew128-na/pip-icon.svg new file mode 100644 index 00000000000..65194654bac --- /dev/null +++ b/media/img/firefox/whatsnew/whatsnew128-na/pip-icon.svg @@ -0,0 +1 @@ + diff --git a/media/img/firefox/whatsnew/whatsnew128-na/video-pseudo-background.png b/media/img/firefox/whatsnew/whatsnew128-na/video-pseudo-background.png new file mode 100644 index 00000000000..688832b9a1d Binary files /dev/null and b/media/img/firefox/whatsnew/whatsnew128-na/video-pseudo-background.png differ diff --git a/media/img/l10n/de/firefox/wnp-128/addon.svg b/media/img/l10n/de/firefox/wnp-128/addon.svg new file mode 100644 index 00000000000..a077ada8e3d --- /dev/null +++ b/media/img/l10n/de/firefox/wnp-128/addon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/media/img/l10n/en-GB/firefox/wnp-128/addon.svg b/media/img/l10n/en-GB/firefox/wnp-128/addon.svg new file mode 100644 index 00000000000..c279dfe16a9 --- /dev/null +++ b/media/img/l10n/en-GB/firefox/wnp-128/addon.svg @@ -0,0 +1 @@ + diff --git a/media/img/l10n/en-US/firefox/wnp-128/addon.svg b/media/img/l10n/en-US/firefox/wnp-128/addon.svg new file mode 100644 index 00000000000..1df51e5ad6e --- /dev/null +++ b/media/img/l10n/en-US/firefox/wnp-128/addon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/media/img/l10n/en-ca/firefox/wnp-128/addon.svg b/media/img/l10n/en-ca/firefox/wnp-128/addon.svg new file mode 100644 index 00000000000..c279dfe16a9 --- /dev/null +++ b/media/img/l10n/en-ca/firefox/wnp-128/addon.svg @@ -0,0 +1 @@ + diff --git a/media/img/l10n/es-ES/firefox/wnp-128/addon.svg b/media/img/l10n/es-ES/firefox/wnp-128/addon.svg new file mode 100644 index 00000000000..dd04bcc253b --- /dev/null +++ b/media/img/l10n/es-ES/firefox/wnp-128/addon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/media/img/l10n/fr/firefox/wnp-128/addon.svg b/media/img/l10n/fr/firefox/wnp-128/addon.svg new file mode 100644 index 00000000000..7009a075481 --- /dev/null +++ b/media/img/l10n/fr/firefox/wnp-128/addon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/media/img/l10n/it/firefox/wnp-128/addon.svg b/media/img/l10n/it/firefox/wnp-128/addon.svg new file mode 100644 index 00000000000..05476555c59 --- /dev/null +++ b/media/img/l10n/it/firefox/wnp-128/addon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/media/img/l10n/pl/firefox/wnp-128/addon.svg b/media/img/l10n/pl/firefox/wnp-128/addon.svg new file mode 100644 index 00000000000..3c4b77ec7aa --- /dev/null +++ b/media/img/l10n/pl/firefox/wnp-128/addon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/media/js/firefox/whatsnew/whatsnew-128-experiment-eu.es6.js b/media/js/firefox/whatsnew/whatsnew-128-experiment-eu.es6.js new file mode 100644 index 00000000000..e3294824e8e --- /dev/null +++ b/media/js/firefox/whatsnew/whatsnew-128-experiment-eu.es6.js @@ -0,0 +1,36 @@ +/* + * 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/. + */ + +import TrafficCop from '@mozmeao/trafficcop'; +import { isApprovedToRun } from '../../base/experiment-utils.es6.js'; + +const href = window.location.href; + +const initTrafficCop = () => { + if (href.indexOf('v=') !== -1) { + if (href.indexOf('v=1') !== -1) { + return; + } else if (href.indexOf('v=2') !== -1) { + return; + } else if (href.indexOf('v=3') !== -1) { + return; + } + } else if (TrafficCop) { + const cop = new TrafficCop({ + variations: { + 'v=1': 80, // add-ons (version A) + 'v=2': 10, // MoFo donate (version B) -- only for DE, FR, GB + 'v=3': 10 // MoFo donate (version C) -- only for DE, FR, GB + } + }); + cop.init(); + } +}; + +// Avoid entering automated tests into random experiments. +if (isApprovedToRun()) { + initTrafficCop(); +} diff --git a/media/js/firefox/whatsnew/whatsnew-128-na.js b/media/js/firefox/whatsnew/whatsnew-128-na.js new file mode 100644 index 00000000000..f0123341397 --- /dev/null +++ b/media/js/firefox/whatsnew/whatsnew-128-na.js @@ -0,0 +1,43 @@ +/* + * 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/. + */ + +// Log account status +Mozilla.Client.getFxaDetails((details) => { + 'use strict'; + + if (details.setup) { + // GA4 + window.dataLayer.push({ + event: 'dimension_set', + firefox_is_signed_in: true + }); + } else { + // GA4 + window.dataLayer.push({ + event: 'dimension_set', + firefox_is_signed_in: false + }); + } +}); + +// Log default status +Mozilla.UITour.getConfiguration('appinfo', (details) => { + 'use strict'; + + if (details.defaultBrowser) { + // GA4 + window.dataLayer.push({ + event: 'dimension_set', + firefox_is_default: true + }); + } else { + // GA4 + window.dataLayer.push({ + event: 'dimension_set', + firefox_is_default: false + }); + } +}); diff --git a/media/static-bundles.json b/media/static-bundles.json index 7864008b23f..769e092a1a9 100644 --- a/media/static-bundles.json +++ b/media/static-bundles.json @@ -405,6 +405,18 @@ ], "name": "firefox_whatsnew_127_na" }, + { + "files": [ + "css/firefox/whatsnew/whatsnew-128-eu.scss" + ], + "name": "firefox_whatsnew_128_eu" + }, + { + "files": [ + "css/firefox/whatsnew/whatsnew-128-na.scss" + ], + "name": "firefox_whatsnew_128_na" + }, { "files": [ "css/firefox/privacy/promise.scss" @@ -1485,6 +1497,18 @@ ], "name": "firefox_whatsnew_127_na" }, + { + "files": [ + "js/firefox/whatsnew/whatsnew-128-experiment-eu.es6.js" + ], + "name": "firefox_whatsnew_128_eu" + }, + { + "files": [ + "js/firefox/whatsnew/whatsnew-128-na.js" + ], + "name": "firefox_whatsnew_128_na" + }, { "files": [ "js/mozorg/manifesto.js"