[Freeipa-devel] [PATCH] Initial gettext support for C tools

John Dennis jdennis at redhat.com
Mon Oct 11 18:18:11 UTC 2010


On 10/11/2010 01:01 PM, Simo Sorce wrote:
> On Fri, 08 Oct 2010 10:26:18 -0400
> Rob Crittenden<rcritten at redhat.com>  wrote:
>
>> Simo Sorce wrote:
>>>
>>>
>>> This is some very basic initial localization work for the C tools.
>>> I do not have any translation yet, and creation and merging of .po
>>> and binary files is not yet done. But the clients.pot file is
>>> regularly updated when make is run in the main dir (or make gettext
>>> in the ipa-clients dir).
>>>
>>> Fixes trac#186
>>>
>>> Simo.
>>
>> Nack. As discussed in IRC we are going to use a single po file for
>> all translations.
>
> Ok, here a revised patch that uses the existing intall/po
> infrastructure and generates a single .po file
>
> I took the liberty of converting the Makefile in there to
> automatically source .py, c and .h files, and also removed
> install/po/Makefile as the Makefile.in is all we need in git I think.

NAK

There are several things I'd like to see you address:

1) Please keep the independent list of python and c files potfiles as 
make variables. This is preferred because:

a) It allows the use of these as explicit make target and dependencies.

b) It permits knowing exactly what these files are and could be dumped 
out via a trivial make target for debugging and information purposes.

c) It avoids bizarre magic. By letting xgettext find some files and have 
others explicitly listed you've buried inside some cryptic shell 
commands both implicit and explicit file lists, the implicit file list 
being invisible. That's just very hard to maintain and understand.

2) By letting xgettext find the files you've exposed ourselves to 
corruption. If you happen to have a .py or .c file hanging around in 
your development tree which is not our git repo you'll embed that bogus 
file into our pot file.

3) You can address both above issues by doing this. Use a shell command 
to set the PYTHON_POTFILES & C_POTFILES. That shell command should 
produce the intersection of the git file list and the language. I will 
send you a Python script to do this.



-- 
John Dennis <jdennis at redhat.com>

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/




More information about the Freeipa-devel mailing list