[ckan-dev] Translating plugins & custom translations how-to
Samuele Santi
samuele.santi at trentorise.eu
Tue Nov 26 10:47:57 UTC 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11/19/2013 04:44 PM, Vitor Baptista wrote:
> Hi Ian,
>
> As far as I understood, whenever you run this "make-i18n" paster
> command, it'll recompile all languages and put them on the
> i18n_folder. So, if something changes on upstream, you can simply
> run it again, and it should work.
Correct
> I like this approach, even though it's still a bit hacky. Ideally,
> IMO, every time CKAN starts, it would do this process by itself
> (looking into plugins, checking which have i18n files, and merging
> them), so we wouldn't need to have a new paster command. But it's
> a great improvement over what we have.
Yes, this is a bit hacky, and a derivative of what I did in order to
customize create custom translations. Having a single .po aggregating
all the translations is quite handy for that purpose, but of course
the ideal thing would be to make Ckan populate the translations
catalog from plugins too..
I can do that, but first I'd like to clean up the plugin importing
thing a bit, in order to be able to use system functions in a cleaner
way (I ended up iterating entry points by myself in that paster
command, since there weren't any suitable functions to use..).
It might be worth using [stevedore] to handle all the entry-points
management & discovery thing...? I see most projects making large use
of entry points tend to use it.
[stevedore]: http://stevedore.readthedocs.org/
- --
Samuele Santi
Trento Rise
http://www.trentorise.eu/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJSlHxdAAoJEGgM+6dff2m7QasP/RBnOUIDoWb7HNvKQe7flp5B
BTVmdP7zm+G+biuSZHqsxnl53e7+GkwazkN4SqxIxMa8fD+WaO48Lf1zaU+xw9x8
NVbXSzG2lXnxbbnuhk2qNsEb3NSqenXhAsl3Zx1ZIA75qiTRAnwFoMJhB64Dwqf0
tplaLvGsi4LNg6OEap/FGDzARDbHi4KQrxtnZSNqmeOdbCsyhowr9EATdP8daZ6X
XAEiwN7wBjj4bvRDFl6+A1t2UfHX8oJoe19vBzYNgqETAPwKTxubgLZvdIe5XBI9
UwXw2TKmAsMbRyLJRz52Ql2BLBA7LgBNzEo06Xwbn0n5fup78JDJbGzcJcLyoLs/
LI7g1ZWwvsjPKnxUMbdJF3Opdu+hCkaoEDxFRf/dRv2FjY74MRGROtH29M86z277
n2IxnEgIqdP0s9b9yOPJT+AzPBcONUtWRDzKtgvkSv4yPvLzIE1lG31i4rIoDLE3
0heVdWvQSa8JmBNRw+m3wqEsDGxw3keG4gHhb0bgs9couCCMF8gegvoQ/7itE7dN
uFBGIFsAIb8MTuPVRKh7ikkluFJ5i3eQbO3IpKQWLg4/1SNpVhUtYsXMc3nkPidF
wXZprWFvNm3Rp3jHsyhAbFiFCDhpSrQG4qOmJdmbuhqwNJhCZ+1RBnr7eQe/eUiq
CGNwoLHBt/eifTCmwnUF
=/7y2
-----END PGP SIGNATURE-----
More information about the ckan-dev
mailing list