#4: Use new fully gettext standard compatible format for po files
- Proposed by
- Hanno Schlichting
- Seconded by
- Dorneles Treméa
- Proposal type
- Architecture
- Assigned to release
- State
- completed
Definitions
A new message entry will look like this:
white-space
# translator-comments
#. Default: "untranslated-string"
#: reference1:line
#: reference2:line
#, flag...
msgid "untranslated-string or id"
msgstr "translated-string"
Motivation
The current format we are using is not standard compliant to the gettext standard (http://www.gnu.org/software/gettext/manual/html_mono/gettext.html#SEC9). This becomes quite obvious by looking at the diff's generated for every commit. As some people use translation tools (like poEdit) which enforce standard compliance, we get a lot of unneccassary differences solely for format changes rendering the diffs nearly unusable.
See http://article.gmane.org/gmane.comp.web.zope.plone.internationalization/2172 for a detailed discussion.
Proposal
1. Use a fully gettext compatible format in respect to the ordering of the different elements a message entry consists of.
2. As we now have the Original comments I don't see any necessity anymore for the excerpts. By removing these we get some radically smaller files but loose the context information. To compensate this I propose to add line numbers to the references.
3. As a last change I would like to rename the word 'Original' to 'Default', which is used by Zope3 for the same purpose it serves us.
Implementation
i18ndude has to be rewritten to support these new format. I have already begun this work and it will be released as i18ndude 2.0.
Progress log
In the course of rewritting i18ndude I noticed that providing line numbers for pt files is nearly impossible with the current PTReader and so will be postponed to a later date.
Participants
Hanno Schlichting