Buttons are not translatable

Created on 8 March 2023, almost 2 years ago
Updated 21 March 2023, almost 2 years ago

The available buttons and dropdown list items are not translated nor translatable.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

User interface

Created by

πŸ‡§πŸ‡ͺBelgium redseujac

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @redseujac
  • πŸ‡§πŸ‡ͺBelgium redseujac

    I have examined this issue further.

    I have found that the module contains two kind of translation files.

    ckeditor_font > js > cleditor5_plugins > ckeditor5-font > lang > translations : contains .po-files

    ckeditor_font > js > cleditor5_plugins > ckeditor5-font > build > translations : contains .js - files

    However, as I wrote in my initial post, the buttons and dropdown list items are not translated and always are showing in English in spite of those existent translation files. Somewhere there must be something wrong in the code not pointing (properly) to those translation files.

  • πŸ‡§πŸ‡ͺBelgium redseujac

    In addition to my comment #3:

    There are also translation files in /libraries/font/lang. These are .js - files.

  • πŸ‡ΊπŸ‡ΈUnited States Webbeh Georgia, USA

    I believe that [#3264983] may solve the issue, but I'm checking in the #ckeditor5 channel in Drupal Slack to check the right way forward.

    Given πŸ“Œ Incorporate translations support into the starter template Active , I'm curious if this is a larger issue across CKE5 contrib space, but I'll let you know what I hear back.

  • πŸ‡§πŸ‡ͺBelgium redseujac

    Webbeh commented in #5:

    I believe that [#3264983] may solve the issue

    Cannot find that. Could you specify a more concrete link, so I am able to read it?

  • πŸ‡§πŸ‡ͺBelgium redseujac

    I found this about interface translation properties

    https://api.drupal.org/api/drupal/core%21modules%21locale%21locale.api.p...

    https://medium.com/limoengroen/how-to-deploy-drupal-interface-translatio...

    https://www.rodrigoaguilera.net/provide-interface-translations-custom-mo...

    So I applied "interface translation project" and "interface translation server pattern" to ckeditor_font.info.yml.

    Then with drush locale:check and drush locale:update and /admin/reports/translations > check manually, I was able to import the translatable/translated strings and view them in /admin/config/regional/translate > Filter translatable strings, but unfortunately they still are not showing on the buttons nor dropdown items.

    So, although the strings and their translation are imported now, the translation is still not showing.

    Problem not solved.

  • πŸ‡ΊπŸ‡ΈUnited States Webbeh Georgia, USA

    Updated comment above to reference https://www.drupal.org/node/3264983 β†’ as a possible strategy.

  • πŸ‡§πŸ‡ͺBelgium redseujac

    @Webbeh #8

    The proposed strategy indeed opens a path for a solution. If possible just give it a try if you can't find any other possibility mentioned in the f #5:

    but I'm checking in the #ckeditor5 channel in Drupal Slack to check the right way forward.

    I'm curious if this is a larger issue across CKE5 contrib space, but I'll let you know what I hear back.

    Good luck!

  • πŸ‡§πŸ‡ͺBelgium redseujac

    I have found the solution! It's simple and it works great. I tested with my languages Dutch and French.

    The translations are already integrated in the module. So nothing to change or add here.

    Just edit the ckeditor_font.libraries.yml file like this:

    font:
      js:
        js/ckeditor5_plugins/ckeditor5-font/build/font.js: { preprocess: false, minified: true }
      dependencies:
        - ckeditor5/ckeditor5
        - core/ckeditor5.translations

    As you can see I have edited the first line of the js part and added a third line to the js part and that's it!

    The whole file is looking as this now:

    font:
      js:
        js/ckeditor5_plugins/ckeditor5-font/build/font.js: { preprocess: false, minified: true }
      dependencies:
        - ckeditor5/ckeditor5
        - core/ckeditor5.translations
    
    admin.font:
      css:
        theme:
          css/fontsize.admin.css: { }
          css/fontfamily.admin.css: { }
    
    admin.fontcolor:
      css:
        theme:
          css/fontcolor.admin.css: { }
    
    admin.fontbackgroundcolor:
      css:
        theme:
          css/fontbackgroundcolor.admin.css: { }

    Do not look any further: it's fixed!!!

    Please create a patch and/or update the module. I think it's ready now for updating the beta to

  • πŸ‡ΊπŸ‡ΈUnited States Webbeh Georgia, USA

    Thanks for beta testing. This is very good to hear, rolling out a fix momentarily and getting a new release out.

  • @webbeh opened merge request.
  • Status changed to Fixed almost 2 years ago
  • πŸ‡ΊπŸ‡ΈUnited States Webbeh Georgia, USA
  • πŸ‡§πŸ‡ͺBelgium redseujac

    Unfortunately NOT fixed in version 2.0.0-beta 2

    The file ckeditor_font.libraries.yml is not updated correctly.

    It contains the followng code in js part:

    font:
      js:
        js/build/font.js: { preprocess: false, minified: true }

    while the correct code should be:

    font:
      js:
        js/ckeditor5_plugins/ckeditor5-font/build/font.js: { preprocess: false, minified: true }

    The path to the font.js is not correct and does not work.

    So please fix it.

  • πŸ‡ΊπŸ‡ΈUnited States Webbeh Georgia, USA

    Oops. I should have double checked, let me push a new release and fix. Thanks again for your patience.

  • Status changed to Needs work almost 2 years ago
  • πŸ‡ΊπŸ‡ΈUnited States Webbeh Georgia, USA
  • Status changed to Fixed almost 2 years ago
  • πŸ‡ΊπŸ‡ΈUnited States Webbeh Georgia, USA
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024