Hi, can somebody please tell my why __ test stringString A string is a translatable part of the software. A translation consists of a multitude of localized strings. “update” does not show up on polyglots?
Code here: https://github.com/mtoensing/simpletoc/blob/master/src/index.js
I used
const { __ } = wp.i18nInternationalization Internationalization (sometimes shortened to I18N , meaning “I – eighteen letters -N”) is the process of planning and implementing products and services so that they can easily be adapted to specific local languages and cultures, a process called localization. This is the process of making software translatable. Information about Internationalization for developers can be found in the Developer’s handbooks.;
and
label: __( ‘update’ , ‘simpletoc’ ),
and loaded this in the php code:
function simpletoc_set_script_translations() {
wp_set_script_translations( 'simpletoc-script', 'simpletoc' );
}
function simpletocinit() {
wp_register_script(
'simpletoc',
plugins_url('build/index.js', __FILE__),
[ 'wp-blocks','wp-editor', 'wp-i18n', 'wp-element', 'wp-server-side-render' , 'wp-i18n' ],
filemtime(plugin_dir_path(__FILE__) . 'build/index.js')
);
All php stringsString A string is a translatable part of the software. A translation consists of a multitude of localized strings. show up but not the js string. Why?