GrapesJS / grapesjs

Free and Open source Web Builder Framework. Next generation tool for building templates without coding
https://grapesjs.com
BSD 3-Clause "New" or "Revised" License
22.37k stars 4.05k forks source link

BUG: Localization works weird #5000

Closed applibs closed 1 year ago

applibs commented 1 year ago

GrapesJS version

What browser are you using?

Chrome 111

Reproducible demo link

https://jsfiddle.net/zfkuq7sh/

Describe the bug

    var editor = grapesjs.init({
        fromElement: true,
        container: '#gjs',
        //style: '.txt-red{color: red}',
        i18n: {
            //de: gjsDE,
            locale: 'de', // default locale
            // detectLocale: true, // by default, the editor will detect the language
            //localeFallback: 'de', // default fallback
            //messages: { gjsDE },
        },
        plugins: ['grapesjs-mjml', 'gjs-plugin-ckeditor', 'inlineStorage'],
        pluginsOpts: {
            'grapesjs-mjml': {i18n: {de: mjmlCS}},
            'gjs-plugin-ckeditor': {},
        },
        storageManager: { type: 'inline' }
    });

    editor.I18n.addMessages({
        de: gjsDE
    });

Some texts are translated and some not. Some are translated only after I click some tool button, then its translated. For example Top bar button Sesttins. Its in EN, After I click this button then its translated to my own language. Why?

Code of Conduct

artf commented 1 year ago

@applibs I can't help if you don't provide a valid reproducible demo, please include all the missing dependencies.