Automattic / studio

Studio by WordPress.com, a free desktop app that helps developers streamline their local WordPress development workflow.
https://developer.wordpress.com/studio/
GNU General Public License v2.0
172 stars 17 forks source link

Update: translations for 1.1.1 #502

Closed kozer closed 3 weeks ago

kozer commented 3 weeks ago

Related to pfHvTO-c6-p2

Proposed Changes

Update translations for the next release v.1.1.1

Testing Instructions

N/A

Pre-merge Checklist

fluiddot commented 3 weeks ago

I noticed that some strings are not translated when using a non-English language (e.g. Spanish). I thought that maybe changes from #476 could be related to the issue, and I confirmed it by checking out a previous commit.

[...] cc @sejas

I think the issue might be related to how we set the locale data. Seems we now only set it for the hook useI18nData and not for the default I18n (reference). Hence, those places where we still use the function __ from @wordpress/i18n package are not getting the translation (example). We should either ensure that we set translations for the default I18n or ensure we only use the function __ from the hook useI18nData. WDYT?

kozer commented 3 weeks ago

I noticed that some strings are not translated when using a non-English language (e.g. Spanish). I thought that maybe changes from #476 could be related to the issue, and I confirmed it by checking out a previous commit. [...] cc @sejas

I think the issue might be related to how we set the locale data. Seems we now only set it for the hook useI18nData and not for the default I18n (https://github.com/Automattic/studio/pull/476/files#diff-a2a171449d862fe29692ce031981047d7ab755ae7f84c707aef80701b3ea0c80L203). Hence, those places where we still use the function __ from @wordpress/i18n package are not getting the translation (example). We should either ensure that we set translations for the default I18n or ensure we only use the function __ from the hook useI18nData. WDYT?

Great catch @fluiddot ! Can we create a quick fix for that?

kozer commented 3 weeks ago

As this is not a problem with the translation files, let's merge that and create a fix before release cc: @fluiddot , @sejas

katinthehatsite commented 3 weeks ago

@fluiddot I think this has to do with the language switcher; I went through the translation strings and they look good. I even repeated the process myself to be sure 😅

I think we are okay to merge these as they won't change

fluiddot commented 3 weeks ago

Great catch @fluiddot ! Can we create a quick fix for that?

Sure, I'm taking a look.

As this is not a problem with the translation files, let's merge that and create a fix before release

Yep, sounds good.

sejas commented 3 weeks ago

I think the issue might be related to how we set the locale data. Seems we now only set it for the hook useI18nData and not for the default I18n (reference). Hence, those places where we still use the function from @wordpress/i18n package are not getting the translation (example). We should either ensure that we set translations for the default I18n or ensure we only use the function from the hook useI18nData. WDYT?

@fluiddot, Great catch! I can create a quick PR setting the default locale! 👌

sejas commented 3 weeks ago

@fluiddot , @katinthehatsite , @kozer :