[ckan-discuss] [ckan-dev] New i18n guidelines for CKAN

Stefan Oderbolz stefan.oderbolz at liip.ch
Mon Apr 7 14:01:25 UTC 2014


Hi Sean,

I like the guidelines, they point out the most important things there are
to know about i18n for CKAN.

One thing I always wondered (I'm not sure if this has already been
discussed) is the usage of English as the base language in the templates.
There is a special handling for English in the code to prevent translations
from being loaded. First of all this is ugly if you try to provide your own
translation for English (to change expressions etc.).

I'm a big fan of using placeholder text (instead of having {{ _('Terms of
Use') }} use {{ _('footer.legal_requirements') }}). This mitigates the
issue of people making assumptions about the language that is used (like
your person/people example).
It would make CKAN really more versatile if you would treat the English
translation just like any other.

So for the example above you would simply provide an English translation
with

msgid "footer.legal_requirements"
msgstr "Terms of Use"


In the Swiss portal we did just that, e.g.
https://github.com/ogdch/ckanext-ogdch/blob/develop/ckanext/ogdch/i18n/en/LC_MESSAGES/ckan.po#L6113


Regards Stefan


On Mon, Apr 7, 2014 at 1:17 PM, Sean Hammond <sean.hammond at okfn.org> wrote:

> Hi,
>
> We've written some new i18n guidelines for CKAN developers:
>
> https://github.com/ckan/ckan/pull/1628
>
> The idea is to show CKAN developers how to internationalize strings in
> CKAN core code and extensions, in a way that makes translation easier
> for translators and will therefoe improve the quality of CKAN's
> translations.
>
> I don't have much experience actually doing translations, so it would be
> great if any translators or developers who do have some experience could
> take a look at this pull request and add their feedback.
>
> Thanks
> _______________________________________________
> 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
>



-- 
Liip AG  //  Feldstrasse 133 //  CH-8004 Zurich
Tel +41 43 500 39 80 // GnuPG 0x7B588C67 // www.liip.ch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.okfn.org/pipermail/ckan-discuss/attachments/20140407/cbc1b2a2/attachment.html>


More information about the ckan-discuss mailing list