#694: Translations scaffolding
------------------------+----------------------
  Reporter:  olemis     |      Owner:  olemis
      Type:  task       |     Status:  assigned
  Priority:  minor      |  Milestone:
 Component:  trac core  |    Version:  0.7.0
Resolution:             |   Keywords:  i18n
------------------------+----------------------

Comment (by SaintGermain):

 Ok I finished the new patch (will upload this evening). The previous one
 had some errors in it anyway.

 I ended up using the plugin package name as translation domain.
 However I could not create a bhdashboard.util.translation as there were
 already a util.py or utils.py file inside each plugin. So I created a
 translation.py file, which means we'll use:
 {{{from bhdashboard.translation import _}}}

 One point which I am not quite satisfied. Content of translation.py is:
 {{{
 from trac.util.translation import domain_functions

 _, ngettext, tag_, tagn_, gettext, N_, add_domain = \
     domain_functions('bhdashboard', ('_', 'ngettext, 'tag_', 'tagn_',
 'gettext', 'N_', 'add_domain'))
 }}}

 I was wondering if we could find a find to get the package name inside
 this file instead of hard-coding the 'bhdashboard' ?

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/694#comment:20>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker

Reply via email to