The TOS page we link from the App (Me -> App Settings -> WordPress for iOS -> Terms of Service) is not localised.
Since translated versions of the page exist for some languages, we should use those where possible.
We can do a link like https://wordpress.com/tos/?lang=
What are common language slugs in iOS? On WordPress.com we currently have these defined:
fresdeitherujapt-brnlkotridzh-cnzh-twarsvIf different ones are used in the app we'll need to do some rewriting, so it would be great if you could list out/compare them with the ones used in iOS.
Hi @akirk 👋
This is what we have at the moment on iOS:
dadeen-GBenesfifritjakonbnlplpt UPDATE: It's actually pt_BRrusvtrzh-Hanszh-HantThanks @ctarda, this is quite helpful. Did you maybe forget Brazilian Portuguese here or don't we have that?
🙇 @akirk Damn, nice catch! The pt localisation we have is actually pt_BR. I'll update the original comment
And sorry for noticing this so late, @akirk , but we also have localisations for:
arthen_CAen_AUcy_BGidhe_ILhrskrosq_ALis.So the full list is:
arbgcs_CZcy_BGdaesenen-GBen_CAen_AUdefifrhe_ILhridisitjakonbnlplpt_BRrorusq_ALsksvthtrzh-Hanszh-HantNoting that we also link the TOS page when logged out (Sign up for WordPress.com > "By signing up, you agree to our Terms of Service.") and that should also be localized. (Internal feedback: pxLjZ-50u-p2)
@ctarda Just noting that thanks to @akirk the ToS URL now accepts a locale param with the format e.g. https://wordpress.com/tos/?locale=zh_CN (https://github.com/wordpress-mobile/WordPress-Android/issues/8068#issuecomment-487036939). This should be more accurate than mapping language codes to subdomains.
@akirk @aforcier I have been looking into this today, and it seems like everything redirects to https://en.wordpress.com/tos/?locale=LAN_CODE. For example. https://wordpress.com/tos/?locale=zh_CN redirects to https://en.wordpress.com/tos/?locale=zh_CN
@aforcier In any case, I implemented the changes that would be necessary to pass locale=xx_XX as a query string parameter, removing the subdomain as a draft PR (#11610 ) in case you want to grab the code while I am offline. I'll keep an eye on the discussion here anyway in case we can submit a proper PR
@ctarda unfortunately the server-side patch is temporarily reverted as it caused some issues with Google login. Having the changes ready is great though, as soon as a new patch is deployed we can test and ship 👍 Thanks @ctarda!
@aforcier I may be wrong here, but I think that the patch was not reverted, but changed in order to make it not apply to /wp-login.
Ah - you're right @loremattei, but perhaps something else has changed or the emergency fix is more expansive than we realize, since it doesn't look like the redirect is working at all for the ToS page at the moment.
perhaps something else has changed or the emergency fix is more expansive than we realize
Confirmed with @akirk it's the latter and the logic is always skipped now - when @akirk has an updated patch he'll let us know and we should be able to proceed.
I have applied an updated patch server-side, so the redirect works again (plus hopefully no longer interferes with login).
Thanks @akirk The PR is up: #11610
Thanks @akirk!
Most helpful comment
We can do a link like https://wordpress.com/tos/?lang=
What are common language slugs in iOS? On WordPress.com we currently have these defined:
fresdeitherujapt-brnlkotridzh-cnzh-twarsvIf different ones are used in the app we'll need to do some rewriting, so it would be great if you could list out/compare them with the ones used in iOS.