[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: maint.mk: sc_po_check misses out on translated shell scripts
From: |
Eric Blake |
Subject: |
Re: maint.mk: sc_po_check misses out on translated shell scripts |
Date: |
Tue, 04 Jan 2011 14:45:07 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7 |
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 address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature