Edgewall Software

Changes between Version 3 and Version 4 of TracDev/Proposals/ConfigEnumTranslation


Ignore:
Timestamp:
Oct 26, 2012, 7:46:12 AM (12 years ago)
Author:
Christian Boos
Comment:

I like it ;-)

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/Proposals/ConfigEnumTranslation

    v3 v4  
    11= Proposal for translation of configurable labels
    22== 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.
     3We 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.
    44
    55== Currently untranslatable items
     
    1010   * status (see configurable ticket workflow below)
    1111   * priority
    12    * serverity
     12   * severity
    1313   * milestone (see below)
    1414   * customized labels for standard fields (see #6249)
     
    2121  * ticket changes (related to ticket status from work-flow above, see #5441)
    2222
    23 Well, I guess this should be almost identical to MissingTranslations (listed by module), right?
     23Those 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
     25Here 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.
    2426
    2527
     
    3436 * use standard procedures to edit message catalogs
    3537
     38Or, 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
    3648=== Implementation details
    3749The 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`. ''
    3851
    3952=== Wishlist
    4053(Order should matter)
    4154
    42  * auto-generated TRANSLATOR hints like
     55 1. auto-generated TRANSLATOR hints like
    4356  `# 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
     60msgid "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)]]`