mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-27 03:10:23 -06:00
449df116d8
Patch by Jeff Kletsky. (Cstim: Accepted even though string freeze is in effect because it was submitted before the freeze. Also, the string additions are very minor.) Summary of Changes: * Initial story related to providing default budget control * Add a "Budgeting" tab to the book-level preferences dialog * Add a "Default Budget" selector to the "Budgeting" tab * Modify gnc_budget_get_default() to * Respect the new KVP, if present * Fall back to 2.2.x behavior, if not present * Modify gnc:make-budget-option * Reformatted for readability with additional comments * Default is now "#f" so that selected value is always saved Otherwise, if selection happened to be the current default and the default was later changed, the report would change * getter, setter, and generate-restore-form all now consistent * setter now always takes a budget object * generate-restore-form does not rely on "hack" in setter that previously allowed either a budget object or a GUID string This is a different fix for 603215 -- see Known Issues * Provide translation support for "Trading Acccounts" (and "Budgeting") * Refactor #define names for consistency and extensibility * KVP_OPTION_PATH for consistency with Guile usage * OPTION_SECTION_blahblah * OPTION_NAME_blahblah * Modify qofbookslots.h to be "SWIG-aware" * Pick up qofbookslots.h in make-gnucash-potfiles.in and po/POTFILES.in Known Issues: * There is no selection (yet) for "Use default budget" so changing the default budget and reloading a report does not change the budget used * setter is no more robust to "bad" values than in previous code * Budget reports created with 2.3.x after r18528 (between 2.3.8 and 2.3.9) may not load or re-render as they relied on the setter taking either a budget object or a GUID as a string This should not impact any 2.2.x users as nothing was saved under 2.2.x related to the default budget. This can be resolved through removing the option restore code in ~/.gnucash/saved-reports-2.4 and, if affected reports were open, in ~/.gnucash/books/<name_of_book> * Budget reports prior to r18528 did not save budget selection (603215) git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19123 57a11ea4-9604-0410-9ed3-97b8803252fd
58 lines
1.8 KiB
Perl
58 lines
1.8 KiB
Perl
#!@-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@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 = `grep -v \# @-SRCDIR-@/po/POTFILES.skip`;
|
|
my @ignored_files = `grep -v \# @-SRCDIR-@/po/POTFILES.ignore`;
|
|
|
|
my @possible_files = `cd @-SRCDIR-@ && find src -name '*.c' -o -name '*.glade' \\
|
|
-o -name '*.desktop.in' -o -name '*.keys.in' \\
|
|
-o -name '*.schemas.in' |sort`;
|
|
## 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);
|
|
|
|
print $path . $name . "\n";
|
|
}
|
|
|
|
# These are also added, even though they are outside of src/
|
|
print "src/gnome/gnucash.desktop.in.in\n";
|
|
print "src/libqof/qof/gnc-date.c\n";
|
|
print "src/libqof/qof/qofbookslots.h\n";
|
|
print "intl-scm/guile-strings.c\n";
|
|
print "doc/tip_of_the_day.list.in\n";
|