=== Export/Import .src comments to .sdf/.po format === 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 http://opengrok.libreoffice.org/xref/components/cui/source/options/optsave.src#221 .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 '''Skills:''' C++ '''Taken by''': [[User:DrDub|DrDub]] (2011/04/18)
I think correct link is this: http://opengrok.libreoffice.org/xref/core/cui/source/options/optsave.src#234
@Andras: If this EasyHack is still valid, could you mentor or reasign to better suited mentor?
@Björn: yes, it is still valid.
http://cgit.freedesktop.org/libreoffice/core/commit/?id=3f00358bfdad0a18fe053c3d154f74e3aa6afba9 This enables export of comments to en-US sdf file.
With the patch below, oo2po writes the x-comment to a developer comment in pot files. Problem solved. --- /home/timar/src/translate-toolkit-1.9.0/translate/convert/oo2po.py 2010-08-23 08:45:46.000000000 +0200 +++ /usr/local/lib/python2.7/site-packages/translate/convert/oo2po.py 2012-04-14 16:14:42.305234337 +0200 @@ -75,10 +75,9 @@ else: # if the language doesn't exist, the translation is missing ... so make it blank part2 = oo.ooline() - if "x-comment" in theoo.languages: - translators_comment = theoo.languages["x-comment"] - else: - translators_comment = oo.ooline() + line = oo.ooline() + line.text = part1.getparts()[11] + translators_comment = line key = oo.makekey(part1.getkey(), self.long_keys) unitlist = [] for subkey in ("text", "quickhelptext", "title"):
Migrating Whiteboard tags to Keywords: (EasyHack SkillCpp) [NinjaEdit]