[ckan-dev] Add language modifications and custom css files to an extension.
Jesús Redondo
redondogarciajesus at gmail.com
Sat Mar 15 18:46:40 UTC 2014
Hello Vitor,
Yes, I was following the CKAN theming tutorial to include the CSS changes
in the extension. But I didn't know there was a new version (It seems
neat!).
The ckan extension to replace the.mo & po files is good alternative.
Thanks for the help,
Jesús Redondo.
On Sat, Mar 15, 2014 at 2:48 AM, Vitor Baptista <vitor at vitorbaptista.com>wrote:
> Hi Jesús,
>
> For the CSS changes, check our docs at
> http://docs.ckan.org/en/latest/theming/css.html. We've got very good docs
> on theming in general that you can check at
> http://docs.ckan.org/en/latest/theming/index.html.
>
> Overwriting translations is a bit more difficult. There's no good way yet,
> the closest is what I did in https://github.com/okfn/ckanext-mx. The
> basic idea is to have a .po file with your changes (as in
> https://github.com/okfn/ckanext-mx/blob/master/ckanext/mx/i18n/es/LC_MESSAGES/ckan.po),
> and overwriting CKAN's translations when deploying your instance with the
> script at
> https://github.com/okfn/ckanext-mx/blob/master/bin/build-combined-ckan-mo.sh.
> You have to remember on running that script, and fix the paths if needed.
> Not ideal, but works for now.
>
> Cheers,
>
>
> 2014-03-13 9:53 GMT-03:00 Jesús Redondo <redondogarciajesus at gmail.com>:
>
>> 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.
>>
>> _______________________________________________
>> ckan-dev mailing list
>> ckan-dev at lists.okfn.org
>> https://lists.okfn.org/mailman/listinfo/ckan-dev
>> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>>
>>
>
>
> --
>
> Vítor Baptista
>
> Developer | http://vitorbaptista.com | LinkedIn<http://www.linkedin.com/in/vitorbaptista>|
> @vitorbaptista <http://twitter.com/vitorbaptista>
>
> The Open Knowledge Foundation <http://okfn.org>
>
> *Empowering through Open Knowledge*
>
> http://okfn.org/ | @okfn <http://twitter.com/okfn> | OKF on Facebook<https://www.facebook.com/OKFNetwork> |
> Blog <http://blog.okfn.org/> | Newsletter<http://okfn.org/about/newsletter/>
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140315/96015e07/attachment-0003.html>
More information about the ckan-dev
mailing list