| 52 | Note: It could be wise to setup virtualenv and install genshi, babel etc. there. Then debugging is easier and it doesn't interfere with existing Trac sources. |
| 53 | |
| 54 | == Automatic translation compilation == |
| 55 | |
| 56 | If you want to setup automatic translation compilation it can be done very easily. |
| 57 | |
| 58 | 1. Right click on trac project and select ''Properties''. Select ''Builders''. Click ''New''. Select ''Program''. |
| 59 | |
| 60 | 2. Name builder, like 'Locale fi_FI builder' |
| 61 | |
| 62 | 3. ''Main'' tab: |
| 63 | ''Location'': click ''Browse File System...''. Select Python executable.[[BR]] |
| 64 | ''Working Directory'': set it to ''${project_loc}''[[BR]] |
| 65 | ''Arguments'': ''setup.py compile_catalog -f -l fi_FI'' (change to your locale)[[BR]] |
| 66 | |
| 67 | 4. ''Refresh'' tab: |
| 68 | Check ''Refresh resources upon completion''.[[BR]] |
| 69 | Select ''Spesific resources'' and select ''trac/locale/fi_FI'' (select your locale)[[BR]] |
| 70 | |
| 71 | 5. ''Build Options'' tab: |
| 72 | Check ''During auto builds''.[[BR]] |
| 73 | Check ''Specify working set of relevan resources''.[[BR]] |
| 74 | Click ''Specify resources...''. select ''trac/locale/fi_FI'' (select your locale, same as in step 4).[[BR]] |
| 75 | Name it like ''fi_FI locale''.[[BR]] |
| 76 | |
| 77 | 6. After modifying your message.po file you should get following output: |
| 78 | {{{ |
| 79 | running compile_catalog |
| 80 | compiling catalog 'trac/locale\\fi_FI\\LC_MESSAGES\\messages.po' to 'trac/locale\\fi_FI\\LC_MESSAGES\\messages.mo' |
| 81 | }}} |
| 82 | |
| 83 | And if Trac is running you will have changes immediately effective. |
| 84 | |