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) |
| 219 | Here'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 | |