Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#45111 closed task (blessed) (wontfix)

Integrate Jed-formatted localization data

Reported by: desrosj's profile desrosj Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: I18N Keywords:
Focuses: Cc:

Description

In gutenberglib/i18n.php there is a function for returning Jed-formatted localization data. This should exist in WordPress Core.

Attachments (1)

45111.diff (960 bytes) - added by desrosj 6 years ago.

Download all attachments as: .zip

Change History (11)

This ticket was mentioned in Slack in #meta by ocean90. View the logs.


6 years ago

@desrosj
6 years ago

#2 @desrosj
6 years ago

  • Keywords has-patch added; needs-patch removed

There are currently no tests for this function in the plugin.

This function is called once in lib/client-assets.php.

I believe the new, correct implementation when merging to core would be wp_get_jed_locale_data( 'default' ), as the gutenberg text domain will no longer exist.

#3 @pento
6 years ago

In 43759:

i18n: Add the wp_get_jed_locale_data() function.

This function formats locale information to be used by Jed.

Props desrosj.
See #45111.

#4 @pento
6 years ago

  • Keywords fixed-5.0 added; needs-unit-tests removed

#5 @ocean90
6 years ago

Related: #45103

It's possible that we don't need this function in core.

#6 @pento
6 years ago

Noice, feel free to revert if it's unnecessary. 🙂

#7 @ocean90
6 years ago

  • Keywords revert added; fixed-5.0 removed

With wp_set_script_translations() wp_get_jed_locale_data() no longer necessary and thus should be reverted.

cc: @herregroen

#8 @herregroen
6 years ago

I agree, especially as this function will load the entire domain which is less than optimal and, as far as I can see, the only use-case for this function is providing JS translations.

#9 @pento
6 years ago

In 43910:

i18n: Remove the wp_get_jed_locale_data() function.

This function was used as a translation workaround in the Gutenberg plugin, it has been replaced in core with the wp_set_script_translations() functionality, instead.

See #45111.

#10 @pento
6 years ago

  • Keywords has-patch revert removed
  • Milestone 5.0 deleted
  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.