Closed kozer closed 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?
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 hookuseI18nData
. WDYT?
Great catch @fluiddot ! Can we create a quick fix for that?
As this is not a problem with the translation files, let's merge that and create a fix before release cc: @fluiddot , @sejas
@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
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.
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! 👌
@fluiddot , @katinthehatsite , @kozer :
Related to pfHvTO-c6-p2
Proposed Changes
Update translations for the next release v.1.1.1
Testing Instructions
N/A
Pre-merge Checklist