Closed rlanvin closed 11 years ago
Forgot to ask, but I've added all the files manually. Would like to find some kind of automated way, but does this work OK for now?
Ok sorry for some reason I didn't get a notification about the commit.
I didn't test yet, but looking at the code it seems that you only added the languages files that are part of the gem (and to me that worked already with the fix for issue #5 and #14 - or at least I didn't experience an issue with the default language files).
My bug report was about my own custom languages files that I created in my application directly, when the language isn't part of the gem. For exemple:
my_project/vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/fr.js
my_project/vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/fr_dlg.js
my_project/vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/fi.js
my_project/vendor/assets/javascripts/tinymce/plugins/uploadimage/langs/fi_dlg.js
At the moment, I have to manually add them like this:
config.assets.precompile += %w(tinymce/plugins/uploadimage/langs/fr.js tinymce/plugins/uploadimage/langs/fr_dlg.js)
I would be great if the gem would add them automatically. Or if it's not possible at the moment, maybe mention on the README file that you have to add your own language files to config.assets.precompile.
Yeah, it's manual for now. I've tried with an automated approach without success for now. I'll add a quick mention to the README
I've adapted things to do it more like the tinymce-rails gem does it, and for me at least, it precompiled the latest languages automatically. Does it work for anyone else?
I think you need to bump your tinymce-rails dependency to tinymce-rails ~> 3.5.8.1
to utilize their new asset_installer.rb file in your rake task
AND yes, it did work for me. Before I was having issues in production not finding teh language files
Thanks. I'm closing this then
It seems the fix for issue #5 and issue #14 doesn't take into account custom language files created in
vendor/assets/javascripts/tinymce/plugins/uploadimage/langs
in your application as instructed in the README.So the custom languages files are not precompiled, and therefore there are missing in production environment.
The current workaround - as suggested in issue #5 - is to add them manually to config.assets.precompile.