Mailinglist Archive: opensuse-translation (28 mails)

< Previous Next >
Re: [opensuse-translation] Testing update-desktop-files translations
Hi,

I had this question year ago. Please read Karl responses to
http://lists.opensuse.org/opensuse-translation/2010-01/msg00029.html

So you can execute this in lcn/*/po directory:

for filePo in update-desktop-files*.*.po; do
msgattrib -o - --no-obsolete $filePo | awk '/^msgctxt/ {
body = 1
ctxt=gensub(/msgctxt \"(.+)\"/, "\\1", "g")
# Escape "&" in file name
#print "***** " ctxt
gsub(/&/, "\\\\&", ctxt)
#print "***** " ctxt
next
}
/^msgid/ && body == 1 {
sub(/msgid \"/, "&" ctxt ": ")
print
next
}
{print}
' > darbalaukis.lt.po.naujas
msgfmt darbalaukis.lt.po.naujas -o darbalaukis.lt.mo;
msgunfmt --no-wrap darbalaukis.lt.mo | \
grep -v '^"[A-Z][^ ]*: ' | grep '[^\][\]n"' && exit 1
rm darbalaukis.lt.mo
if test -f darbalaukis.lt.po; then
msgcat -o darbalaukis.lt.po --use-first darbalaukis.lt.po
darbalaukis.lt.po.naujas
rm darbalaukis.lt.po.naujas
else
mv darbalaukis.lt.po.naujas darbalaukis.lt.po
fi
done
# TÄ… rinkmenÄ… sukompiliuojame
msgfmt --verbose -o desktop_translations.mo darbalaukis.lt.po
rm darbalaukis.lt.po

Regards,
Mindaugas B.



--
To unsubscribe, e-mail: opensuse-translation+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-translation+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References