[ckan-dev] Solution: key/value resource translations

Isabel Ruiz isaruizmellado at gmail.com
Tue Mar 25 10:40:05 UTC 2014


ok!

Thanks!


On Mon, Mar 24, 2014 at 4:22 AM, Nigel Babu <nigel.babu at okfn.org> wrote:

> Hello Isabel,
>
> We discussed this at the dev meeting and noticed that adding a dynamic
> string as translate-able is the wrong approach. The strings aren't fixed
> and the translators can't do much about it. The multilingual extension
> might be the right way to go about this.
>
> Nigel Babu
>
> Developer  |  @nigelbabu <https://twitter.com/nigelbabu>
>
> 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 | http://ckan.org/ | @CKANproject <http://twitter.com/CKANproject> |the world's leading open-source data portal platform
>
>
> On 18 March 2014 19:03, Isabel Ruiz <isaruizmellado at gmail.com> wrote:
>
>> Hi everyone!
>>
>> I have CKAN 2.0
>>
>> I have detected this on resource details page (file:
>> /package/resource_read.html):
>>
>> If you click on "Aditional Information / Show More" link, CKAN shows
>> key/value pairs from resource, this is because there is a for loop into
>> resource_read.html file that shows them, but texts never is translated.
>> This is because it has not correct tags in resource_read.html file.
>>
>> To solve this we have to replace in resoucr_read.html line:
>>
>>           <tr class="toggle-more"><th scope="row">{{ key }}</th><td>{{
>> value }}</td></tr>
>> with:
>>         <tr class="toggle-more"><th scope="row">{{ _(key) }}</th><td>{{
>> _(value) }}</td></tr>
>>
>> and write translations keys and values on translation file.
>>
>> --
>> Isabel M. Ruiz Mellado
>> http://about.me/isabelruiz
>>
>> _______________________________________________
>> 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
>>
>>
>
> _______________________________________________
> 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
>
>


-- 
Isabel M. Ruiz Mellado
http://about.me/isabelruiz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140325/9c063026/attachment-0003.html>


More information about the ckan-dev mailing list