Jetpack: Translations Not Fully Loading for Blocks

Created on 5 Mar 2019  路  7Comments  路  Source: Automattic/jetpack

Under Jetpack 7.1 and WordPress 5.1, translations do not appear to be fully loading for blocks.

To reproduce the issue, simply switch to any supported language at Settings > General in your site's Dashboard. The following screenshots are Spanish and German, and display the block list and Business Hours block, though this issue affects all of our blocks:

screen shot on 2019-03-05 at 14-15-20
screen shot on 2019-03-05 at 14-15-45
screen shot on 2019-03-05 at 14-18-48
screen shot on 2019-03-05 at 14-19-03

Originally reported at https://wordpress.org/support/topic/jetpack-blocks-are-not-translated-in-version-7-1/

Internationalization [Pri] High [Type] Bug

All 7 comments

We're going to have to postpone this to the next major release, as the problem seems more complex; the strings are currently available in the editor, but we need to review how we use wp.i18n.setLocaleData and the format of the JSON file that is used there to make sure it is still compatible with the recommendations here:
https://make.wordpress.org/core/2018/11/09/new-javascript-i18n-support-in-wordpress/

Internal discussion about a larger project to make internationalization possibly less fragile: pafL3P-my-p2

This was partly fixed, but punting the issue to 7.3 for the remaining bits which make the most sense to me to tackle once the Jetpack blocks live natively in this repo.

Noting that we're getting close. With recent work, translate.wordpress.org is picking up strings from our blocks to translate. Still need to test if translations provided for those strings are included when the files are enqueued.

@kraftbj @jeherve This seems to be affecting WordPress.com sites as well.

From my simple site in pt_BR:

Screenshot
Screenshot: https://cld.wthms.co/AOd2b2

Also, do think this also explains the fact that default field labels of the Form Block are not translated? Or would that be a different issue?

Example from a fresh jurassic.ninja site:

Screenshot
Screenshot: https://cld.wthms.co/81D5Xu

@liviopv on wpcom the translations aren't loaded for blocks is indeed an issue as well but solution is separate from Jetpack plugin's solution. These will need to be fixed separately.

cc @yoavf what would be good place to follow progress for wpcom side?

do think this also explains the fact that default field labels of the Form Block are not translated? Or would that be a different issue?

Default labels on forms shouldn't be a separate issue from the rest of the block translations.

Was this page helpful?
0 / 5 - 0 ratings