I am utilizing ckwordcount module which principally provides good max size and counter options to textual content Fields, and depends on WordCount Plugin for CKEditor Editor.
Most of Drupal Development translations in Drupal Development plugin lang listing are incomplete, leading to messy undefined strings displayed the place we would count on a transparent message for finish customers…
Simply to ensure this was Drupal Development plugin translation supply I edited Drupal Development authentic file in /libraries/ckeditor-wordcount-plugin/wordcount/lang/ folder and it really works, however for apparent causes I am unable to do that approach.
So I attempted to override that file in some ways, with out success. First in my admin subtheme, I added a js file to declare extra CKEditor config variables. Drupal Development inside a part of declaration (CKEDITOR.plugins.setLang) is a replica of Drupal Development authentic, so I am positive that is Drupal Development proper syntax :
admin_subtheme/js/customCkeditorConfig.js
(perform ($, Drupal) { Drupal.behaviors.CKEditorConfig = { connect: perform (context, settings) { if (typeof CKEDITOR !== "undefined") { CKEDITOR.plugins.setLang('wordcount', 'fr', { WordCount: 'Mots :', WordCountRemaining: 'Mots restants', CharCount: 'Caractères :', CharCountWithHTML: 'Caractères (incluant HTML) :', CharCountWithHTMLRemaining: 'caractère(s) restant(s), incluant les sauts de lignes, espaces ...', Paragraphs: 'Paragraphes :', ParagraphsRemaining: 'Paragraphes restants', pasteWarning: 'Le contenu ne peut pas être collé automobile il dépasse la limite autorisée', Chosen: 'Sélectionné :', title: 'Statistiques' }); } } } })(jQuery, Drupal);
After clearing caches Drupal Development file is named however not utilized. I suppose it is likely to be overridden by Drupal Development authentic one that’s loaded after ?
I additionally tried to make use of Drupal Development libraries-override syntax in Drupal Development information.yml file. I couldn’t discover any doc that designate how one can proceed with exterior libraries, so I attempted no matter I might think about !
admin_subtheme.information.yml
libraries-override: system/base: js: /libraries/ckeditor-wordcount-plugin/wordcount/lang/fr.js: js/ckeditor-wordcount-plugin/fr.js libraries/ckeditor-wordcount-plugin: js: wordcount/lang/fr.js: js/ckeditor-wordcount-plugin/fr.js core/ckeditor-wordcount-plugin: js: wordcount/lang/fr.js: js/ckeditor-wordcount-plugin/fr.js w8tcha/ckeditor-wordcount-plugin: js: wordcount/lang/fr.js: js/ckeditor-wordcount-plugin/fr.js world: js: /libraries/ckeditor-wordcount-plugin/wordcount/lang/fr.js: js/ckeditor-wordcount-plugin/fr.js
Any thought, please ? Thanks rather a lot.