[opensuse-translation] Testing update-desktop-files translations
![](https://seccdn.libravatar.org/avatar/8489556b16f8bd7d25fd0534e553dce8.jpg?s=120&d=mm&r=g)
Hi all, I have set up an openSUSE 11.4 in virtualbox in order to test translations of update-desktop-files since some entry in the K menu is not translated even if it translated in the update-desktop-files.po. The problem is that I do not know how to generate the desktop_translations.mo file that contains translations from update-desktop-files.po files. I know how to generate a .mo file from a single .po file (e.g., when I test YaST translations) but if I try with update-desktop-files.po files, the resulting .mo file is not like the original desktop_translations.mo Any hint? Regards, Andrea -- To unsubscribe, e-mail: opensuse-translation+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-translation+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/9e59f24a2145956c4f77b50a2eb2e6d7.jpg?s=120&d=mm&r=g)
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@opensuse.org For additional commands, e-mail: opensuse-translation+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/8489556b16f8bd7d25fd0534e553dce8.jpg?s=120&d=mm&r=g)
Hi, 2011/4/15 embar@super.lt <embar@super.lt>:
Hi,
I had this question year ago. Please read Karl responses to http://lists.opensuse.org/opensuse-translation/2010-01/msg00029.html
Thanks a lot. I used the script in 50-tools and it works. Regards, Andrea -- To unsubscribe, e-mail: opensuse-translation+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-translation+help@opensuse.org
participants (2)
-
Andrea Turrini
-
embar@super.lt