Example #1
0
    def get_template_names(self):
        locale = l10n_utils.get_locale(self.request)
        version = self.kwargs.get('version') or ''
        oldversion = self.request.GET.get('oldversion', '')
        # old versions of Firefox sent a prefixed version
        if oldversion.startswith('rv:'):
            oldversion = oldversion[3:]

        channel = detect_channel(version)

        if channel == 'nightly':
            template = 'firefox/nightly/whatsnew.html'
        elif channel == 'developer':
            if show_57_dev_whatsnew(version):
                template = 'firefox/developer/whatsnew.html'
            else:
                template = 'firefox/whatsnew/index.html'
        elif version.startswith('87.') and locale == 'en-US':
            template = 'firefox/whatsnew/whatsnew-fx87-en.html'
        elif version.startswith('87.') and locale == 'de':
            template = 'firefox/whatsnew/whatsnew-fx87-de.html'
        elif version.startswith('87.') and locale == 'fr':
            template = 'firefox/whatsnew/whatsnew-fx87-fr.html'
        elif version.startswith('86.') and locale.startswith('en-'):
            template = 'firefox/whatsnew/whatsnew-fx86-en.html'
        elif version.startswith('86.') and locale == 'de':
            template = 'firefox/whatsnew/whatsnew-mobile-qrcode-de.html'
        elif version.startswith('86.') and locale == 'fr':
            template = 'firefox/whatsnew/whatsnew-fx81.html'
        elif version.startswith('85.') and locale.startswith('en-'):
            template = 'firefox/whatsnew/whatsnew-fx85.html'
        elif version.startswith('85.') and locale == 'de':
            template = 'firefox/whatsnew/whatsnew-mobile-de.html'
        elif version.startswith('84.') and locale.startswith('en-'):
            template = 'firefox/whatsnew/whatsnew-fx84.html'
        elif version.startswith('83.') and locale == 'de':
            template = 'firefox/whatsnew/whatsnew-fx83-de.html'
        elif version.startswith('83.') and locale.startswith('en-'):
            template = 'firefox/whatsnew/whatsnew-fx83-en.html'
        elif version.startswith('82.') and locale.startswith('en-'):
            template = 'firefox/whatsnew/whatsnew-fx82.html'
        elif version.startswith('81.') and ftl_file_is_active(
                'firefox/whatsnew/whatsnew-fx81'):
            template = 'firefox/whatsnew/whatsnew-fx81.html'
        elif version.startswith('80.') and ftl_file_is_active(
                'firefox/whatsnew/whatsnew-fx80'):
            template = 'firefox/whatsnew/whatsnew-fx80.html'
        elif version.startswith('79.') and ftl_file_is_active(
                'firefox/whatsnew/whatsnew-fx79'):
            template = 'firefox/whatsnew/whatsnew-fx79.html'
        else:
            if show_default_account_whatsnew(version) and ftl_file_is_active(
                    'firefox/whatsnew/whatsnew-account'):
                template = 'firefox/whatsnew/index-account.html'
            else:
                template = 'firefox/whatsnew/index.html'

        # return a list to conform with original intention
        return [template]
Example #2
0
    def get_template_names(self):
        variation = self.request.GET.get('v', None)
        locale = l10n_utils.get_locale(self.request)

        version = self.kwargs.get('version') or ''
        oldversion = self.request.GET.get('oldversion', '')
        # old versions of Firefox sent a prefixed version
        if oldversion.startswith('rv:'):
            oldversion = oldversion[3:]

        channel = detect_channel(version)

        if channel == 'nightly':
            template = 'firefox/nightly_whatsnew.html'
        elif channel == 'developer':
            if show_57_dev_whatsnew(version):
                template = 'firefox/developer/whatsnew.html'
            else:
                template = 'firefox/whatsnew/index.html'
        elif locale == 'id' and show_firefox_lite_whatsnew(version):
            template = 'firefox/whatsnew/firefox-lite.id.html'
        elif version.startswith('79.') and ftl_file_is_active(
                'firefox/whatsnew/whatsnew-fx79'):
            template = 'firefox/whatsnew/whatsnew-fx79.html'
        elif version.startswith('78.'):
            variations = ['2', '3', '4', '5']
            locales = ['en-US', 'en-CA', 'en-GB', 'de', 'fr']

            if variation in variations and locale in locales:
                locale = locale.split('-')[0]
                template = 'firefox/whatsnew/whatsnew-fx78-{0}-{1}.html'.format(
                    variation, locale)
            else:
                template = 'firefox/whatsnew/whatsnew-fx78.html'
        elif version.startswith('77.') and lang_file_is_active(
                'firefox/whatsnew_77', locale):
            # YouTube is blocked in China so zh-CN gets an alternative, self-hosted video.
            # If we run into bandwidth trouble we can turn the video off and zh-CN falls back to the 76 page.
            if locale == 'zh-CN' and not switch(
                    'firefox-whatsnew77-video-zhCN'):
                template = 'firefox/whatsnew/whatsnew-fx76.html'
            else:
                template = 'firefox/whatsnew/whatsnew-fx77.html'
        elif version.startswith('76.') and lang_file_is_active(
                'firefox/whatsnew_76', locale):
            template = 'firefox/whatsnew/whatsnew-fx76.html'
        else:
            if show_default_account_whatsnew(version) and ftl_file_is_active(
                    'firefox/whatsnew/whatsnew-account'):
                template = 'firefox/whatsnew/index-account.html'
            else:
                template = 'firefox/whatsnew/index.html'

        # return a list to conform with original intention
        return [template]
Example #3
0
    def get_template_names(self):
        locale = l10n_utils.get_locale(self.request)

        version = self.kwargs.get('version') or ''
        oldversion = self.request.GET.get('oldversion', '')
        # old versions of Firefox sent a prefixed version
        if oldversion.startswith('rv:'):
            oldversion = oldversion[3:]

        channel = detect_channel(version)

        if channel == 'nightly':
            template = 'firefox/nightly/whatsnew.html'
        elif channel == 'developer':
            if show_57_dev_whatsnew(version):
                template = 'firefox/developer/whatsnew.html'
            else:
                template = 'firefox/whatsnew/index.html'
        elif version.startswith('81.') and ftl_file_is_active(
                'firefox/whatsnew/whatsnew-fx81'):
            template = 'firefox/whatsnew/whatsnew-fx81.html'
        elif version.startswith('80.') and ftl_file_is_active(
                'firefox/whatsnew/whatsnew-fx80'):
            template = 'firefox/whatsnew/whatsnew-fx80.html'
        elif version.startswith('79.') and ftl_file_is_active(
                'firefox/whatsnew/whatsnew-fx79'):
            template = 'firefox/whatsnew/whatsnew-fx79.html'
        elif version.startswith('78.'):
            template = 'firefox/whatsnew/index.html'
        elif version.startswith('77.') and lang_file_is_active(
                'firefox/whatsnew_77', locale):
            # YouTube is blocked in China so zh-CN gets an alternative, self-hosted video.
            # If we run into bandwidth trouble we can turn the video off and zh-CN falls back to the 76 page.
            if locale == 'zh-CN' and not switch(
                    'firefox-whatsnew77-video-zhCN'):
                template = 'firefox/whatsnew/whatsnew-fx76.html'
            else:
                template = 'firefox/whatsnew/whatsnew-fx77.html'
        elif version.startswith('76.') and lang_file_is_active(
                'firefox/whatsnew_76', locale):
            template = 'firefox/whatsnew/whatsnew-fx76.html'
        else:
            if show_default_account_whatsnew(version) and ftl_file_is_active(
                    'firefox/whatsnew/whatsnew-account'):
                template = 'firefox/whatsnew/index-account.html'
            else:
                template = 'firefox/whatsnew/index.html'

        # return a list to conform with original intention
        return [template]
Example #4
0
    def get_template_names(self):
        if ftl_file_is_active("firefox/browsers/mobile/index"):
            template = "firefox/browsers/mobile/index.html"
        else:
            template = "firefox/mobile/index.html"

        return [template]
Example #5
0
    def get_template_names(self):
        if ftl_file_is_active('firefox/installer-help'):
            template_name = 'firefox/installer-help-redesign.html'
        else:
            template_name = 'firefox/installer-help.html'

        return [template_name]
Example #6
0
    def get_template_names(self):
        if ftl_file_is_active('firefox/home'):
            template_name = 'firefox/home/index-master.html'
        else:
            template_name = 'firefox/home/index-quantum.html'

        return [template_name]
Example #7
0
    def get_template_names(self):
        if ftl_file_is_active('mozorg/contribute'):
            template_name = 'mozorg/contribute/contribute-2020.html'
        else:
            template_name = 'mozorg/contribute/index.html'

        return [template_name]
Example #8
0
    def get_template_names(self):

        if ftl_file_is_active('firefox/new/desktop'):
            template = 'firefox/new/desktop/thanks.html'
        else:
            template = 'firefox/new/trailhead/thanks.html'

        return [template]
Example #9
0
    def get_template_names(self):
        locale = l10n_utils.get_locale(self.request)
        variant = self.request.GET.get('v', None)

        # ensure variant matches pre-defined value
        if variant not in self.variations:
            variant = None

        if locale == 'ru' and switch('firefox-yandex'):
            template = 'firefox/new/trailhead/download-yandex.html'
        elif ftl_file_is_active('firefox/new/desktop') and switch('new-redesign'):
            template = 'firefox/new/desktop/download.html'
        elif ftl_file_is_active('firefox/new/download'):
            template = 'firefox/new/trailhead/download.html'
        else:
            template = 'firefox/new/protocol/download.html'

        return [template]
Example #10
0
    def get_template_names(self):
        locale = l10n_utils.get_locale(self.request)

        version = self.kwargs.get('version') or ''
        oldversion = self.request.GET.get('oldversion', '')
        # old versions of Firefox sent a prefixed version
        if oldversion.startswith('rv:'):
            oldversion = oldversion[3:]

        channel = detect_channel(version)

        if channel == 'nightly':
            template = 'firefox/nightly_whatsnew.html'
        elif channel == 'developer':
            if show_57_dev_whatsnew(version):
                template = 'firefox/developer/whatsnew.html'
            else:
                template = 'firefox/whatsnew/index.html'
        elif channel == 'beta':
            if version.startswith('74.'):
                if locale in ['en-US', 'en-CA', 'en-GB']:
                    template = 'firefox/whatsnew/whatsnew-fx70-en.html'
                elif locale == 'de':
                    template = 'firefox/whatsnew/whatsnew-fx70-de.html'
                elif locale == 'fr':
                    template = 'firefox/whatsnew/whatsnew-fx70-fr.html'
                else:
                    template = 'firefox/whatsnew/index.html'
            else:
                template = 'firefox/whatsnew/index.html'
        elif locale == 'id':
            template = 'firefox/whatsnew/index-lite.id.html'
        elif version.startswith('73.') and lang_file_is_active('firefox/whatsnew_73', locale):
            template = 'firefox/whatsnew/whatsnew-fx73.html'
        elif version.startswith('72.') and lang_file_is_active('firefox/whatsnew_71', locale):
            template = 'firefox/whatsnew/whatsnew-fx71.html'
        elif version.startswith('71.') and lang_file_is_active('firefox/whatsnew_71', locale):
            template = 'firefox/whatsnew/whatsnew-fx71.html'
        elif version.startswith('70.'):
            if locale in ['en-US', 'en-CA', 'en-GB']:
                template = 'firefox/whatsnew/whatsnew-fx70-en.html'
            elif locale == 'de':
                template = 'firefox/whatsnew/whatsnew-fx70-de.html'
            elif locale == 'fr':
                template = 'firefox/whatsnew/whatsnew-fx70-fr.html'
            else:
                template = 'firefox/whatsnew/index.html'
        else:
            if show_default_account_whatsnew(version) and ftl_file_is_active('firefox/whatsnew/whatsnew-account'):
                template = 'firefox/whatsnew/index-account.html'
            else:
                template = 'firefox/whatsnew/index.html'

        # return a list to conform with original intention
        return [template]
Example #11
0
    def get_template_names(self):
        variant = self.request.GET.get('v', None)

        # ensure variant matches pre-defined value
        if variant not in self.variations:
            variant = None

        if ftl_file_is_active('firefox/new/download'):
            template = 'firefox/new/trailhead/thanks.html'
        else:
            template = 'firefox/new/protocol/thanks.html'

        return [template]
Example #12
0
    def get_template_names(self):
        variant = self.request.GET.get("v", None)
        experience = self.request.GET.get("xv", None)

        # ensure variant matches pre-defined value
        if variant not in self.variations:
            variant = None

        if ftl_file_is_active("firefox/new/desktop") and experience != "basic":
            template = "firefox/new/desktop/download.html"
        else:
            template = "firefox/new/basic/base_download.html"

        return [template]
Example #13
0
    def get_template_names(self):
        version = self.kwargs.get('version') or ''
        oldversion = self.request.GET.get('oldversion', '')
        # old versions of Firefox sent a prefixed version
        if oldversion.startswith('rv:'):
            oldversion = oldversion[3:]

        channel = detect_channel(version)

        if channel == 'nightly':
            template = 'firefox/nightly/whatsnew.html'
        elif channel == 'developer':
            if show_57_dev_whatsnew(version):
                template = 'firefox/developer/whatsnew.html'
            else:
                template = 'firefox/whatsnew/index.html'
        elif version.startswith('82.') and ftl_file_is_active(
                'firefox/whatsnew/whatsnew-fx80'):
            template = 'firefox/whatsnew/whatsnew-fx82.html'
        elif version.startswith('81.') and ftl_file_is_active(
                'firefox/whatsnew/whatsnew-fx81'):
            template = 'firefox/whatsnew/whatsnew-fx81.html'
        elif version.startswith('80.') and ftl_file_is_active(
                'firefox/whatsnew/whatsnew-fx80'):
            template = 'firefox/whatsnew/whatsnew-fx80.html'
        elif version.startswith('79.') and ftl_file_is_active(
                'firefox/whatsnew/whatsnew-fx79'):
            template = 'firefox/whatsnew/whatsnew-fx79.html'
        else:
            if show_default_account_whatsnew(version) and ftl_file_is_active(
                    'firefox/whatsnew/whatsnew-account'):
                template = 'firefox/whatsnew/index-account.html'
            else:
                template = 'firefox/whatsnew/index.html'

        # return a list to conform with original intention
        return [template]
Example #14
0
    def get_template_names(self):
        experience = self.request.GET.get("xv", None)
        source = self.request.GET.get("s", None)

        if ftl_file_is_active("firefox/new/desktop") and experience != "basic":
            if source == "direct":
                template = "firefox/new/desktop/thanks_direct.html"
            else:
                template = "firefox/new/desktop/thanks.html"
        else:
            if source == "direct":
                template = "firefox/new/basic/thanks_direct.html"
            else:
                template = "firefox/new/basic/thanks.html"

        return [template]
Example #15
0
    def get_template_names(self):
        variant = self.request.GET.get('v', None)
        locale = l10n_utils.get_locale(self.request)

        # ensure variant matches pre-defined value
        if variant not in self.variations:
            variant = None

        if locale == 'en-US' and variant:
            template = 'firefox/new/trailhead/exp-thanks.html'
        elif ftl_file_is_active('firefox/new/desktop') and switch(
                'new-redesign'):
            template = 'firefox/new/desktop/thanks.html'
        else:
            template = 'firefox/new/trailhead/thanks.html'

        return [template]
Example #16
0
    def get_template_names(self):
        locale = l10n_utils.get_locale(self.request)
        variant = self.request.GET.get('v', None)

        # ensure variant matches pre-defined value
        if variant not in self.variations:
            variant = None

        if ftl_file_is_active('firefox/home'):
            if locale == 'en-US' and variant:
                template_name = 'firefox/home/exp/v-{}.html'.format(variant)
            else:
                template_name = 'firefox/home/index-master.html'
        else:
            template_name = 'firefox/home/index-quantum.html'

        return [template_name]
Example #17
0
    def get_template_names(self):
        locale = l10n_utils.get_locale(self.request)
        country = get_country_from_request(self.request)
        variant = self.request.GET.get("v", None)
        experience = self.request.GET.get("xv", None)

        # ensure variant matches pre-defined value
        if variant not in self.variations:
            variant = None

        if country == "RU" and locale == "ru" and switch("firefox-yandex"):
            template = "firefox/new/desktop/download_yandex.html"
        elif ftl_file_is_active("firefox/new/desktop") and experience != "basic":
            template = "firefox/new/desktop/download.html"
        else:
            template = "firefox/new/basic/base_download.html"

        return [template]
Example #18
0
    def get_template_names(self):
        locale = l10n_utils.get_locale(self.request)
        variation = self.request.GET.get('v', None)

        version = self.kwargs.get('version') or ''
        oldversion = self.request.GET.get('oldversion', '')
        # old versions of Firefox sent a prefixed version
        if oldversion.startswith('rv:'):
            oldversion = oldversion[3:]

        channel = detect_channel(version)

        if channel == 'nightly':
            template = 'firefox/nightly_whatsnew.html'
        elif channel == 'developer':
            if show_57_dev_whatsnew(version):
                template = 'firefox/developer/whatsnew.html'
            else:
                template = 'firefox/whatsnew/index.html'
        elif channel == 'beta':
            if version.startswith('74.'):
                if locale in ['en-US', 'en-CA', 'en-GB']:
                    template = 'firefox/whatsnew/whatsnew-fx70-en.html'
                elif locale == 'de':
                    template = 'firefox/whatsnew/whatsnew-fx70-de.html'
                elif locale == 'fr':
                    template = 'firefox/whatsnew/whatsnew-fx70-fr.html'
                else:
                    template = 'firefox/whatsnew/index.html'
            else:
                template = 'firefox/whatsnew/index.html'
        elif locale == 'id':
            template = 'firefox/whatsnew/index-lite.id.html'
        elif version.startswith('77.') and lang_file_is_active(
                'firefox/whatsnew_77', locale):
            # YouTube is blocked in China so zh-CN gets an alternative, self-hosted video.
            # If we run into bandwidth trouble we can turn the video off and zh-CN falls back to the 76 page.
            if locale == 'zh-CN' and not switch(
                    'firefox-whatsnew77-video-zhCN'):
                template = 'firefox/whatsnew/whatsnew-fx76.html'
            elif variation == '2' and locale == 'en-US':
                template = 'firefox/whatsnew/whatsnew-fx77-b.html'
            else:
                template = 'firefox/whatsnew/whatsnew-fx77.html'
        elif version.startswith('76.') and lang_file_is_active(
                'firefox/whatsnew_76', locale):
            template = 'firefox/whatsnew/whatsnew-fx76.html'
        elif version.startswith('75.') and lang_file_is_active(
                'firefox/whatsnew_75', locale):
            template = 'firefox/whatsnew/whatsnew-fx75.html'
        elif version.startswith('74.'):
            # Facebook isn't used in China so zh-CN should fall back to more relevant content
            if locale != 'zh-CN' and lang_file_is_active(
                    'firefox/whatsnew_74', locale):
                template = 'firefox/whatsnew/whatsnew-fx74.html'
            elif lang_file_is_active('firefox/whatsnew_73', locale):
                template = 'firefox/whatsnew/whatsnew-fx73.html'
            else:
                template = 'firefox/whatsnew/index.html'
        elif version.startswith('73.') and lang_file_is_active(
                'firefox/whatsnew_73', locale):
            template = 'firefox/whatsnew/whatsnew-fx73.html'
        elif version.startswith('72.') and lang_file_is_active(
                'firefox/whatsnew_71', locale):
            template = 'firefox/whatsnew/whatsnew-fx71.html'
        elif version.startswith('71.') and lang_file_is_active(
                'firefox/whatsnew_71', locale):
            template = 'firefox/whatsnew/whatsnew-fx71.html'
        elif version.startswith('70.'):
            if locale in ['en-US', 'en-CA', 'en-GB']:
                template = 'firefox/whatsnew/whatsnew-fx70-en.html'
            elif locale == 'de':
                template = 'firefox/whatsnew/whatsnew-fx70-de.html'
            elif locale == 'fr':
                template = 'firefox/whatsnew/whatsnew-fx70-fr.html'
            else:
                template = 'firefox/whatsnew/index.html'
        else:
            if show_default_account_whatsnew(version) and ftl_file_is_active(
                    'firefox/whatsnew/whatsnew-account'):
                template = 'firefox/whatsnew/index-account.html'
            else:
                template = 'firefox/whatsnew/index.html'

        # return a list to conform with original intention
        return [template]
Example #19
0
def ftl_file_is_active(ftl_file):
    return fluent.ftl_file_is_active(ftl_file)
Example #20
0
    def get_template_names(self):
        country = get_country_from_request(self.request)
        locale = l10n_utils.get_locale(self.request)
        version = self.kwargs.get("version") or ""
        variant = self.request.GET.get("v", None)

        # ensure variant matches pre-defined value
        if variant not in self.variations:
            variant = None

        oldversion = self.request.GET.get("oldversion", "")
        # old versions of Firefox sent a prefixed version
        if oldversion.startswith("rv:"):
            oldversion = oldversion[3:]

        channel = detect_channel(version)

        if channel == "nightly":
            template = "firefox/nightly/whatsnew.html"
        elif channel == "developer":
            if show_57_dev_whatsnew(version):
                template = "firefox/developer/whatsnew.html"
            else:
                template = "firefox/whatsnew/index.html"
        elif version.startswith("96.") and locale == "de":
            template = "firefox/whatsnew/whatsnew-fx96-de.html"
        elif version.startswith("96.") and locale == "fr":
            template = "firefox/whatsnew/whatsnew-fx96-fr.html"
        elif version.startswith("96.") and locale.startswith("en"):
            if variant == "2":
                template = "firefox/whatsnew/whatsnew-fx96-en-qr.html"
            elif variant == "3":
                template = "firefox/whatsnew/whatsnew-fx96-en-rally.html"
            else:
                template = "firefox/whatsnew/whatsnew-fx96-en-s2d.html"
        elif version.startswith("95.") and locale == "de":
            template = "firefox/whatsnew/whatsnew-fx95-de.html"
        elif version.startswith("95.") and locale.startswith("en"):
            template = "firefox/whatsnew/whatsnew-fx95-en.html"
        elif version.startswith("93.") and locale.startswith("en-"):
            template = "firefox/whatsnew/whatsnew-fx93-en.html"
        elif version.startswith("93.") and locale == "de":
            template = "firefox/whatsnew/whatsnew-fx93-de.html"
        elif version.startswith("93.") and locale == "fr":
            template = "firefox/whatsnew/whatsnew-fx93-fr.html"
        elif version.startswith("93.") and locale.startswith("es-"):
            template = "firefox/whatsnew/whatsnew-fx93-es.html"
        elif version.startswith("93.") and locale == "it":
            template = "firefox/whatsnew/whatsnew-fx93-it.html"
        elif version.startswith("93.") and locale == "nl":
            template = "firefox/whatsnew/whatsnew-fx93-nl.html"
        else:
            if show_default_account_whatsnew(version) and ftl_file_is_active("firefox/whatsnew/whatsnew-account"):
                template = "firefox/whatsnew/index-account.html"
            else:
                template = "firefox/whatsnew/index.html"

        # do not promote Mozilla VPN in China.
        if country == "CN" and template in self.china_excluded_templates:
            template = "firefox/whatsnew/index-account.html"

        # return a list to conform with original intention
        return [template]
Example #21
0
    def get_template_names(self):
        country = get_country_from_request(self.request)
        locale = l10n_utils.get_locale(self.request)
        version = self.kwargs.get("version") or ""
        variant = self.request.GET.get("v", None)

        # ensure variant matches pre-defined value
        if variant not in self.variations:
            variant = None

        oldversion = self.request.GET.get("oldversion", "")
        # old versions of Firefox sent a prefixed version
        if oldversion.startswith("rv:"):
            oldversion = oldversion[3:]

        channel = detect_channel(version)

        if channel == "nightly":
            template = "firefox/nightly/whatsnew.html"
        elif channel == "developer":
            if show_102_dev_whatsnew(version):
                if switch("firefox-developer-whatsnew-mdnplus"
                          ) and ftl_file_is_active(
                              "firefox/whatsnew/whatsnew-developer-mdnplus"):
                    template = "firefox/developer/whatsnew-mdnplus.html"
                else:
                    template = "firefox/developer/whatsnew.html"
            elif show_57_dev_whatsnew(version):
                template = "firefox/developer/whatsnew.html"
            else:
                template = "firefox/whatsnew/index.html"
        elif version.startswith("102."):
            if locale.startswith("en"):
                template = "firefox/whatsnew/whatsnew-fx102-en.html"
            elif locale == "de":
                template = "firefox/whatsnew/whatsnew-fx102-de.html"
            elif locale == "fr":
                template = "firefox/whatsnew/whatsnew-fx102-fr.html"
            else:
                template = "firefox/whatsnew/index.html"
        elif version.startswith("101."):
            if locale.startswith("en"):
                if variant == "2":
                    template = "firefox/whatsnew/whatsnew-fx101-vpn-mobile-unfree-en.html"
                elif variant == "3":
                    template = "firefox/whatsnew/whatsnew-fx101-vpn-mobile.html"
                else:
                    template = "firefox/whatsnew/whatsnew-fx101-vpn-en.html"
            elif locale == "de":
                template = "firefox/whatsnew/whatsnew-fx101-vpn-de.html"
            elif locale == "fr":
                template = "firefox/whatsnew/whatsnew-fx101-vpn-fr.html"
            elif locale in ["es-ES", "fi", "it", "nl", "sv-SE"
                            ] and ftl_file_is_active(
                                "firefox/whatsnew/whatsnew-101-vpn-mobile"):
                template = "firefox/whatsnew/whatsnew-fx101-vpn-mobile.html"
            else:
                template = "firefox/whatsnew/index.html"
        elif version.startswith("99."):
            if locale.startswith("en"):
                if variant == "2":
                    template = "firefox/whatsnew/whatsnew-fx99-en-rally.html"
                else:
                    template = "firefox/whatsnew/whatsnew-fx99-en.html"
            elif locale == "de":
                template = "firefox/whatsnew/whatsnew-fx99-de.html"
            elif locale == "fr":
                template = "firefox/whatsnew/whatsnew-fx99-fr.html"
            else:
                template = "firefox/whatsnew/index.html"
        elif version.startswith("98."):
            if locale.startswith("en"):
                if country in ["SE", "FI"]:
                    template = "firefox/whatsnew/whatsnew-fx98-vpn-eu.html"
                else:
                    template = "firefox/whatsnew/whatsnew-fx98-vpn-en.html"
            elif ftl_file_is_active("firefox/whatsnew/whatsnew-98-vpn-eu"
                                    ) and country in ["SE", "FI"]:
                template = "firefox/whatsnew/whatsnew-fx98-vpn-eu.html"
            elif locale == "de":
                template = "firefox/whatsnew/whatsnew-fx98-mobile-de.html"
            elif locale == "fr":
                template = "firefox/whatsnew/whatsnew-fx98-mobile-fr.html"
            else:
                template = "firefox/whatsnew/index.html"
        elif version.startswith("97.") and locale == "de":
            template = "firefox/whatsnew/whatsnew-fx97-de.html"
        elif version.startswith("97.") and locale == "fr":
            template = "firefox/whatsnew/whatsnew-fx97-fr.html"
        elif version.startswith("97.") and locale.startswith("en"):
            template = "firefox/whatsnew/whatsnew-fx97-en.html"
        else:
            if show_default_account_whatsnew(version) and ftl_file_is_active(
                    "firefox/whatsnew/whatsnew-account"):
                template = "firefox/whatsnew/index-account.html"
            else:
                template = "firefox/whatsnew/index.html"

        # do not promote Mozilla VPN in excluded countries.
        if country in settings.VPN_EXCLUDED_COUNTRY_CODES and template in self.vpn_excluded_templates:
            template = "firefox/whatsnew/index-account.html"

        # return a list to conform with original intention
        return [template]