gnucash unstable: Partially revert commit 85bfbd8e8258e
Geert Janssens
gjanssens at code.gnucash.org
Sat Jan 27 08:13:19 EST 2018
Updated via https://github.com/Gnucash/gnucash/commit/b6aae753 (commit)
from https://github.com/Gnucash/gnucash/commit/4fd52725 (commit)
commit b6aae753172eae1c4a8e01477512f944d8d4f9d1
Author: Geert Janssens <geert at kobaltwit.be>
Date: Sat Jan 27 14:11:01 2018 +0100
Partially revert commit 85bfbd8e8258e
make-gnucash-potfiles.in is still needed after all
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 92a4818..f355f32 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -766,7 +766,7 @@ SET(PACKAGE_PREFIX "${PACKAGE}-${PACKAGE_VERSION}")
SET(DIST_FILE "${PACKAGE_PREFIX}.tar")
SET(toplvl_DIST_local ${gnucash_DOCS}
- CMakeLists.txt README)
+ CMakeLists.txt make-gnucash-potfiles.in README)
SET_LOCAL_DIST(toplvl_DIST ${toplvl_DIST_local})
diff --git a/make-gnucash-potfiles.in b/make-gnucash-potfiles.in
new file mode 100644
index 0000000..feed1f5
--- /dev/null
+++ b/make-gnucash-potfiles.in
@@ -0,0 +1,83 @@
+#!@PERL@ -w
+# -*- perl -*-
+#
+# This perl script is used to make po/POTFILES.in, the list
+# of files to be searched for translatable strings.
+#
+# It will exclude any files listed in po/POTFILES.skip, po/POTFILES.ignore
+# or that match the regexp patterns listed in @ignorepatterns.
+#
+# Author: Dave Peticolas <dave at krondo.com>
+
+use strict;
+use File::Basename;
+
+# Note: These are perl regexp patterns, *not* normal shell wildcards!
+my @ignorepatterns = ('gw-', 'test', 'experimental', 'python-bindings', 'swig-.*\.c');
+my (@skipped_files, @ignored_files);
+open(IN, "< @SRCDIR@/po/POTFILES.skip");
+while (<IN>) {
+ push @skipped_files, $_ unless $_ =~ /^\#/;
+}
+close IN;
+open(IN, "< @SRCDIR@/po/POTFILES.ignore");
+while (<IN>) {
+ push @ignored_files, $_ unless $_ =~ /^\#/;
+}
+close IN;
+
+# Sort filenames in POTFILES.in in a consistent way
+# This reduces the amount of clutter in our version manangement system
+# The files will be sorted
+# * per directory
+# * case-insensitive
+# * ignoring punctuation (-,_,.)
+#
+# This sort function has been extracted into a separate file (util/elegant-sort.pl)
+# in order to use the same algorithm in both cmake and autools based builds
+
+my @possible_files = `cd @SRCDIR@ && \\
+ find bindings borrowed common libgnucash gnucash -name '*.c' \\
+ -o -name '*.cpp' -o -name '*.glade' \\
+ -o -name '*.desktop.in' -o -name '*.keys.in' \\
+ -o -name '*.gschema.xml.in.in' -o -name '*.scm' \\
+ | util/elegant-sort.pl`;
+## For perl files add the following:
+# -o -name '*.pl'
+
+print "# This is a list of files which contain translatable strings.\n";
+print "# This file was generated by ../make-gnucash-potfiles.\n";
+
+my %ignores;
+foreach my $file (@possible_files) {
+ chomp($file);
+ my ($name, $path) = fileparse($file);
+ $path =~ s/^\.\///;
+
+ foreach my $pat (@ignorepatterns, @skipped_files, @ignored_files) {
+ chomp($pat);
+ next unless $pat;
+
+ if ($file =~ m/$pat/ || $name =~ m/$pat/ || $path =~ m/$pat/) {
+ $ignores{$path . $name} = 1;
+ }
+ }
+ next if $ignores{$path . $name};
+
+ # Ignore unreadable files, e.g. dangling symlinks
+ next unless (-r "@SRCDIR@/" . $path . $name);
+
+ # Force parse type for gsettings files
+ my $type = "";
+ if ($file =~ m/.gschema.xml.in.in/ ){
+ $type = "[type: gettext/gsettings]";
+ }
+
+ print $type . $path . $name . "\n";
+}
+
+# These are manually added, because they're not picked up by the generation script
+print "gnucash/gnome/gnucash.appdata.xml.in\n";
+print "gnucash/gnome/gnucash.desktop.in.in\n";
+print "libgnucash/engine/qofbookslots.h\n";
+print "doc/tip_of_the_day.list.in\n";
Summary of changes:
CMakeLists.txt | 2 +-
make-gnucash-potfiles.in | 83 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 84 insertions(+), 1 deletion(-)
create mode 100644 make-gnucash-potfiles.in
More information about the gnucash-changes
mailing list