codex-team / editor.js

A block-style editor with clean JSON output
https://editorjs.io
Apache License 2.0
28.6k stars 2.08k forks source link

Docs: wrong example for convertTo i18n #2839

Open xXNickznXx opened 2 weeks ago

xXNickznXx commented 2 weeks ago

Steps to reproduce

  1. Open https://stackblitz.com/edit/nickzn-editorjs?file=src%2Fmain.ts
  2. Mark "text"
  3. Hover over "convertTo" inlinetool
  4. The tooltip displays "Convert to"

Expected behavior

It should display "cccc"

Editor.js version

2.30.x On 2.29.1 it worked.

Plugins you use with their versions

neSpecc commented 2 weeks ago

it was fixed in 2.30.2. Update to the latest version and check again please

xXNickznXx commented 2 weeks ago

@neSpecc just look at the stackblitz, im using 2.30.6 there

neSpecc commented 2 weeks ago

Tokens location has been changed.

Use following paths:

i18n: {
  messages: {
    ui: {
      // for block tunes menu
      popover: {
        "Convert to": "Конвертировать в",
      }
    },
    tools: {
      // for inline toolbar hint
      convertTo: {
        "Convert to": "Конвертировать в",
      }
    },
  }
}
xXNickznXx commented 2 weeks ago

That works, thanks!