Wordpress-ios: TOS page linked in the app in not localised

Created on 20 Jul 2018  ·  16Comments  ·  Source: wordpress-mobile/WordPress-iOS

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.

Localization Project Glot [Type] Enhancement i18n

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:

  • French fr
  • Spanish es
  • German de
  • Italian it
  • Hebrew he
  • Russian ru
  • Japanese ja
  • Brazilian Portuguese pt-br
  • Dutch nl
  • Korean ko
  • Turkish tr
  • Indonesian id
  • Chinese (China) zh-cn
  • Chinese (Taiwan) zh-tw
  • Arabic ar
  • Swedish sv

If 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.

All 16 comments

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:

  • French fr
  • Spanish es
  • German de
  • Italian it
  • Hebrew he
  • Russian ru
  • Japanese ja
  • Brazilian Portuguese pt-br
  • Dutch nl
  • Korean ko
  • Turkish tr
  • Indonesian id
  • Chinese (China) zh-cn
  • Chinese (Taiwan) zh-tw
  • Arabic ar
  • Swedish sv

If 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:

  • Danish da
  • German de
  • UK English en-GB
  • English en
  • Spanish es
  • Finnish fi
  • French fr
  • Italian it
  • Japanese ja
  • Korean ko
  • Norwegian bokmål nb
  • Dutch nl
  • Polish pl
  • Portuguese pt UPDATE: It's actually pt_BR
  • Russian ru
  • Swedish sv
  • Turkish tr
  • Chinese simplified zh-Hans
  • Chinese traditional zh-Hant

Thanks @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:

  • Arabic ar
  • Thai th
  • English Canada en_CA
  • English Australia en_AU
  • Welsh cy_BG
  • Indonesian id
  • Hebrew he_IL
  • Croatian hr
  • Slovak sk
  • Romanian ro
  • Albanian sq_AL
  • Icelandic is.

So the full list is:

  • Arabic ar
  • Bulgarian bg
  • Czech cs_CZ
  • Welsh cy_BG
  • Danish da
  • Spanish es
  • English en
  • UK English en-GB
  • English Canada en_CA
  • English Australia en_AU
  • German de
  • Finnish fi
  • French fr
  • Hebrew he_IL
  • Croatian hr
  • Indonesian id
  • Icelandic is
  • Italian it
  • Japanese ja
  • Korean ko
  • Norwegian bokmål nb
  • Dutch nl
  • Polish pl
  • Portuguese Brazil pt_BR
  • Romanian ro
  • Russian ru
  • Albanian sq_AL
  • Slovak sk
  • Swedish sv
  • Thai th
  • Turkish tr
  • Chinese simplified zh-Hans
  • Chinese traditional zh-Hant

Noting 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!

Was this page helpful?
0 / 5 - 0 ratings