Re: [Gnucash-changes] r13065 - gnucash/trunk - Fail 'make distcheck' if POTFILES.in contains undistributed files.

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [Gnucash-changes] r13065 - gnucash/trunk - Fail 'make distcheck' if POTFILES.in contains undistributed files.

Derek Atkins
Quoting Chris Shoemaker <[hidden email]>:

> dist-hook: po/POTFILES.in
>
> -distcheck-hook: po/POTFILES.in
> +distcheck-hook:
> + @e=''; \
> + for X in `grep -v \# ${distdir}/po/POTFILES.in` ; do \
> + if [ ! -f ${distdir}/$$X ] ; then \
> + echo $$X " is in POTFILES.in but not in the dist."; \
> + e='yes'; \
> + fi; \
> + done; \
> + if test "$$e" = "yes" ; then exit 1; fi;
>
> distclean-local:

Intresting approach.  Question:  do we want the reverse as well?
E.g., do we want to fail the check if a file exists in ${distdir}
but is listed in the POTFILES.skip?  That way if we have files now
and later add them to the dist, we dont lose strings down the road
because we forgot to remove the file from POTFILES.skip.

-derek

--
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       [hidden email]                        PGP key available

_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Gnucash-changes] r13065 - gnucash/trunk - Fail 'make distcheck' if POTFILES.in contains undistributed files.

Chris Shoemaker
On Wed, Feb 01, 2006 at 03:50:24PM -0500, Derek Atkins wrote:

> Quoting Chris Shoemaker <[hidden email]>:
>
> >dist-hook: po/POTFILES.in
> >
> >-distcheck-hook: po/POTFILES.in
> >+distcheck-hook:
> >+ @e=''; \
> >+ for X in `grep -v \# ${distdir}/po/POTFILES.in` ; do \
> >+ if [ ! -f ${distdir}/$$X ] ; then \
> >+ echo $$X " is in POTFILES.in but not in the dist."; \
> >+ e='yes'; \
> >+ fi; \
> >+ done; \
> >+ if test "$$e" = "yes" ; then exit 1; fi;
> >
> >distclean-local:
>
> Intresting approach.  Question:  do we want the reverse as well?
> E.g., do we want to fail the check if a file exists in ${distdir}
> but is listed in the POTFILES.skip?  That way if we have files now
> and later add them to the dist, we dont lose strings down the road
> because we forgot to remove the file from POTFILES.skip.
>

I imagine in _theory_ we might _want_ to distribute a file that we
explicitly don't want to mark for translation.  Like maybe an
already-translated report that generates output only valid in that one
language?

Anyway, the cost of forgetting to remove a re-distributed file from
POTFILES.skip is pretty minor and easy to notice: it just won't be
translated.

-chris
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Gnucash-changes] r13065 - gnucash/trunk - Fail 'make distcheck' if POTFILES.in contains undistributed files.

Derek Atkins
Quoting Chris Shoemaker <[hidden email]>:

> I imagine in _theory_ we might _want_ to distribute a file that we
> explicitly don't want to mark for translation.  Like maybe an
> already-translated report that generates output only valid in that one
> language?

In that case why would you have the strings marked for translation?
I can't imagine you'd have a report that says (N_ "¿Donde esta el baño?")
if it's already translated and specific to a particular locale.  If all
the strings are pure strings then there's no harm in having that file
"marked" for translation.  The reverse, however, is an issue...

> Anyway, the cost of forgetting to remove a re-distributed file from
> POTFILES.skip is pretty minor and easy to notice: it just won't be
> translated.

True, but just adding a simple check to make distcheck would solve that
problem now, instead of wondering why strings aren't translated later
down the road.

> -chris

-derek

--
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       [hidden email]                        PGP key available


_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Gnucash-changes] r13065 - gnucash/trunk - Fail 'make distcheck' if POTFILES.in contains undistributed files.

Chris Shoemaker
On Wed, Feb 01, 2006 at 04:55:16PM -0500, Derek Atkins wrote:

> Quoting Chris Shoemaker <[hidden email]>:
>
> >I imagine in _theory_ we might _want_ to distribute a file that we
> >explicitly don't want to mark for translation.  Like maybe an
> >already-translated report that generates output only valid in that one
> >language?
>
> In that case why would you have the strings marked for translation?
> I can't imagine you'd have a report that says (N_ "¿Donde esta el baño?")
> if it's already translated and specific to a particular locale.  If all
> the strings are pure strings then there's no harm in having that file
> "marked" for translation.  The reverse, however, is an issue...

Ok, that's probably a poor example.  

>
> >Anyway, the cost of forgetting to remove a re-distributed file from
> >POTFILES.skip is pretty minor and easy to notice: it just won't be
> >translated.
>
> True, but just adding a simple check to make distcheck would solve that
> problem now, instead of wondering why strings aren't translated later
> down the road.

The thing is, the gettext programs really do expect that POTFILES.skip
may contain distributed files that aren't translated.  If we're sure
we don't want to use it for that then the reverse check is fine.

I think we wouldn't want generated files to marked for translation,
even if they were distributed.  I don't know what we'd do if we wanted
to generate a .c file that didn't match our ignore patterns.

Maybe the --maintain mode isn't that important to us because
POTFILES.in is generated, but I think the intended use of
POTFILES.skip is to include _all_ our ignored files, like gw-*.c,
test-*.c, etc.  The --maintain mode finds all files not in POTFILES.in
or POTFILES.skip which currently means all the files rejected by the
ignore patterns.

I guess it boils down to "do we care about --maintain mode?"  If we
do, we should include the distributed, non-translated files in
POTFILES.skip.  If not, we might as well call it POTFILES.nodist and
check for accidental distribution.  In that case, we're not really
keeping a list of purposely non-translated files -- it's more a list
of files that _happen_ to be non-translated by virtue of not being
distributed.  Is that what we want?

-chris
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Gnucash-changes] r13065 - gnucash/trunk - Fail 'make distcheck' if POTFILES.in contains undistributed files.

Derek Atkins
Quoting Chris Shoemaker <[hidden email]>:

>> In that case why would you have the strings marked for translation?
>> I can't imagine you'd have a report that says (N_ "¿Donde esta el baño?")
>> if it's already translated and specific to a particular locale.  If all
>> the strings are pure strings then there's no harm in having that file
>> "marked" for translation.  The reverse, however, is an issue...
>
> Ok, that's probably a poor example.

Heh..  Can you come up with a better example, then?

> The thing is, the gettext programs really do expect that POTFILES.skip
> may contain distributed files that aren't translated.  If we're sure
> we don't want to use it for that then the reverse check is fine.

Well, then, perhaps that's not the filename we want to use...

> I think we wouldn't want generated files to marked for translation,
> even if they were distributed.  I don't know what we'd do if we wanted
> to generate a .c file that didn't match our ignore patterns.

Why does it matter?  Do we expect generated files to have strings
that appear to be marked for translation but really aren't?

[snip]
> I guess it boils down to "do we care about --maintain mode?"  If we
> do, we should include the distributed, non-translated files in
> POTFILES.skip.  If not, we might as well call it POTFILES.nodist and
> check for accidental distribution.  In that case, we're not really
> keeping a list of purposely non-translated files -- it's more a list
> of files that _happen_ to be non-translated by virtue of not being
> distributed.  Is that what we want?

I'm not sure we care about --maintain mode.  We certainly haven't ever
cared in the past.

So, yes, I think that what we want right now is a list of
files that happen to be non-translated by virtue of not being
distributed.

> -chris

-derek
--
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       [hidden email]                        PGP key available


_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Gnucash-changes] r13065 - gnucash/trunk - Fail 'make distcheck' if POTFILES.in contains undistributed files.

Christian Stimming
In reply to this post by Chris Shoemaker
Hi Chris,

thanks for implementing a solution to this dist/POTFILES problem.

Chris Shoemaker schrieb:
> In that case, we're not really
> keeping a list of purposely non-translated files -- it's more a list
> of files that _happen_ to be non-translated by virtue of not being
> distributed.  Is that what we want?

As Derek already said:  Yes, that is what we want.

And just to rehash the manual intervention that will be required by your
implemented solution: 1. In case one of the POTFILES.skip files is added
to dist later (e.g. apps_gnucash_dialog_scheduled_transctions.schemas.in
in particular), we will get an error message during make distcheck. 2.
In case other files from POTFILES.in gets removed from dist, we will get
an error message during make distcheck, too.

Does that mean everything is covered? The only other problem might arise
when a file that is currently being ignored by make-gnucash-potfiles
happen to include some translations and should not be ignored anymore.
In that case, the procedure might be as following: A translator
discovers an untranslated string during runtime. She will look into the
xx.po file to look for that string in order to add a translation. She
will discover it isn't there, even after "make pot" and manual msgmerge.
She will then grep through the source tree to find the file where this
string comes from, only to discover this file isn't listed in
POTFILES.in. Now: Is there an easy way to find out *why* a file wouldn't
be listed in POTFILES.in? Maybe the introductory comment at the top of
POTFILES.in should be adapted accordingly to answer precisely that
question (regexps in make-gnucash-potfiles plus POTFILES.skip). If that
is explained obviously enough then everything should be fine.

Christian
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Gnucash-changes] r13065 - gnucash/trunk - Fail 'make distcheck' if POTFILES.in contains undistributed files.

Derek Atkins
Christian Stimming <[hidden email]> writes:

> And just to rehash the manual intervention that will be required by your
> implemented solution: 1. In case one of the POTFILES.skip files is added
> to dist later (e.g. apps_gnucash_dialog_scheduled_transctions.schemas.in
> in particular), we will get an error message during make distcheck. 2.
> In case other files from POTFILES.in gets removed from dist, we will get
> an error message during make distcheck, too.

Yes, this is correct.

> Does that mean everything is covered?

I /think/ so..  The only thing we don't test is if a file is in the
dist but is not listed in POTFILES.{in,skip}...  But that case is okay
because we autogenerate POTFILES.in so the only files that wont be
there are the intentionally-ignored files.

>   The only other problem might arise
> when a file that is currently being ignored by make-gnucash-potfiles
> happen to include some translations and should not be ignored anymore.

Well, the only files intentionally ignored my m-g-potfiles are files
that match test, experimental, and gw-.  We don't care about those
directories for translation, so all should be fine.

> In that case, the procedure might be as following: A translator
> discovers an untranslated string during runtime. She will look into the
> xx.po file to look for that string in order to add a translation. She
> will discover it isn't there, even after "make pot" and manual msgmerge.
> She will then grep through the source tree to find the file where this
> string comes from, only to discover this file isn't listed in
> POTFILES.in. Now: Is there an easy way to find out *why* a file wouldn't
> be listed in POTFILES.in? Maybe the introductory comment at the top of
> POTFILES.in should be adapted accordingly to answer precisely that
> question (regexps in make-gnucash-potfiles plus POTFILES.skip). If that
> is explained obviously enough then everything should be fine.

I suppose we COULD do that, but I honestly don't think that's ever
going to be an issue unless something in "experimental" gets put into
real use.  We could put something at the top of POTFILES.skip?  Or put
something in the README.translation..  or....  I don't know.  I think
this is a relatively rare case.

> Christian

-derek

--
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       [hidden email]                        PGP key available
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel