WordPress-iOS icon indicating copy to clipboard operation
WordPress-iOS copied to clipboard

I18n: Some textual content remains in English when using WordPress app in PT-BR language

Open brcavallaro opened this issue 2 years ago • 5 comments

Expected behavior

While using the WordPress app in iOS devices configured with PT-BR language, textual content should be translated accordingly.

Actual behavior

Some textual content remains in English when using WordPress app in PT-BR language (iOS device, iPhone XS).

I just explored the content of Blog Post creation. There might be much more untranslated content. Please, let me know if you'll need me to run another session to explore this even more and provide a complete report.

Adding images Text options Paragraph placeholder Paragraph settings
Adding images Text options Paragraph placeholder Paragraph settings
Block removed toast Color labels Font sizing options General placeholders
Block removed toast IColor labels Font sizing options General placeholders

Steps to reproduce the behavior

  1. Switch the device's default language to PT-BR
  2. Navigate throughout the app exploring proper translation
Tested on iPhone XS, iOS 14.8.1, WPiOS 19.4.0.2

brcavallaro avatar Mar 18 '22 03:03 brcavallaro

Thanks for opening this ticket @brcavallaro !

👋 @fluiddot, you probably have some insights on the translations side of things, can you check out this ticket? Thanks!

hypest avatar Mar 21 '22 10:03 hypest

👋 @fluiddot, you probably have some insights on the translations side of things, can you check out this ticket? Thanks!

Sure, I'll take a look as soon as possible.

fluiddot avatar Mar 21 '22 13:03 fluiddot

I've done a quick investigation, and the issue is related to the locale identifier used for loading the localizations in WordPress-iOS before passing them to Gutenberg (reference). For some reason, when using PT-BR language the locale identifier retrieved is PT instead of PT-BR. We have way less translations for PT language than PT-BR, so it makes sense that we see more strings untranslated.

WordPress for iOS GlotPress project:

Screenshot 2022-03-22 at 11 25 04

We should investigate further how to retrieve the proper locale identifier for this case.

fluiddot avatar Mar 22 '22 10:03 fluiddot

Thanks for investigating @fluiddot!

Aha, sounds like we shouldn't be opting for the region-less locale if the one for the region (Brazil in this case) is in a better translation coverage, right?

hypest avatar Apr 04 '22 11:04 hypest

Aha, sounds like we shouldn't be opting for the region-less locale if the one for the region (Brazil in this case) is in a better translation coverage, right?

Exactly, we should retrieve PT-BR localizations in this case. As outlined in this comment, I found it unexpected that this line returns PT even when setting the device's language to PT-BR. As far as I checked, we don't have a logic that opts for the region-less version when retrieving the localizations file, so I'm wondering if we're taking the wrong identifier for this purpose 🤔 .

fluiddot avatar Apr 04 '22 15:04 fluiddot