I18N: Use wp.i18n for translatable strings in wp-admin/js/updates.js.

This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.

Props swissspidy, ocean90.
See #20491.
Fixes #50235.
Built from https://develop.svn.wordpress.org/trunk@47884


git-svn-id: http://core.svn.wordpress.org/trunk@47658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling
2020-06-01 21:41:09 +00:00
parent 0318a92948
commit ba92ed7615
5 changed files with 325 additions and 204 deletions

View File

@@ -799,7 +799,7 @@ themes.view.Details = wp.Backbone.View.extend({
_this.model.set( { autoupdate: 'enable' === data.state } );
$( document ).off( 'wp-auto-update-setting-changed', callback );
}
}
};
// Triggered in updates.js
$( document ).on( 'wp-auto-update-setting-changed', callback );