-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define the textdomain correctly for block scaffold #123
Comments
Ta v much @grappler From wp-cli/wp-cli#4512 (comment)
Sounds good to me... |
This was already fixed in c74032f |
Oh, I must be doing something wrong. After running The command I ran I get the following for ( function( wp ) {
var el = wp.element.createElement;
var __ = wp.i18n.__;
// Visit https://wordpress.org/gutenberg/handbook/block-api/ to learn about Block API
wp.blocks.registerBlockType( 'pdf-block-2/pdf-block-2', {
title: __( 'PDF Block 2', 'pdf-block-2' ),
icon: 'media-document',
category: 'widgets',
// Remove to make block editable in HTML mode.
supportHTML: false,
edit: function( props ) {
return el(
'p',
{ className: props.className },
__( 'Replace with your content!', 'pdf-block-2' )
);
},
save: function() {
return el(
'p',
{},
__( 'Replace with your content!', 'pdf-block-2' )
);
}
} );
} )(
window.wp
); |
@grappler Don't worry, we haven't pushed a release for the But when providing bug reports, you should always first check the latest state of the |
OH, I get it now. Sorry for the not so useful bug report. Thanks again! |
No, thanks to you for bothering to submit one! |
As mentioned in https://github.com/wp-cli/scaffold-command/pull/96/files#r164610714 the JS i18n functions do not except the second argument for the text domain. https://github.com/WordPress/gutenberg/blob/master/i18n/index.js#L42
There does not seem to be a way to define the text domain at the moment. WordPress/gutenberg#4147
The text was updated successfully, but these errors were encountered: