On Mon, 11 Oct 2010 14:18:11 -0400
John Dennis <jden...@redhat.com> wrote:

> On 10/11/2010 01:01 PM, Simo Sorce wrote:
> > On Fri, 08 Oct 2010 10:26:18 -0400
> > Rob Crittenden<rcrit...@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:

I don't think I have changed this, PYTHON_POTFILES and C_POTFILES are
make variables afaik ...

> 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.

You also have access to the implicit file list through the PY_FILES
variable, so I am not sure what you are asking.

Do you want me to have a separate variable with the explict python
files that is separate and only then merge the 2 lists into the single
PYTHON_POTFILES variable ?

Something like:
        PY_EXPLICIT_FILES = yadda yadda
        PYTHON_POTFILES = $(PY_FILES) $(PY_EXPLICIT_FILES)
perhaps ?


> 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.

I didn't do that, xgettext does not find anything by itself it takes
the list from PY_FILES and C_FILES and H_FILES which are autogenerated
out of a git ls-files output. This guarantees only and all committed
files that match the extension are taken in consideration.

> 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.

Have you actually read the right patch ?? Maybe you looked at the old
version I posted before the weekend ?

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to