On 30 Jul 2007, at 22:42, Damien Donlon wrote:

So I guess my question is : How do I adjust the SDF files that I have
taken from the database so that they generate PO files which include the
comment in the msgid? If I can do this then I can get leverage.

On a related note, if you've merged old translations with a new set of .pot files which have had KDE-style duplicate strings added, you've probably got a set of .po files that contain lots of "duplicate" entries without translations, but with an identical string marked as obsolete at the bottom of the same file, i.e. lots of files containing things like this:

  msgid ""
  "_: animals.DIALOG.pushbutton101text"
  "My dog"
  msgstr ""

  msgid ""
  "_: animals.DIALOG.pushbutton102text"
  "My dog"
  msgstr ""

  #~ msgid "My dog"
  #~ msgstr "Mon chien"

If you've got lots of these, then I've got a couple of scripts that'll help. Get yourself a copy of the following:
http://svn.ikso.net/openoffice/trunk/cxie-retrovi-tradukojn
http://svn.ikso.net/openoffice/trunk/retrovi_tradukojn.awk

(Don't be put off by the Esperanto names. :o) The files contain explanatory comments in English too.)

The awk script ("retrovi_tradukojn.awk") takes all the translations marked with #~ (i.e. marked as obsolete) in a given file, and puts the msgstr strings from these into any KDE-style duplicate translations in the same file which are currently untranslated.

The bash script ("cxie-retrovi-tradukojn") just repeatedly calls the above awk script on every .po file it can find working down from the given directory.

Enjoy! (And send bug reports and patches to me please!)


Tim





Attachment: PGP.sig
Description: This is a digitally signed message part

Reply via email to