Skip to content

Limiting languages to precompile can have unexpected side effects #73

@nathansamson

Description

@nathansamson

My config is like

Ckeditor::Rails.configure do |config|
  # default is nil for all languages, or set as %w[en zh]
  config.assets_languages = %w(en nl fr)

  # default is nil for all plugins,
  # or set as white list: %w[image link liststyle table tabletools]
  # or set as black list: config.default_plugins - %w[about a11yhelp]
  config.assets_plugins = %w(image link liststyle table tabletools pastefromword clipboard)

  # default is nil for all skins, or set as %w[moono]
  #config.assets_skins = %w(simple)
end

When loading my site with a locale of en-GB (although the I18n.locale is set to nl) it crashes with the following

Failed to load resource: the server responded with a status of 404 (Not Found) (https://www.radarwerk.be/assets/ckeditor/lang/en-gb.js?t=F7J9)
application-8f9c169d5aa34a687e102e32d9f95e62ac04221196e4dba7ce4916508c71bec1.js:89 Uncaught TypeError: Cannot set property 'dir' of undefined (https://www.radarwerk.be/assets/application-8f9c169d5aa34a687e102e32d9f95e62ac04221196e4dba7ce4916508c71bec1.js:89)

When I don't compile the language the user is in, I want it to fallback properly (first to the language independant language, then to en (same in this case)).
In the first place I want to use the language of the site in all honesty (nl)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions