Edgewall Software

Changes between Version 20 and Version 21 of CookBook/PluginL10N


Ignore:
Timestamp:
Jun 13, 2010, 8:09:06 PM (14 years ago)
Author:
Christian Boos
Comment:

#Summingitup: detailed guide through the commits of the example plugin http://github.com/cboos/trachacks-hudsontracplugin

Legend:

Unmodified
Added
Removed
Modified
  • CookBook/PluginL10N

    v20 v21  
    217217
    218218==== Summing it up ====
    219 Here's an example of the changes required to add i18n support to a plugin: [http://github.com/cboos/trachacks-hudsontracplugin/commit/1669cefa806614e62bd9ce5573750e30fa060408 HudsonTrac 0.12 branch].
    220 
    221 Note:
    222  - it uses the old style for the `domain_functions` call. While this is still supported, new code should use the new style shown above, `domain_functions(domain, functions)`
    223  - it uses: `<path>/locale/*.*, <path>/locale/*/LC_MESSAGES/*.*` for the `package_data`. You should rather use only `<path>/locale/*/LC_MESSAGES/*.*` (see r9638 and r9640)
     219Here's an example of the changes required to add i18n support to the HudsonTrac plugin (`trac-0.12` branch):   
     220 - [[http://github.com/cboos/trachacks-hudsontracplugin/commit/1669cefa806614e62bd9ce5573750e30fa060408| Initial Python translation support ]]
     221   - [[http://github.com/cboos/trachacks-hudsontracplugin/commit/2f84cff6dec654f8d063289262cd1d6ea7b31648| ... better way to call add_domain ]]
     222 - [[http://github.com/cboos/trachacks-hudsontracplugin/commit/3c5b80e5ef3e70432b800c6a0c6504bc32ebe089| Template translation support (get_l10n_cmdclass) ]]
     223   - [[http://github.com/cboos/trachacks-hudsontracplugin/commit/0dd2ea455e57ef1134af394ec6ee1461d02018cb| ... don't forget to specify the domain!]]
     224 - [[http://github.com/cboos/trachacks-hudsontracplugin/commit/d5649ebc1433341f675bc7dcac29a9ee5e315f34| Javascript translation support (get_l10n_js_cmdclass) ]]
     225   - [[http://github.com/cboos/trachacks-hudsontracplugin/commit/b68a2514ad16d46e395de7994dbceabb878e84d9| ... don't forget to actually package the translation related files ]]
     226     - [[http://github.com/cboos/trachacks-hudsontracplugin/commit/775999a033b82654a85d862854d1f8c309d96c1e| and only the .mo files actually ]]
     227
    224228
    225229You'll find another example attached to this page. That is [th:wiki:SubticketsPlugin Sub-Tickets plugin] v0.1.0 and a [attachment:trac-subtickets-plugin_i18n-l10n.patch diff] containing all i18n/l10n related work to produce a German translation based on that source.