Changes between Version 3 and Version 4 of TracDev/Proposals/ConfigEnumTranslation
- Timestamp:
- Oct 26, 2012, 7:46:12 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracDev/Proposals/ConfigEnumTranslation
v3 v4 1 1 = Proposal for translation of configurable labels 2 2 == The Problem 3 We have translatable messages since Trac-0.12, even extended the i18n system towards configuration option doc-strings. But we're still missing translations in some rather prominent places .3 We have translatable messages since Trac-0.12, even extended the i18n system towards configuration option doc-strings. But we're still missing translations in some rather prominent places, mostly related to terms that are meant to be customized in Trac installations. 4 4 5 5 == Currently untranslatable items … … 10 10 * status (see configurable ticket workflow below) 11 11 * priority 12 * se rverity12 * severity 13 13 * milestone (see below) 14 14 * customized labels for standard fields (see #6249) … … 21 21 * ticket changes (related to ticket status from work-flow above, see #5441) 22 22 23 Well, I guess this should be almost identical to MissingTranslations (listed by module), right? 23 Those are also present for now in MissingTranslations (listed by module), although that page should be dedicated to terms that could be translated using the current markers and which are simply missing them. 24 25 Here we'll focus on terms that are meant to be customized and are found in the database or in the TracIni file rather than in the code. 24 26 25 27 … … 34 36 * use standard procedures to edit message catalogs 35 37 38 Or, alternatively: 39 * `trac-admin <env> localize` and subcommands: 40 - `extract` -- creates or updates the `<env>/locale/custom.po` file 41 - `init fr` -- creates the `<env>/locale/fr/LC_MESSAGES/custom.po` file from `<env>/locale/fr/LC_MESSAGES/custom.po` if it doesn't exist yet 42 - `update fr` -- updates that file 43 - `compile fr` -- compiles that file into `<env>/locale/fr/LC_MESSAGES/custom.mo` 44 * `trac-admin <env> localize ` //`subcommand`//` *` operates on all present catalogs (except for `init`) 45 * `trac-admin <env> initenv` copies into `<env>/locale` all the already available `custom` related files, containing the translation for the "base" terms (e.g. the workflow states for the default terms, [#Wishlist 2.] below) 46 47 36 48 === Implementation details 37 49 The aforementioned work-flow implies, that custom message cataloges are rather volatile. But recompilation on Trac environment load should be avoided, because this could be rather time-consuming. So it must be possible to pre-compile them, i.e. with yet another `trac-admin` command. 50 ''cboos - I agree. Let's not try to work with .po files directly (if that was what you implied). Trac should only consider the present `.mo` files obtained from a `trac-admin <env> localize compile`. '' 38 51 39 52 === Wishlist 40 53 (Order should matter) 41 54 42 *auto-generated TRANSLATOR hints like55 1. auto-generated TRANSLATOR hints like 43 56 `# ini:ticket-workflow` or `# enum:priority` 44 * include a ''basic common'' set of typical terms, like work-flow action names from default ticket work-flow 45 * detect changes, to remind for recompilation, if pending changes are detected, but PO (clear-text) and MO (compiled) message catalog files change time must be tracked like done for `trac.ini` to make this happen 57 - alternatively, if there's no //source// file, that line could be faked: 58 {{{ 59 #: ticket/enum/priority:2 60 msgid "high" 61 }}} 62 2. include a ''basic common'' set of typical terms, like work-flow action names from default ticket work-flow 63 3. detect changes, to remind for recompilation, if pending changes are detected, but PO (clear-text) and MO (compiled) message catalog files change time must be tracked like done for `trac.ini` to make this happen 64 - a macro could take care of this? `[[TracAdminLocalizeStatus(format=stats,lang=fr)]]` / `[[TracAdminLocalizeStatus(format=table)]]`