• Resolved ccaron

    (@ccaron)


    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.

    • This topic was modified 2 years, 2 months ago by ccaron.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author htmgarcia

    (@htmgarcia)

    Hi @ccaron,
    we appreciate your feedback!

    We’ll allow translations for ‘Header text’ string in the next update. If you find another string that you think needs translation, please let us know through our Github repository.

    Regards

    Thread Starter ccaron

    (@ccaron)

    Hi @htmgarcia , Thanks for your quick answer !

    I just found another one, in advgb/tab

    you used in wp-content/plugins/advanced-gutenberg/assets/blocks/blocks.js:12750
    “Tab header” which I would also like to translate, however it is impossible for me here

    I did not find any ticket on the subject on your github so I allow myself to indicate it to you here.

    Plugin Author htmgarcia

    (@htmgarcia)

    Thanks @ccaron! Feel free to open a new issue on Github.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Allow translation for default header text’ is closed to new replies.