Re: gnucash master: Multiple changes pushed

2014-08-08 Thread Aaron Laws
Jralls,

Thanks, these will be very helpful! I'm sure I wouldn't have come up with
that perl replacement for grep.


In Christ,
Aaron Laws


On Fri, Aug 8, 2014 at 6:15 PM, John Ralls  wrote:

> Updated  via  https://github.com/Gnucash/gnucash/commit/e25c2a34 (commit)
>  via  https://github.com/Gnucash/gnucash/commit/063b9c57 (commit)
>  via  https://github.com/Gnucash/gnucash/commit/10cd33f9 (commit)
>  via  https://github.com/Gnucash/gnucash/commit/0ddd9db0 (commit)
> from  https://github.com/Gnucash/gnucash/commit/367b608f (commit)
>
>
>
> commit e25c2a34b9e9995936010d5577aa588165d1a61c
> Author: John Ralls 
> Date:   Fri Aug 8 15:15:23 2014 -0700
>
> POTFILES.in resulting from previous make-gnucash-potfiles changes.
>
> commit 063b9c57f4ed9cfe9edb8150c1161ac479003174
> Author: John Ralls 
> Date:   Fri Aug 8 13:43:43 2014 -0700
>
> Remove a bunch of no-longer-existing files from POTFILES.skip.
>
> commit 10cd33f9f584f74fe2c2ac1a827d3c8c4ac06d09
> Author: John Ralls 
> Date:   Fri Aug 8 13:37:38 2014 -0700
>
> Add *.cpp to the search pattern for files to translate.
>
> Exclude the files in src/gnc and src/optional/gtkmm; they shouldn't
> have
> any user-visible strings.
>
> commit 0ddd9db0a213ef24186df4353aa6ae9fd26d6939
> Author: John Ralls 
> Date:   Fri Aug 8 13:31:29 2014 -0700
>
> Use perl instead of grep to scan POTFILES.ignore and POTFILES.skip
>
> No point in shelling out of perl to do what perl does best; besides,
> grep
> has environment settings that can break our parsing of the result.
>
>
>
> Summary of changes:
>  make-gnucash-potfiles.in | 19 +++
>  po/POTFILES.in   | 22 +-
>  po/POTFILES.skip | 21 +
>  3 files changed, 41 insertions(+), 21 deletions(-)
>
> ___
> gnucash-patches mailing list
> gnucash-patc...@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-patches
>
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: make-gnucash-potfiles

2014-08-08 Thread John Ralls

On Aug 7, 2014, at 1:45 PM, John Ralls  wrote:

> 
> On Aug 7, 2014, at 10:37 AM, Aaron Laws  wrote:
> 
>> I have GREP_OPTIONS="--color=always -n --directories=skip", so when I run
>> make distcheck, it fails. make-gnucash-potfiles is expecting grep to *not*
>> put out line numbers nor colors. If the response to this is "don't do
>> that", then you can stop reading. However, if we're wanting this script to
>> run reliably in the face of a customized environment, the following patch
>> works:
>> 
>> 
>> From 0a150b770f895df9420bd5133bc8ba3960580a28 Mon Sep 17 00:00:00 2001
>> From: lmat 
>> Date: Thu, 7 Aug 2014 13:35:17 -0400
>> Subject: [PATCH] make-gnucash-potfiles is now more reliable
>> 
>> make-gnucash-potfiles relies on certain behaviour from grep. This patch
>> helps ensure that grep behaves in the way we expect.
>> ---
>> Makefile.am | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/Makefile.am b/Makefile.am
>> index 35f4771..4a2e285 100644
>> --- a/Makefile.am
>> +++ b/Makefile.am
>> @@ -185,7 +185,7 @@ pot: Makefile po/POTFILES.in
>> 
>> 
>> $(srcdir)/po/POTFILES.in: make-gnucash-potfiles .potfiles
>> -if test -w $(srcdir)/po/POTFILES.in ; then ./make-gnucash-potfiles >
>> $(srcdir)/po/POTFILES.in ; fi
>> +if test -w $(srcdir)/po/POTFILES.in ; then GREP_OPTIONS="-o
>> --color=auto" ./make-gnucash-potfiles > $(srcdir)/po/POTFILES.in ; fi
>> 
>> # Creation rules so that po/gnucash.pot can always be created for
>> # make dist.
>> -- 
>> 1.9.1
>> 
>> 
>> 
>> 
>> It's also possible to similarly patch make-gnucash-potfiles itself. If
>> that's desired, I'll be happy to come up with a patch like that.
> 
> Please stop sending patches to the list. It seems silly to create a branch on 
> your Github repo for something small like this, so use Bugzilla. You don’t 
> even need to post anything here; all of the active devs get bug mail.
> 
> Aside from that, what happens if instead of setting GREP_OPTIONS to “-o 
> —color=auto" you unset it entirely?
> 
> I do think that it would be better to modify make-gnucash-potfiles.in 
> directly to not use grep. Shelling out to run grep on a file from perl is 
> pretty perverse. At the same time the script can be improved so that it 
> doesn’t keep changing the order of files and so generating extraneous change 
> sets.
> 

I’ve pushed a set of changes which moves the scanning of POTFILES.ignore and 
POTFILES.skip to perl code inside make-gnucash-potfiles; that should resolve 
any grep environment problems.

I also added a search for .cpp files and excluded the directories src/gnc and 
src/optional/gtkmm; those contain C++ shim helpers for CuteCash and shouldn’t 
have any translatable strings in them.

Regards,
John Ralls



___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel