[ckan-dev] Add language modifications and custom css files to an extension.

Jesús Redondo redondogarciajesus at gmail.com
Thu Mar 13 12:53:22 UTC 2014


Hello,

As I have mentioned in other threads I am deploying this CKAN instance:
http://www.caceresabierto.es (version 2.0.2). I try to include all the
changes inside one extension, so the instance could be migrated easily.

I have made some changes in the css, and in the translations of the
original CKAN instance.These changes have been made by modifying these
files:

1) Changes in the translation of CKAN in spanish:I have modified

* /usr/lib/ckan/default/src/ckan/ckan/i18n/es/LC_MESSAGES/ckan.mo*
 and consecuently
*/usr/lib/ckan/default/src/ckan/ckan/i18n/es/LC_MESSAGES/ckan.po*

2) Changes in the css base:
/usr/lib/ckan/default/src/ckan/ckan/public/base/css/green.min.css (i have
use the green theme as base).

The problem is that I have modified the original CKAN instead of the
extension. How can I transfer those changes mentioned before to the
extension?

In the case of templates is easily, you simple create your templates
inside  the folder "templates of the plugin and they have priority over the
normal ones in the original CKAN. I have tried the same with the css, and
the .mo and .po files but it didn't work.

NOTE: I have also tried to add a public folder in the extension and save
the css there. To do so I modified the "plugins.py"t:
"*p.toolkit.add_public_directory(config,
'public')*". This didn't work.

*TLDR ;)*: How can I add custom css, mo & po files to my extension without
mess with internal code? could It  be done by just adding the files in the
extension (in the same way as templates are modified)?

Thanks for the help.

Jesús Redondo García.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140313/4ab1c24b/attachment-0002.html>


More information about the ckan-dev mailing list