Allow translation for default header text
-
In wp-content/plugins/advanced-gutenberg/assets/blocks/blocks.js:6410
You used Header Text as default text, this text in english appears even if we used another language in back office.
For no english webmaster is not great.
Can you allow to translate this default text ( and others)I find how to use my proper text in fallback, but it’s not ideal.
I used this javascript code call in gutenberg to override the registerBlockType Settings for my french webmaster:function alterHeaderDefaultText( settings, name ) { if ( name !== 'advgb/accordion-item') { return settings; } return lodash.assign( {}, settings, { attributes: lodash.assign( {}, settings.attributes, { header: { type: 'string', default: 'Entête' }, } ), } ); } wp.hooks.addFilter( 'blocks.registerBlockType', 'back-custom/gutenberg-alteration', alterHeaderDefaultText );
Thanks.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Allow translation for default header text’ is closed to new replies.