Ticket #1329 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

i18n poor in some templates - missing i18n tags

Reported by: amercader Owned by: dread
Priority: major Milestone: ckan-sprint-2011-10-28
Component: ckan Keywords:
Cc: Repository: ckan
Theme: none


Just a tip for developers regarding translations:

  • When writing templates, mark <p>, <div>, etc elements with the

i18:msg attribute, otherwise the messages don't get extracted properly.

Good: https://bitbucket.org/okfn/ckan/src/1996b0439e81/ckan/templates/home/about.html#cl-40

<p i18n:msg="">More about CKAN, and the background to its creation can
   be found in <a

gives this: https://bitbucket.org/okfn/ckan/src/1996b0439e81/ckan/i18n/ca/LC_MESSAGES/ckan.po#cl-1238

Bad: https://bitbucket.org/okfn/ckan/src/1996b0439e81/ckan/templates/package/new_package_form.html#cl-211

<p class="hints">
<strong>Important:</strong> By submitting content, you agree to
release your contributions
 under the <a href="http://opendatacommons.org/licenses/odbl/1.0/">Open
Database License</a>. Please <strong>refrain</strong> from editing
this page if you are <strong>not</strong> happy to do this.

gives this: https://bitbucket.org/okfn/ckan/src/1996b0439e81/ckan/i18n/ca/LC_MESSAGES/ckan.po#cl-1384

The message is split in different parts that not necessarily match the grammar or syntax of the translated language.

Change History

comment:1 Changed 3 years ago by zephod

I've tried to do this wherever I could as I looked through ckan.pot for broken pieces of string. Generally it triggers errors unless things are very neatly structured (no nested links or ${a.variable} accesses, it seems) but things are quite a lot tidier. cset:d5bf4c7ba293 Does that count as 'fixed', or is this a permenant issue?

comment:2 Changed 3 years ago by dread

  • Owner set to dread
  • Status changed from new to assigned

I'll take a look to see if I can do any more and then will close it.

comment:3 Changed 3 years ago by dread

  • Status changed from assigned to closed
  • Resolution set to fixed

POT looks far better. I couldn't see any outstanding problems.

This has gone into ckan 1.5.

Note: See TracTickets for help on using tickets.