Skip to:

Opened 4 years ago

Closed 4 years ago

#8290 closed defect (bug) (fixed)

BP Blocks i18n strings are not identified by GlotPress

Reported by: imath's profile imath Owned by: imath's profile imath
Milestone: 6.0.0 Priority: omg pizza
Severity: major Version:
Component: Build/Test Tools Keywords: has-patch


Once 6.0.0-RC1 was released, I had a very interesting discussion with @tobifjellner & @ocean90.

@tobifjellner informed me GlotPress is not using the buddypress.pot file but instead scans each file into wp-plugins/trunk to generate the translation catalogs. After a check on the french GlotPress area, I noticed the BP Blocks i18n strings were not included.

@ocean90 kindly look into this issue and it appears WP CLI needs the JS source map files to be able to identify the JavaScript i18n strings when the Parcel Bundler is used to generate the build (which is our case). He provided me with precious advices that the attached patch is applying.

I've tested the patch locally, made a build, used wp i18n make-json to generate the BuddyPress language files for JavaScript and moved the 3 files into the /wp-content/languages/plugins folder of a fresh install of WordPress. I confirm it's working great.

Let's have this fixed asap and package a RC2.

Attachments (1)

8290.patch (2.2 KB) - added by imath 4 years ago.

Download all attachments as: .zip

Change History (2)

4 years ago

#1 @imath
4 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 12642:

BP Blocks: Make sure to build blocks with JS source map files

Adding the JS source maps simplifies the build process as WP CLI can use these files to include JavaScript i18n strings.

This should also help GlotPress to do the same on our WP Plugins repository.

Props tobifjellner, ocean90

Fixes #8290

Note: See TracTickets for help on using tickets.