wicketstuff/core — Issue #76: TinyMceRequestMapper maps themes/<theme>/langs/<lang>.js to langs/<lang>.js
Author: mrpardijs
Created: 2011-11-22 13:14:45+00:00
State: open

There's a bug in the TinyMceRequestMapper which causes display of 'advanced.h1, 'advanced.block' etc. in stead of the correct translation found in (i.e.) themes/advanced/langs/nl.js. Because in the list of prefixes, langs comes before themes, themes/advanced/langs/nl.js is mapped to langs/nl.js, so the wrong file is returned (which actually exists, but is meant for other translations).

Workaround is to create your own RequestMapper which has the following KNOWN_PREFIX:

private static final List KNOWN_PREFIXS = Arrays.asList(new String[] { "themes", "langs", "plugins",
"utils", "tiny_mce_popup.js", "tiny_mce_src.js", "tiny_mce.js" });

in stead of

private static final List KNOWN_PREFIXS = Arrays.asList(new String[] { "langs",
"themes", "plugins", "utils", "tiny_mce_popup.js", "tiny_mce_src.js", "tiny_mce.js" });

Since I don't have the time to try to commit this change now, and because I'm curious if other people agree to this solution, I created this issue.