Ticket #1350 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

i18n of new javascript

Reported by: zephod Owned by: zephod
Priority: awaiting triage Milestone: ckan-sprint-2011-09-26
Component: ckan Keywords:
Cc: Repository: ckan
Theme: none

Description (last modified by zephod) (diff)

New js code running produced in the work following #1294 contains various string literals, and needs proper internationalisation.

See files:

  • application.js
  • templates.js

Furthermore, efforts can be made to tidy up strings as described in #1329.

Change History

comment:1 Changed 3 years ago by zephod

  • Description modified (diff)

comment:2 Changed 3 years ago by zephod

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

Was going to reimplement an old workaround described by Friedrich, where a language.js file is served through the home controller (with appropriate settings in routing.py) and so ${_('string literals')} will be translated. See:

However the string-extraction mechanism seems geared towards Genshi templates and hacks are required to make it read a javascript file neatly (ie. without putting the *entire file* into a string for translation). A more elegant solution seems to be using an xi:include to pull in a genshi template which contains an html <script> tag.

  • cset:d5bf4c7ba293

Issue is resolved; strings are now translated.

comment:3 Changed 3 years ago by zephod

  • Milestone changed from ckan-current-sprint to ckan-sprint-2011-09-26
Note: See TracTickets for help on using tickets.