[opensuse-translation] How to build desktop_translations.mo
Hellow, I would like to manualy create desktop_translations.mo file. I would like to see the effects of translations as fast as possible. Please, can somebody teach me to compile update-desktop-files-*.po ? Lithuanian translator, Mindaugas -- To unsubscribe, e-mail: opensuse-translation+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-translation+help@opensuse.org
Hi, I think this could help: http://en.opensuse.org/Maintaining_Translation_Related_Packages Maybe instead of make a submit request you could build the update-desktop-files or translation update package locally and test yourself. but Karl could explain it better Regards, Luiz 2010/1/26 embar@super.lt <embar@super.lt>:
Hellow,
I would like to manualy create desktop_translations.mo file. I would like to see the effects of translations as fast as possible. Please, can somebody teach me to compile update-desktop-files-*.po ?
Lithuanian translator, Mindaugas
-- To unsubscribe, e-mail: opensuse-translation+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-translation+help@opensuse.org
-- To unsubscribe, e-mail: opensuse-translation+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-translation+help@opensuse.org
Tirsdag den 26. januar 2010 14:25:14 skrev embar@super.lt:
I would like to manualy create desktop_translations.mo file. I would like to see the effects of translations as fast as possible. Please, can somebody teach me to compile update-desktop-files-*.po ?
I'd guess one way of doing it would be to update the tarball for the package 'desktop-translations' with your changes, and then rebuild it locally or in your OBS home repo. Of course it might also be as easy as a simple msgfmt command. Maybe the specfile for 'desktop-translations' package gives hints. -- To unsubscribe, e-mail: opensuse-translation+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-translation+help@opensuse.org
Hie Mindaugas, 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. Regards, Djan 2010/1/26 Martin Schlander <martin.schlander@gmail.com>:
Tirsdag den 26. januar 2010 14:25:14 skrev embar@super.lt:
I would like to manualy create desktop_translations.mo file. I would like to see the effects of translations as fast as possible. Please, can somebody teach me to compile update-desktop-files-*.po ?
I'd guess one way of doing it would be to update the tarball for the package 'desktop-translations' with your changes, and then rebuild it locally or in your OBS home repo.
Of course it might also be as easy as a simple msgfmt command. Maybe the specfile for 'desktop-translations' package gives hints. -- To unsubscribe, e-mail: opensuse-translation+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-translation+help@opensuse.org
-- To unsubscribe, e-mail: opensuse-translation+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-translation+help@opensuse.org
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
Thanks, but I see that it is not simple like self compile yast2 messages... I am not a programer, I don't understand how to use that scirpt... Mindaugas -- To unsubscribe, e-mail: opensuse-translation+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-translation+help@opensuse.org
"embar@super.lt" <embar@super.lt> writes:
I see that it is not simple like self compile yast2 messages... I am not a programer, I don't understand how to use that scirpt...
I copied a simplified (and improved) version to trunk/lcn/50-tools/lcn-udf-compile.sh .
From the lcn directory call it as follows:
50-tools/lcn-udf-compile.sh $LL Replace $LL with your language code (= lt). The script ATM writes to a directory named "po". This has to be changed later... Find the final .mo as: po/lt/desktop_translations.mo -- 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
Thanks Karl! It works!
From the lcn directory call it as follows:
50-tools/lcn-udf-compile.sh $LL
Replace $LL with your language code (= lt). The script ATM writes to a directory named "po". This has to be changed later... Find the final .mo as:
po/lt/desktop_translations.mo
-- To unsubscribe, e-mail: opensuse-translation+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-translation+help@opensuse.org
participants (5)
-
embar@super.lt
-
Jean Cayron
-
Karl Eichwalder
-
Luiz Fernando Ranghetti
-
Martin Schlander