Unable to generate translations for new decorators added via config for Link and Heading plugin
📝 Provide detailed reproduction steps (if any)
-
Add new options to the link plugin with decorators like below:
link: {defaultProtocol: 'https://', allowedProtocols: [ 'https?', 'ftp?', 'ftps?', 'mailto', 'tel', 'sms', 'sftp', 'ssh', 'news'], decorators: { openInNewWindow: { mode: 'manual', label: 'Open in a new tab', defaultValue: false, attributes: { target: '_blank', } }, openInTopMostWindow: { mode: 'manual', label: 'Open in top most window', defaultValue: false, attributes: { target: '_top', } }, openInSameWindow: { mode: 'manual', label: 'Open in same window', defaultValue: false, attributes: { target: '_self', } }, openInParentWindow: { mode: 'manual', label: 'Open in parent window', defaultValue: false, attributes: { target: '_parent', } }, } } -
Also add some more headings to the Heading plugin in config while creating the editor instance like below:
heading: { options: [ {model:'paragraph',title:'Paragraph',class:'ck-heading_paragraph'}, {model:'heading1',view:'h1',title:'Heading 1',class:'ck-heading_heading1'}, {model:'heading2',view:'h2',title:'Heading 2',class:'ck-heading_heading2'}, {model:'heading3',view:'h3',title:'Heading 3',class:'ck-heading_heading3'}, {model:'heading4',view:'h4',title:'Heading 4', class: 'ck-heading_heading4' }, {model:'heading5',view:'h5',title:'Heading 5', class: 'ck-heading_heading5' }, {model:'heading6',view:'h6',title:'Heading 6', class: 'ck-heading_heading6' }, {model:'formatted',view:'pre',title:'Formatted',class:'ck-heading_formatted'}, {model:'address',view:'address',title:'Address',class:'ck-heading_address'}, {model:'div',view:'div',title:'Normale (DIV)',class:'ck-heading_normaldiv'} ] } -
Modify the source code and add all the messages you want to translate by passing in the locale function like below: t( 'Open in top most window' ), t( 'Formatted' ).
-
Now put these messages in .po file for example for fr.po.
-
Build the plugin, this will give the fr.js file for the respective plugins in /build/translations folder of the respective plugin.
-
Integrate this fr.js file with other files of other plugins.
-
Eventhough the translated message is part of the fr.js file, when checked in editor, these custom options added are not getting translated. Only the ones present in the code by default are translated.
✔️ Expected result
1- The custom messages should get translated.
❌ Actual result
1- Custom messages are not translated. Apart from that everything is getting translated.
Could you please guide us and tell how to translate the options added to config as per documentation. Attaching a few screenshots as well of the result.
📃 Other details
- Browser: …
- OS: …
- First affected CKEditor version: …
- Installed CKEditor plugins: …
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
- …
- …
✔️ Expected result
What is the expec …\the actual result of the above steps?
📃 Other details
- Browser: Any
- OS: Any
- First affected CKEditor version: NA
- Installed CKEditor plugins: All
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.
We've closed your issue due to inactivity. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it).