From a179751986ae6c36c93118b2af9ac3c3d4de9346 Mon Sep 17 00:00:00 2001
From: Davinder Singh
Date: Mon, 22 Apr 2024 09:18:00 +0100
Subject: [PATCH] Merge pull request #17866 from overleaf/ds-banner-labels
Geo Pricing- Update Banner message on Latam america
GitOrigin-RevId: 7a8adf8e31e7ba4bc1b415a26c492bf6e5867328
---
.../app/src/Features/Subscription/SubscriptionController.js | 4 ++++
services/web/app/views/subscriptions/interstitial-payment.pug | 2 +-
services/web/app/views/subscriptions/plans.pug | 2 +-
.../project-list/components/notifications/ads/brl-banner.tsx | 2 +-
services/web/locales/en.json | 2 +-
services/web/locales/es.json | 2 +-
6 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/services/web/app/src/Features/Subscription/SubscriptionController.js b/services/web/app/src/Features/Subscription/SubscriptionController.js
index 5ec4f6d7e9..3b6405cff1 100644
--- a/services/web/app/src/Features/Subscription/SubscriptionController.js
+++ b/services/web/app/src/Features/Subscription/SubscriptionController.js
@@ -646,20 +646,24 @@ async function getLatamCountryBannerDetails(req, res) {
latamCountryBannerDetails.latamCountryFlag = '🇲🇽'
latamCountryBannerDetails.country = 'Mexico'
latamCountryBannerDetails.discount = '25%'
+ latamCountryBannerDetails.currency = 'Mexican Pesos'
break
case `CO`:
latamCountryBannerDetails.latamCountryFlag = '🇨🇴'
latamCountryBannerDetails.country = 'Colombia'
latamCountryBannerDetails.discount = '60%'
+ latamCountryBannerDetails.currency = 'Colombian Pesos'
break
case `CL`:
latamCountryBannerDetails.latamCountryFlag = '🇨🇱'
latamCountryBannerDetails.country = 'Chile'
latamCountryBannerDetails.discount = '30%'
+ latamCountryBannerDetails.currency = 'Chilean Pesos'
break
case `PE`:
latamCountryBannerDetails.latamCountryFlag = '🇵🇪'
latamCountryBannerDetails.country = 'Peru'
+ latamCountryBannerDetails.currency = 'Peruvian Soles'
latamCountryBannerDetails.discount = '40%'
break
}
diff --git a/services/web/app/views/subscriptions/interstitial-payment.pug b/services/web/app/views/subscriptions/interstitial-payment.pug
index e64ea4cb3d..5458654aec 100644
--- a/services/web/app/views/subscriptions/interstitial-payment.pug
+++ b/services/web/app/views/subscriptions/interstitial-payment.pug
@@ -25,7 +25,7 @@ block content
div.notification-content !{translate("brl_discount_offer_plans_page_banner", {flag: '🇧🇷'})}
if showLATAMBanner
div.notification.notification-type-success.text-centered
- div.notification-content !{translate("latam_discount_offer_plans_page_banner", {flag: latamCountryBannerDetails.latamCountryFlag, country: latamCountryBannerDetails.country, discount: latamCountryBannerDetails.discount })}
+ div.notification-content !{translate("latam_discount_offer_plans_page_banner", {flag: latamCountryBannerDetails.latamCountryFlag, country: latamCountryBannerDetails.country, currency: latamCountryBannerDetails.currency, discount: latamCountryBannerDetails.discount })}
.row
.col-md-12
diff --git a/services/web/app/views/subscriptions/plans.pug b/services/web/app/views/subscriptions/plans.pug
index 7e798f6504..c10cd0de33 100644
--- a/services/web/app/views/subscriptions/plans.pug
+++ b/services/web/app/views/subscriptions/plans.pug
@@ -23,7 +23,7 @@ block content
div.notification-content !{translate("brl_discount_offer_plans_page_banner", {flag: '🇧🇷'})}
if showLATAMBanner
div.notification.notification-type-success.text-centered
- div.notification-content !{translate("latam_discount_offer_plans_page_banner", {flag: latamCountryBannerDetails.latamCountryFlag, country: latamCountryBannerDetails.country, discount: latamCountryBannerDetails.discount })}
+ div.notification-content !{translate("latam_discount_offer_plans_page_banner", {flag: latamCountryBannerDetails.latamCountryFlag, country: latamCountryBannerDetails.country, currency: latamCountryBannerDetails.currency, discount: latamCountryBannerDetails.discount })}
.row
.col-md-12
diff --git a/services/web/frontend/js/features/project-list/components/notifications/ads/brl-banner.tsx b/services/web/frontend/js/features/project-list/components/notifications/ads/brl-banner.tsx
index 9f5bbc49a1..c099f6c3fe 100644
--- a/services/web/frontend/js/features/project-list/components/notifications/ads/brl-banner.tsx
+++ b/services/web/frontend/js/features/project-list/components/notifications/ads/brl-banner.tsx
@@ -99,7 +99,7 @@ export default function BRLBanner() {
{t('latam_discount_modal_info', {
- discount: '50%',
+ discount: '50',
currencyName: 'Brazilian Reais',
})}
diff --git a/services/web/locales/en.json b/services/web/locales/en.json
index 638dbecfed..549b1addaa 100644
--- a/services/web/locales/en.json
+++ b/services/web/locales/en.json
@@ -948,7 +948,7 @@
"last_used": "last used",
"latam_discount_modal_info": "Unlock the full potential of Overleaf with a __discount__% discount on premium subscriptions paid in __currencyName__. Get a longer compile timeout, full document history, track changes, additional collaborators, and more.",
"latam_discount_modal_title": "Premium subscription discount",
- "latam_discount_offer_plans_page_banner": "__flag__ Great news! We’ve applied a __discount__ discount to premium plans on this page for our users in __country__. Check out the new lower prices.",
+ "latam_discount_offer_plans_page_banner": "__flag__ We’ve applied a __discount__ discount to premium plans on this page for our users in __country__. Check out the new lower prices (in __currency__).",
"latex_articles_page_summary": "Papers, presentations, reports and more, written in LaTeX and published by our community. Search or browse below.",
"latex_articles_page_title": "Articles - Papers, Presentations, Reports and more",
"latex_editor_info": "Everything you need in a modern LaTeX editor --- spell check, intelligent autocomplete, syntax highlighting, dozens of color themes, vim and emacs bindings, help with LaTeX warnings and error messages, and much more.",
diff --git a/services/web/locales/es.json b/services/web/locales/es.json
index a0db4a8b60..0a48950454 100644
--- a/services/web/locales/es.json
+++ b/services/web/locales/es.json
@@ -195,7 +195,7 @@
"last_name": "Apellido",
"latam_discount_modal_info": "Aprovecha todo el potencial de Overleaf con un __discount__% de descuento en suscripciones premium pagadas en __currencyName__. Consigue tiempos de compilación más largos, historial completo de documentos, seguimiento de cambios, colaboradores adicionales y más.",
"latam_discount_modal_title": "Descuento en planes premium",
- "latam_discount_offer_plans_page_banner": "__flag__ Great news! Aplicamos un descuento del __discount__ en los planes premium de esta página para nuestros usuarios de __country__. Consulta los nuevos precios con descuento",
+ "latam_discount_offer_plans_page_banner": "__flag__ Aplicamos un descuento del __discount__ en los planes premium de esta página para nuestros usuarios de __country__. Consulta los nuevos precios con descuento (en __currency__)",
"latex_templates": "Plantillas LaTeX",
"learn_more": "Más detalles",
"leave_group": "Abandonar grupo",