[opensuse-packaging] About patching .po and .gmo files
Hi. I've updated the Spanish translation for Obconf. I've submitted the file upstream but in the meantime I want to add it to the package in the repos. If I only include the es.po patch (because es.gmo is a binary file) the updated translation isn't applied. I think that OBS copies the .gmo files directly. How do I manage this? Do I have to upload the .gmo file and copy it in the install phase of the spec file? Greetings. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Wed, 07 Jan 2015 22:22:51 +0100 jcsl wrote:
I've updated the Spanish translation for Obconf. I've submitted the file upstream but in the meantime I want to add it to the package in the repos. If I only include the es.po patch (because es.gmo is a binary file) the updated translation isn't applied. I think that OBS copies the .gmo files directly. How do I manage this? Do I have to upload the .gmo file and copy it in the install phase of the spec file?
No enough info. Anyway, patch the es.po. Then 'make update-gmo' in the locale directory. -- WBR Kyrill
Hi. El Jueves, 8 de enero de 2015 00:41:57 Kyrill Detinov escribió:
On Wed, 07 Jan 2015 22:22:51 +0100 jcsl wrote:
I've updated the Spanish translation for Obconf. I've submitted the file upstream but in the meantime I want to add it to the package in the repos. If I only include the es.po patch (because es.gmo is a binary file) the updated translation isn't applied. I think that OBS copies the .gmo files directly. How do I manage this? Do I have to upload the .gmo file and copy it in the install phase of the spec file?
No enough info.
Package is Obconf. https://build.opensuse.org/package/show/home:jcsl:test/obconf The "po" directory contains .po and .gmo files. I have found that .gmo are just .mo files, so I did msgfmt es.po -o es.gmo Then I created the patch with diff -uNr obconf-2.0.4 obconf-2.0.4-new The patch part for the es.po is correct, but for es.gmo it only outputs "Binary files obconf-2.0.4/po/es.gmo and obconf-2.0.4-new/po/es.gmo differ".
Anyway, patch the es.po. Then 'make update-gmo' in the locale directory.
In the "po" directory there is a Makefile.in.in only, so I don't know what to do. Would that make any difference given that I've already created the .gmo file manually? Greetings. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Wed, 07 Jan 2015 23:15:55 +0100 jcsl wrote:
Anyway, patch the es.po. Then 'make update-gmo' in the locale directory.
In the "po" directory there is a Makefile.in.in only, so I don't know what to do. Would that make any difference given that I've already created the .gmo file manually?
Just a quick tip: %build mv po/no.po po/nb.po %configure pushd po make update-gmo popd %__make I see: [ 9s] configure complete, now type "make" [ 9s] + pushd po [ 9s] ~/rpmbuild/BUILD/obconf-2.0.4/po ~/rpmbuild/BUILD/obconf-2.0.4 [ 9s] + make update-gmo [ 9s] rm -f es.gmo && /usr/bin/msgfmt -c --statistics -o es.gmo es.po [ 9s] 154 translated messages, 2 untranslated messages. [ 9s] rm -f nb.gmo && /usr/bin/msgfmt -c --statistics -o nb.gmo nb.po [ 9s] nb.po:7: warning: header field 'Language' still has the initial default value [ 9s] 113 translated messages, 43 untranslated messages. [ 9s] + popd Does it help? -- WBR Kyrill
El Jueves, 8 de enero de 2015 03:53:13 Kyrill Detinov escribió:
pushd po make update-gmo popd
Hi. Thanks, it worked perfectly. Greetings. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (2)
-
jcsl
-
Kyrill Detinov