On 01/04/2011 02:38 PM, Eric Blake wrote: > Libvirt just got false negatives during 'make syntax-check' on a patch > that added shell script translations to libvirt-guests.init.in (the > version-controlled source file that gets converted into an init script), > because sc_po_check complained that the file shouldn't have been listed > in POTFILES.in. This is because shell script translations don't use > _(). Rather, they can be recognized by the presence of sourcing > gettext.sh then using 'gettext "string"' or 'eval_gettext "string"'. > > I worked around it in libvirt by adding a dummy shell comment with _(), > because I wasn't quite sure how to patch sc_po_check to use a better > regex that would recognize the use of gettext.sh in a shell script. But > I'm hoping that someone else can help come up with a way to make the > syntax-check rule be smarter about translated shell scripts.
For that matter, merely adding the shell script file to po/POTFILES.in is not getting anything picked up into the pot file. I wonder if I have to somehow teach xgettext to use --language=Shell for that one file. In fact, how _does_ one concatenate input strings from multiple languages into a single .pot file? Does it require multiple xgettext runs, one per language? And if that is the case, how do I represent that in the autotooled build rules, such as po/Makevars.in? -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature