Localize Stripe links #222

Merged
root merged 1 commit from rt-donation-localize into master 2024-12-24 19:06:39 +00:00
Owner
https://support.stripe.com/questions/supported-languages-for-stripe-checkout-and-payment-links
cloudflare-workers-and-pages[bot] commented 2024-03-24 08:11:29 +00:00 (Migrated from github.com)

Deploying organicmaps with  Cloudflare Pages  Cloudflare Pages

Latest commit: 45ef9e6
Status:   Deploy successful!
Preview URL: https://cdf7bc77.organicmaps.pages.dev
Branch Preview URL: https://rt-donation-localize.organicmaps.pages.dev

View logs

## Deploying organicmaps with &nbsp;<a href="https://pages.dev"><img alt="Cloudflare Pages" src="https://user-images.githubusercontent.com/23264/106598434-9e719e00-654f-11eb-9e59-6167043cfa01.png" width="16"></a> &nbsp;Cloudflare Pages <table><tr><td><strong>Latest commit:</strong> </td><td> <code>45ef9e6</code> </td></tr> <tr><td><strong>Status:</strong></td><td>&nbsp;✅&nbsp; Deploy successful!</td></tr> <tr><td><strong>Preview URL:</strong></td><td> <a href='https://cdf7bc77.organicmaps.pages.dev'>https://cdf7bc77.organicmaps.pages.dev</a> </td></tr> <tr><td><strong>Branch Preview URL:</strong></td><td> <a href='https://rt-donation-localize.organicmaps.pages.dev'>https://rt-donation-localize.organicmaps.pages.dev</a> </td></tr> </table> [View logs](https://dash.cloudflare.com/?to=/:account/pages/view/organicmaps/cdf7bc77-31c7-45e9-89f1-60471e365e8f)
biodranik (Migrated from github.com) reviewed 2024-03-24 22:47:01 +00:00
@ -1,28 +1,33 @@
{% if lang == 'en' %}
{% set stripe = 'https://donate.organicmaps.app' %}
biodranik (Migrated from github.com) commented 2024-03-24 22:46:54 +00:00
  1. Do all our langs match stripe langs?
  2. What is the stripe behavior when a lang is not supported there?
  3. Is it possible to enable automatic lang detection without passing an explicit parameter, as it was mentioned on the stripe's documentation page?
1. Do all our langs match stripe langs? 2. What is the stripe behavior when a lang is not supported there? 3. Is it possible to enable automatic lang detection without passing an explicit parameter, as it was mentioned on the stripe's documentation page?
rtsisyk reviewed 2024-03-27 09:27:06 +00:00
@ -1,28 +1,33 @@
{% if lang == 'en' %}
{% set stripe = 'https://donate.organicmaps.app' %}
Author
Owner
  1. Do all our langs match stripe langs?

They seem to be matching, including composed codes like pt-BR.

What is the stripe behavior when a lang is not supported there?

Stripe auto-detects the language.

Is it possible to enable automatic lang detection without passing an explicit parameter, as it was mentioned on the stripe's documentation page?

Automatic language detection works already out of the box in Stripe. This PR just do all the best to continue with the same language as seen on the web-site. What is the problem with that?

> 1. Do all our langs match stripe langs? They seem to be matching, including composed codes like pt-BR. > What is the stripe behavior when a lang is not supported there? Stripe auto-detects the language. > Is it possible to enable automatic lang detection without passing an explicit parameter, as it was mentioned on the stripe's documentation page? Automatic language detection works already out of the box in Stripe. This PR just do all the best to continue with the same language as seen on the web-site. What is the problem with that?
biodranik (Migrated from github.com) reviewed 2024-03-27 10:32:00 +00:00
@ -1,28 +1,33 @@
{% if lang == 'en' %}
{% set stripe = 'https://donate.organicmaps.app' %}
biodranik (Migrated from github.com) commented 2024-03-27 10:32:00 +00:00

The problem is that this approach requires some code/support, and may introduce unexpected issues with unsupported languages/wrong parameters, while automatic detection by stripe works automatically and doesn't require any changes.

What are the benefits enabled by merging this PR?

The problem is that this approach requires some code/support, and may introduce unexpected issues with unsupported languages/wrong parameters, while automatic detection by stripe works automatically and doesn't require any changes. What are the benefits enabled by merging this PR?
rtsisyk reviewed 2024-03-27 12:58:55 +00:00
@ -1,28 +1,33 @@
{% if lang == 'en' %}
{% set stripe = 'https://donate.organicmaps.app' %}
Author
Owner

Sorry, please provide any constructive arguments why this PR shouldn't be merged based on before/after analysis.

Sorry, please provide any constructive arguments why this PR shouldn't be merged based on before/after analysis.
biodranik (Migrated from github.com) reviewed 2024-03-27 23:31:48 +00:00
@ -1,28 +1,33 @@
{% if lang == 'en' %}
{% set stripe = 'https://donate.organicmaps.app' %}
biodranik (Migrated from github.com) commented 2024-03-27 23:31:48 +00:00

his PR just do all the best to continue with the same language as seen on the web-site. What is the problem with that?

The wrong locale on our website will prohibit Stripe from autodetecting the correct locale that is not supported yet on our website. For example, a Greek user will see en OM website and will see en Stripe instead of el.

P.S. A shortcode can help to avoid copy-paste.

> his PR just do all the best to continue with the same language as seen on the web-site. What is the problem with that? The wrong locale on our website will prohibit Stripe from autodetecting the correct locale that is not supported yet on our website. For example, a Greek user will see en OM website and will see en Stripe instead of el. P.S. A shortcode can help to avoid copy-paste.
rtsisyk reviewed 2024-03-28 10:18:35 +00:00
@ -1,28 +1,33 @@
{% if lang == 'en' %}
{% set stripe = 'https://donate.organicmaps.app' %}
Author
Owner

The wrong locale on our website will prohibit Stripe from autodetecting the correct locale that is not supported yet on our website. For example, a Greek user will see en OM website and will see en Stripe instead of el.

Our web-site is already localized to almost all locales that Stripe supports. Greek localization will be added eventually if there is a demand. Our web-site and Stripe probably have different logic for auto-detecting locales. Plus our web-site provides explicit language choosers for users. From the user's prospective, the donation page is an integral part of the web-site. Preserving the same locale when navigating from one section of web-site to another sounds reasonable to me.

Not to mention that links to AppStores on this web-site also have includes the locale code (i.e.hl={{ lang }}) since the beginning. Nobody complained, but for flimsy reasons we are not merging this PR.

> The wrong locale on our website will prohibit Stripe from autodetecting the correct locale that is not supported yet on our website. For example, a Greek user will see en OM website and will see en Stripe instead of el. Our web-site is already localized to almost all locales that Stripe supports. Greek localization will be added eventually if there is a demand. Our web-site and Stripe probably have different logic for auto-detecting locales. Plus our web-site provides explicit language choosers for users. From the user's prospective, the donation page is an integral part of the web-site. Preserving the same locale when navigating from one section of web-site to another sounds reasonable to me. Not to mention that links to AppStores on this web-site also have includes the locale code (i.e.`hl={{ lang }}`) since the beginning. Nobody complained, but for flimsy reasons we are not merging this PR.
biodranik (Migrated from github.com) reviewed 2024-03-28 10:27:03 +00:00
@ -1,28 +1,33 @@
{% if lang == 'en' %}
{% set stripe = 'https://donate.organicmaps.app' %}
biodranik (Migrated from github.com) commented 2024-03-28 10:27:03 +00:00

Any unsupported language will fall back to en on our website. I suggest to use automatic stripe language detection logic for en in this case, to help users see localized stripe pages when their languages are not yet supported on our website.

Any unsupported language will fall back to en on our website. I suggest to use automatic stripe language detection logic for en in this case, to help users see localized stripe pages when their languages are not yet supported on our website.
rtsisyk reviewed 2024-04-02 06:02:21 +00:00
@ -1,28 +1,33 @@
{% if lang == 'en' %}
{% set stripe = 'https://donate.organicmaps.app' %}
Author
Owner

Updated

Updated
biodranik (Migrated from github.com) approved these changes 2024-04-02 08:02:05 +00:00
@ -1,28 +1,33 @@
{% if lang == 'en' %}
{% set stripe = 'https://donate.organicmaps.app' %}
biodranik (Migrated from github.com) commented 2024-04-02 08:01:27 +00:00
  1. set stripe = config.extra.stripe for easier configurability?
  2. nit: slash at the end.
1. `set stripe = config.extra.stripe` for easier configurability? 2. nit: slash at the end.
@ -6,3 +11,1 @@
<a href="{{ config.extra.stripe | safe }}" title="Credit/Debit Card"><img src="/images/donates/visa_mc.svg" alt="Credit/Debit Card"></a>
<a href="{{ config.extra.stripe | safe }}" title="Apple Pay" id="applePay"><img src="/images/donates/apple.svg" alt="Apple Pay"></a>
<a href="{{ config.extra.stripe | safe }}" title="Google Pay" id="googlePay"><img src="/images/donates/google.svg" alt="Google Pay"></a>
<a href="{{ stripe }}" title="Credit/Debit Card"><img src="/images/donates/visa_mc.svg" alt="Credit/Debit Card"></a>
biodranik (Migrated from github.com) commented 2024-04-02 08:01:59 +00:00

Is safe not needed anymore?

Is `safe` not needed anymore?
Sign in to join this conversation.
No description provided.