From The Document Foundation Wiki
Jump to: navigation, search

See my personal site for details.


Of interest:

Export/Import .src comments to .sdf/.po format

This hack got added by Caolan in [1]


Our translations system has .src files in a custom format where developers add strings that need to be translated.

Translations are stored in .sdf files and there are various tools to convert these to and from the more normal .po format that translators are typically used to.

.src files can contain comments (x-comment) intended for the end-translator to see, e.g. See .po files can also contain comments, but the intermediate .sdf file does not.

Ideally the .sdf format would be able to store these comments, and the po2sdf and sdf2po tools would be made aware of them in order to import/export them.

See l10ntools for the source code to create .sdf files


Information about SDF:

From the page describing the format, we can see there are several legacy columns that can be re-used for storing comments. Re-using a column is always a bad idea, but the last column is the date of the entry, so there might be some tools that use "last column" for date rather than the actual column number. The help string looks very appropriate for this.

Currently looking for the po2sdf and sdf2po source code.

Found oo2po, it actually handles comments as language "x-comment".