Wp-calypso: Earn: Localize Payments email URLs

Created on 4 Jun 2020  路  5Comments  路  Source: Automattic/wp-calypso

Emails from Payments to merchants and subscribers do not include localized URLs so they're not i18n friendly.

We have localized_wpcom_url for this purpose, but it doesn't work for support doc links like https://wordpress.com/support/recurring-payments/ (which should resolve to https://wordpress.com/es/support/boton-pagos-recurrentes/, for example). Instead, it resolves to https://es.wordpress.com/support/recurring-payments/, which does not exist.

Earn [Type] Bug i18n

Most helpful comment

The Diff was merged, so this should be fixed. Please close the issue when you have confirmed it.

All 5 comments

@akirk @Automattic/i18n , I was looking at the code for localized_wpcom_url(), but it was unclear to me what happens to the page/post slugs. Should those be translated or are they supposed to remain untranslated?

Page slugs should remain untranslated (we support the English slugs and redirect to the translated ones) but as you saw it acts wrong on the new https://wordpress.com/support URLs. Working on an update in D40703-code

The Diff was merged, so this should be fixed. Please close the issue when you have confirmed it.

@sixhours With D44652 merged, is there anything else left here?

Oh, I don't think so. I will plan to localize any eligible URLs in the next round of email updates, so I don't think this needs to be tracked separately.

Was this page helpful?
0 / 5 - 0 ratings