> [: Leonardo F. Fontenelle :] > This might be more to the point: > > for file in po/*.po; do > sed -i "s+msgid \"\([^|]*\)|+msgctxt \"\1\"\nmsgid \"+" $file > done One could also make use of the as-of-yet-unreleased Pology package: $ posieve normctxt-sep -ssep:'|' po/*.po Pology can be obtained and readied for use by: $ svn co svn://anonsvn.kde.org/home/kde/trunk/l10n-support/pology $ export PATH=$PWD/pology/scripts:$PATH The crux of the conversion is in sieve/normctxt_sep.py, method process (line 66). I think it's rather self-explanatory and tuneable for more cleverness (e.g. take into account extracted comments and/or msgstr). The API to message object can be found at pology/doc/html/index.html, module pology.file.message, class Message_base. -- Chusslove Illich (Часлав Илић)
Attachment:
pgp2BtKk6jUCg.pgp
Description: PGP signature