Skip to content

Commit

Permalink
VPN wave VI expansion post-launch cleanup (Fixes #13552)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgibson committed Aug 16, 2023
1 parent a1a5a0a commit a6c764b
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 32 deletions.
24 changes: 22 additions & 2 deletions bedrock/firefox/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,26 @@ def get_template_names(self):

channel = detect_channel(version)

# Used by WNP 115
vpn_wave_vi_countries = [
"BG", # Bulgaria
"CY", # Cyprus
"CZ", # Czech Republic
"DK", # Denmark
"EE", # Estonia
"HR", # Croatia
"HU", # Hungary
"LT", # Lithuania
"LU", # Luxembourg
"LV", # Latvia
"MT", # Malta
"PL", # Poland
"PT", # Portugal
"RO", # Romania
"SI", # Slovenia
"SK", # Slovakia
]

if channel == "nightly":
template = "firefox/nightly/whatsnew.html"
elif channel == "developer":
Expand Down Expand Up @@ -519,11 +539,11 @@ def get_template_names(self):
template = "firefox/whatsnew/whatsnew-fx115-eu-mobile-uk.html"
elif country == "GB":
template = "firefox/whatsnew/whatsnew-fx115-eu-mobile-uk.html"
elif switch("vpn-wave-vi") and country in settings.VPN_COUNTRY_CODES_WAVE_VI:
elif country in vpn_wave_vi_countries:
template = "firefox/whatsnew/whatsnew-fx115-eu-vpn.html"
else:
template = "firefox/whatsnew/whatsnew-fx115-na-addons.html"
elif switch("vpn-wave-vi") and country in settings.VPN_COUNTRY_CODES_WAVE_VI:
elif country in vpn_wave_vi_countries:
template = "firefox/whatsnew/whatsnew-fx115-eu-vpn.html"
elif locale == "de":
template = "firefox/whatsnew/whatsnew-fx115-eu-ctd-de.html"
Expand Down
4 changes: 0 additions & 4 deletions bedrock/products/templates/products/vpn/includes/macros.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,7 @@ <h2 class="vpn-hero-sub-heading">{{ subheading }}</h2>
</a>

<p class="availability-copy">
{% if switch('vpn-wave-vi') %}
{{ ftl('vpn-shared-available-countries-v6', fallback='vpn-shared-available-countries-v5') }}
{% else %}
{{ ftl('vpn-shared-available-countries-v5') }}
{% endif %}
</p>
{% endif %}
{%- endmacro %}
Expand Down
8 changes: 0 additions & 8 deletions bedrock/products/templates/products/vpn/landing.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,7 @@
</a>

<p class="availability-copy">
{% if switch('vpn-wave-vi') %}
{{ ftl('vpn-shared-available-countries-v6', fallback='vpn-shared-available-countries-v5') }}
{% else %}
{{ ftl('vpn-shared-available-countries-v5') }}
{% endif %}
</p>
{% endcall %}
{% endif %}
Expand Down Expand Up @@ -242,11 +238,7 @@
</a>

<p class="availability-copy">
{% if switch('vpn-wave-vi') %}
{{ ftl('vpn-shared-available-countries-v6', fallback='vpn-shared-available-countries-v5') }}
{% else %}
{{ ftl('vpn-shared-available-countries-v5') }}
{% endif %}
</p>
</div>
<div class="l-column-last">
Expand Down
4 changes: 0 additions & 4 deletions bedrock/products/templates/products/vpn/pricing.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,7 @@ <h1 class="mzp-c-wordmark mzp-t-wordmark-lg mzp-t-product-vpn">{{ ftl('vpn-share
</a>

<p class="availability-copy">
{% if switch('vpn-wave-vi') %}
{{ ftl('vpn-shared-available-countries-v6', fallback='vpn-shared-available-countries-v5') }}
{% else %}
{{ ftl('vpn-shared-available-countries-v5') }}
{% endif %}
</p>
{% endcall %}
{% endif %}
Expand Down
9 changes: 0 additions & 9 deletions bedrock/products/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ def vpn_available(request):
country = get_country_from_request(request)
country_list = settings.VPN_COUNTRY_CODES

if switch("vpn-wave-vi"):
country_list = settings.VPN_COUNTRY_CODES + settings.VPN_COUNTRY_CODES_WAVE_VI

return country in country_list


Expand Down Expand Up @@ -80,9 +77,6 @@ def vpn_landing_page(request):
else:
template_name = "products/vpn/landing.html"

if switch("vpn-wave-vi"):
available_countries = settings.VPN_AVAILABLE_COUNTRIES_WAVE_VI

context = {
"vpn_available": vpn_available_in_country,
"available_countries": available_countries,
Expand Down Expand Up @@ -111,9 +105,6 @@ def vpn_pricing_page(request):
if variant not in ["1", "2"]:
variant = None

if switch("vpn-wave-vi"):
available_countries = settings.VPN_AVAILABLE_COUNTRIES_WAVE_VI

context = {
"vpn_available": vpn_available_in_country,
"available_countries": available_countries,
Expand Down
6 changes: 1 addition & 5 deletions bedrock/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1656,9 +1656,6 @@ def before_send(event, hint):
"NL", # Netherlands
"SE", # Sweden
"FI", # Finland
]

VPN_COUNTRY_CODES_WAVE_VI = [
"BG", # Bulgaria
"CY", # Cyprus
"CZ", # Czech Republic
Expand All @@ -1676,10 +1673,9 @@ def before_send(event, hint):
"SI", # Slovenia
"SK", # Slovakia
]
VPN_AVAILABLE_COUNTRIES_WAVE_VI = 33

VPN_AFFILIATE_COUNTRIES = ["CA", "DE", "FR", "GB", "IE", "US"]
VPN_AVAILABLE_COUNTRIES = 17
VPN_AVAILABLE_COUNTRIES = 33
VPN_CONNECT_SERVERS = 500
VPN_CONNECT_COUNTRIES = 30
VPN_CONNECT_DEVICES = 5
Expand Down

0 comments on commit a6c764b

Please sign in to comment.