Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#45161 closed defect (bug) (fixed)

Set translations for Gutenberg scripts.

Reported by: herregroen's profile herregroen Owned by: herregroen's profile herregroen
Milestone: 5.0 Priority: normal
Severity: normal Version: 5.0
Component: I18N Keywords: has-patch commit fixed-5.0
Focuses: javascript Cc:

Description

Once #45103 has been merged translations should be set for all relevant Gutenberg scripts using wp_set_script_translations.

This will mean that once #meta3876 and #meta3748 are resolved translation files will be downloaded and updated per the usual process and loaded into wp.i18n.

Attachments (2)

45161.diff (1.3 KB) - added by herregroen 6 years ago.
45161.2.diff (7.2 KB) - added by herregroen 6 years ago.

Download all attachments as: .zip

Change History (11)

#1 @SergeyBiryukov
6 years ago

  • Component changed from General to I18N
  • Milestone changed from Awaiting Review to 5.0

@herregroen
6 years ago

#2 @omarreiss
6 years ago

Patch looks good to me. @herregroen please feel free to commit

#3 @pento
6 years ago

I'd like to see it properly working before we commit it, but otherwise it looks good. 🙂

This ticket was mentioned in Slack in #core-js by omarreiss. View the logs.


6 years ago

This ticket was mentioned in Slack in #core by omarreiss. View the logs.


6 years ago

#6 @ocean90
6 years ago

  • Keywords has-patch commit added

45161.diff is working for me with the current available language packs for 5.0-beta3. Make sure to deactivate the Gutenberg plugin.

I'd only replace array_key_exists() with isset() which should be good enough here.

@herregroen
6 years ago

#7 @herregroen
6 years ago

  • Owner set to herregroen
  • Resolution set to fixed
  • Status changed from new to closed

In 43878:

I18N: Set translations for all WordPress packages scripts.

Calls wp_set_script_translations for all packages scripts that have translations. Also correctly sets the domain on the translations.

Props omarreiss, pento, ocean90.
Fixes #45161.

#8 @herregroen
6 years ago

  • Keywords fixed-5.0 added
  • Resolution fixed deleted
  • Status changed from closed to reopened

#9 @SergeyBiryukov
6 years ago

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

In 44239:

I18N: Set translations for all WordPress packages scripts.

Calls wp_set_script_translations for all packages scripts that have translations. Also correctly sets the domain on the translations.

Props omarreiss, pento, ocean90.
Merges [43878] to trunk.
Fixes #45161.

Note: See TracTickets for help on using tickets.