Skip to content
Permalink
Browse files

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.



git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43910 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information...
pento committed Nov 21, 2018
1 parent 1254637 commit 0693a11592c1685c9000f04e06de84fc367cbae3
Showing with 0 additions and 29 deletions.
  1. +0 −29 src/wp-includes/l10n.php
@@ -1469,32 +1469,3 @@ function is_locale_switched() {
return $wp_locale_switcher->is_switched();
}
/**
* Returns Jed-formatted localization data.
*
* @since 5.0.0
*
* @param string $domain Translation domain.
* @return array Jed-formatted localization data.
*/
function wp_get_jed_locale_data( $domain ) {
$translations = get_translations_for_domain( $domain );
$locale = array(
'' => array(
'domain' => $domain,
'lang' => determine_locale(),
),
);
if ( ! empty( $translations->headers['Plural-Forms'] ) ) {
$locale['']['plural_forms'] = $translations->headers['Plural-Forms'];
}
foreach ( $translations->entries as $msgid => $entry ) {
$locale[ $msgid ] = $entry->translations;
}
return $locale;
}

1 comment on commit 0693a11

@fgheorghe

This comment has been minimized.

Copy link

commented on 0693a11 Dec 17, 2018

This commit breaks these examples:
https://github.com/WordPress/gutenberg-examples
In particular this fix for that example:
WordPress/gutenberg-examples#51

Any clue what a proper fix might be?

Thank you!

Please sign in to comment.
You can’t perform that action at this time.