mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
More German tax work.
2005-01-16 Christian Stimming <stimming@tuhh.de> * src/app-utils/gnc-ui-util.c: Modify tax option code to load tax-de_DE module in the appropriate locale. * src/report/locale-specific/us/gncmod-locale-reports-us.c, de_DE.scm: Add scheme module for locale-report/us resp. locale-report/de_DE again because it seems to be required. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10417 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
9229455325
commit
ef435bc0ac
@ -1,3 +1,12 @@
|
||||
2005-01-16 Christian Stimming <stimming@tuhh.de>
|
||||
|
||||
* src/app-utils/gnc-ui-util.c: Modify tax option code to load
|
||||
tax-de_DE module in the appropriate locale.
|
||||
|
||||
* src/report/locale-specific/us/gncmod-locale-reports-us.c,
|
||||
de_DE.scm: Add scheme module for locale-report/us
|
||||
resp. locale-report/de_DE again because it seems to be required.
|
||||
|
||||
2005-01-15 Derek Atkins <derek@ihtfp.com>
|
||||
|
||||
* Neil William's patch to remove static mergeData context.
|
||||
|
@ -447,8 +447,17 @@ gnc_ui_account_get_tax_info_string (Account *account)
|
||||
if (get_form == SCM_UNDEFINED)
|
||||
{
|
||||
GNCModule module;
|
||||
/* load the tax info */
|
||||
const char *thislocale = setlocale(LC_ALL, NULL);
|
||||
/* This is a very simple hack that loads the (new, special) German
|
||||
tax definition file in a German locale, or (default) loads the
|
||||
previous US tax file. */
|
||||
gboolean is_de_DE = (strncmp(thislocale, "de_DE", 5) == 0);
|
||||
const char *tax_module = is_de_DE ?
|
||||
"gnucash/tax/de_DE" :
|
||||
"gnucash/tax/us";
|
||||
|
||||
module = gnc_module_load ("gnucash/tax/us", 0);
|
||||
module = gnc_module_load ((char *)tax_module, 0);
|
||||
|
||||
g_return_val_if_fail (module, NULL);
|
||||
|
||||
|
@ -38,8 +38,8 @@ endif
|
||||
noinst_DATA = .scm-links
|
||||
|
||||
## This is unused and therefore no longer installed and/or loaded
|
||||
# gncscmmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash/report/locale-specific
|
||||
# gncscmmod_DATA = us.scm
|
||||
gncscmmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash/report/locale-specific
|
||||
gncscmmod_DATA = us.scm de_DE.scm
|
||||
|
||||
gncscmothermoddir = ${GNC_SHAREDIR}/guile-modules/gnucash/report/
|
||||
gncscmothermod_DATA = taxtxf.scm taxtxf-de_DE.scm
|
||||
|
3
src/report/locale-specific/us/de_DE.scm
Normal file
3
src/report/locale-specific/us/de_DE.scm
Normal file
@ -0,0 +1,3 @@
|
||||
; This is unused and therefore no longer installed and/or loaded
|
||||
(define-module (gnucash report locale-specific de_DE))
|
||||
(use-modules (gnucash report taxtxf-de_DE))
|
@ -33,11 +33,11 @@ int libgncmod_locale_reports_us_LTX_gnc_module_end(int refcount);
|
||||
|
||||
char *
|
||||
libgncmod_locale_reports_us_LTX_gnc_module_path(void) {
|
||||
const char *thislocale = setlocale(LC_ALL, NULL);
|
||||
/* const char *thislocale = setlocale(LC_ALL, NULL);
|
||||
if (strncmp(thislocale, "de_DE", 5) == 0)
|
||||
return g_strdup("gnucash/report/locale-specific/de_DE");
|
||||
else
|
||||
return g_strdup("gnucash/report/locale-specific/us");
|
||||
else */
|
||||
return g_strdup("gnucash/report/locale-specific/us");
|
||||
}
|
||||
|
||||
char *
|
||||
@ -59,6 +59,9 @@ libgncmod_locale_reports_us_LTX_gnc_module_init(int refcount) {
|
||||
const char *report_taxtxf = is_de_DE ?
|
||||
"(use-modules (gnucash report taxtxf-de_DE))" :
|
||||
"(use-modules (gnucash report taxtxf))";
|
||||
const char *report_locale = is_de_DE ?
|
||||
"(use-modules (gnucash report locale-specific de_DE))" :
|
||||
"(use-modules (gnucash report locale-specific us))";
|
||||
|
||||
/* The gchar* cast is only because the function declaration expects
|
||||
a non-const string -- probably an api error. */
|
||||
@ -78,12 +81,11 @@ libgncmod_locale_reports_us_LTX_gnc_module_init(int refcount) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* This is unused and therefore no longer installed and/or loaded */
|
||||
/*
|
||||
if(scm_c_eval_string("(use-modules (gnucash report locale-specific us))")
|
||||
/* Load the module scheme code */
|
||||
if(gh_eval_str(report_locale)
|
||||
== SCM_BOOL_F) {
|
||||
return FALSE;
|
||||
}*/
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -51,7 +51,7 @@
|
||||
(require 'printf)
|
||||
|
||||
(use-modules (gnucash gnc-module))
|
||||
(gnc:module-load "gnucash/tax/us" 0)
|
||||
(gnc:module-load "gnucash/tax/de_DE" 0)
|
||||
(gnc:module-load "gnucash/report/report-system" 0)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user