Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

text-plugin WYMEditor zh-cn.js 404 not found #1288

losingle opened this Issue Jun 13, 2012 · 2 comments


None yet
3 participants

rquest is /static/cms/wymeditor/lang/zh-cn.js,should be /static/cms/wymeditor/lang/zh_cn.js
django.utils.translation.trans_real.get_language() return zh-cn.js


richardbarran commented Aug 2, 2012

I'm getting a similar issue:

  • very plain installation, just one language (MultilingualURLMiddleware is not installed).
  • using default setting LANGUAGE_CODE = 'en-us'
  • text editor uses WYMEditor.

Whenever I open up a text plugin, I see a 404 for file /static/cms/wymeditor/lang/en-us.js.

What's happening is that the Django default language is a combined language + country code, e.g. 'en-us'. This is used in cms/plugins/text/widgets/wymeditor_widget.py (line 45) to feed a language code to the template cms/plugins/widgets/wymeditor.html which then inits a wymeditor instance.

This wymeditor then tries to fetch a translation for en-us (file en-us.js), but the wymeditor has only a 'en' translation, not a 'en-us' or 'en-gb'.

Wymeditor's translations do not map well onto Django's. E.g. Django can use en-us or en-gb, wymeditor only has en. Django has pt and pt-br, and in this case wymeditor also has pt and pt-br.

A fix would be to map in wymeditor_widget.py the languages that could be used in a Django installation, to the languages available in wymeditor. It's ugly, and not easy to maintain, so if someone can suggest a better solution...

@ghost ghost assigned FinalAngel Jun 3, 2013


FinalAngel commented Jul 9, 2013

wymeditor has been removed in 3.0 and will be available using a separate plugin

@FinalAngel FinalAngel closed this Jul 9, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment