
Jean Cayron <jean.cayron@gmail.com> writes:
To compile a PO file into a MO file you have to do this commande:
msgfmt -o desktop_translations.mo desktop_translation.po (replace the files by the right path). You have then to copy it to the right directory /usr/share/locale/"language-code"/LC_MESSAGES (for some mo files, it's in locale-bundle).
Another easy way to create the mo file is to open it with Poedit and save it: it'll create, beside the PO file a MO file.
Yes, but the tricky part is hidden in the PREPARE_PACKAGE script coming with the desktop_translations package. You first must change the new format with msgctxt fields to the old one; this awk snippet seems to do it (I'm still addicted to awk ;) ): msgattrib -o - --no-obsolete $file | awk '/^msgctxt/ { body = 1 ctxt=gensub(/msgctxt \"(.+)\"/, "\\1", "g") next } /^msgid/ && body == 1 { sub(/msgid \"/, "&" ctxt ": ") print next } {print} ' > po/$lang/entries.po.new Then use msgcat to concatenate all your converted update-desktop-files-*. It is probably time to make this feature available in the 50-tools directory. -- Karl Eichwalder R&D / Documentation SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) -- To unsubscribe, e-mail: opensuse-translation+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-translation+help@opensuse.org