RSS/Atom feed Twitter
Site is read-only, email is disabled

ugly hack to update old PO files

This discussion is connected to the gimp-docs-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

ugly hack to update old PO files Daniel Nylander 11 Jan 02:03
  ugly hack to update old PO files Ulf-D. Ehlert 25 Jan 19:04
Daniel Nylander
2009-01-11 02:03:52 UTC (almost 16 years ago)

ugly hack to update old PO files

Did some ugly hacking today to update my old PO files with new strings from the recent POT files and re-using my already translated strings.. This is rather ugly but useful.. just wanted to share this with you guys

cd po/xx # where xx is your language code

pocompendium Compendium.po -d .

# translate/review/edit your Compendium.po file

for a in `find .|grep po$`; do echo $a; msgmerge --compendium=Compendium.po -U $a ../../pot/$a*; done

# That will update your PO files with strings from the compendium.. i.e translate one string one time

Daniel

Ulf-D. Ehlert
2009-01-25 19:04:11 UTC (almost 16 years ago)

ugly hack to update old PO files

Hi Daniel,

Daniel Nylander (Sonntag, 11. Januar 2009, 02:03):

Did some ugly hacking today to update my old PO files with new strings from the recent POT files and re-using my already translated strings.. This is rather ugly but useful.. just wanted to share this with you guys

cd po/xx # where xx is your language code

pocompendium Compendium.po -d .

This is not a good idea. I just had a look at your Compendium.po (while looking for "Plural-Forms" which make Python's gettext module crash), and this file is more or less useless.

Compendium.po should be a small file containing strings with many definitions (used in several files), e.g.

msgid "Color" msgstr "Farbe"

msgid "Layer" msgstr "Ebene"

etc.
See po/de/menus/Compendium.po or po/fr/menus/Compendium.po for a useful example.

The 'msgcat' command has a '--more-than' option which might be right way to create a compendium file.

# translate/review/edit your Compendium.po file

Yes!! ;-) Try
ls -l po/sv/Compendium.po po/{de,fr}/menus/Compendium.po or
head -n 1000 po/sv/Compendium.po po/{de,fr}/menus/Compendium.po to see the difference.

Bye,
Ulf