You are here

function ckeditor_update_7006 in CKEditor - WYSIWYG HTML editor 7

Import missing translations.

See also

https://www.drupal.org/project/ckeditor/issues/3134399

File

./ckeditor.install, line 593

Code

function ckeditor_update_7006() {
  if (!module_exists('locale') || !db_table_exists('locales_source')) {
    return t('No translations to fix as the locale system is not enabled.');
  }
  $module_path = ckeditor_module_path('url');
  $javascript = [
    [
      'type' => 'file',
      'data' => $module_path . '/includes/ckeditor.utils.js',
    ],
    [
      'type' => 'file',
      'data' => $module_path . '/plugins/drupalbreaks/plugin.js',
    ],
    [
      'type' => 'file',
      'data' => $module_path . '/plugins/mediaembed/dialogs/mediaembed.js',
    ],
  ];
  if (function_exists('locale_js_alter')) {
    locale_js_alter($javascript);
  }
}