After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 431502 - insufficient locale check in locale-specific tax reports
insufficient locale check in locale-specific tax reports
Status: VERIFIED INVALID
Product: GnuCash
Classification: Other
Component: General
git-master
Other All
: Normal normal
: ---
Assigned To: Chris Lyttle
Chris Lyttle
Depends on:
Blocks:
 
 
Reported: 2007-04-19 22:57 UTC by Frank H. Ellenberger
Modified: 2018-06-29 21:32 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Frank H. Ellenberger 2007-04-19 22:57:15 UTC
Please describe the problem:
http://lists.gnucash.org/logs/2007-04-19.html#T18:24:34
[00:24] <fell> ERROR: Unbound variable: gnc:txf-get-payer-name-source
[00:24] <warlord> fell: is there more to the scheme strack trace?
[00:24] <warlord> because that symbol is CLEARLY defined in the code.
[00:26] <warlord> that symbol gets used from src/gnome/dialog-tax-info.c
[00:26] <warlord> it COULD be a scheme environment issue.
[00:27] <fell> http://pastebin.ca/448871
[00:29] <fell> Is it right, it looks for ~/.gnucash/config-1.8.auto:7:15?
[00:30] <warlord> Oh, wait...
[00:30] <fell> 1.8 <> 2.x
[00:30] <warlord> You're in the DE domain -- why is it trying to load gnucash/tax/us?
[00:30] <hampton> backward compatibility
[00:31] <warlord> hampton: yeah, but look at src/tax/us/gncmod-tax-us.c
[00:31] <warlord> #ifdef LOCALE_SPECIFIC_TAX
[00:31] <warlord>   const char *thislocale = setlocale(LC_ALL, NULL);
[00:31] <warlord>   if (strncmp(thislocale, "de_DE", 5) == 0)
[00:31] <warlord>     return g_strdup("gnucash/tax/de_DE");
[00:31] <warlord>   else
[00:31] <warlord> #endif
[00:31] <warlord>     return g_strdup("gnucash/tax/us");
[00:31] <hampton> I was referring to the read of the config file
[00:31] <warlord> Oh.
[00:34] <warlord> anyways, something is broken in your system because something is trying to load the gnucash/tax/us module instead of the gnucash/tax/de_DE module.
[00:35] <warlord> Anyways, I gotta run to the pool.  back in about 1/5 hours.
[00:35] <warlord> 1.5
[00:35] *** warlord nennt sich jetzt warlord-afk.
[00:36] <fell> locale says: LANG=de_DE.UTF-8 ... LC_IDENTIFICATION="de_DE.UTF-8", but LC_ALL=
[00:37] <jsled> Ah, well there you go.
[00:37] <jsled> Testing LC_ALL is probably not the best thing to do; LANG or LANGUAGE.
[00:42] <fell> man:locale.1p: LC_ALL If set to a non-empty string value, override the values of all the other internationalization variables. 
[00:44] <jsled> As it is empty, though, we should probably fallback to looking at other vars, in some precedence order.
[00:44] <jsled> Can you please file a bug re: this?

Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Derek Atkins 2007-04-20 01:26:29 UTC
I cannot reproduce this issue on FC5 using current SVN trunk.  I.e., it works fine for me, the module loads, the report loads, the report runs.  SO..

This is either an FC v. SuSE issue, or a guile-1.6 v. guile-1.8 issue
Comment 2 Derek Atkins 2007-04-20 01:39:47 UTC
Actually, this bug is the same as bug #431510.  Or, rather, it's the same cause (the gnucash/tax/us module is requested instead of gnucash/tax/de_DE) but two different symptoms.

So, I'm closing this one because we don't need two reports from the same issue.

*** This bug has been marked as a duplicate of 431510 ***
Comment 3 Josh Sled 2007-04-20 03:49:48 UTC
No, this bug was for:

[00:37] <jsled> Testing LC_ALL is probably not the best thing to do; LANG or
LANGUAGE.

That is, testing the environment in order: LC_ALL, LANG, LANGUAGE, in the case that LC_ALL is not set.

Comment 4 Andreas Köhler 2007-04-20 06:05:09 UTC
From `man setlocale':

char *setlocale(int category, const char *locale);

The setlocale() function is used to set or query the program’s current locale.
If  locale is not NULL, the program’s current locale is modified according to the arguments.  The argument category determines which parts of the program’s current locale should be modified.
[...]
A  successful  call  to  setlocale() returns an opaque string that corresponds to the locale set.  This string may be allocated in static storage.  The string returned is such that a subsequent call with that string and its associated category will restore that part of the process’s locale.  The return value is NULL if the  request  cannot be honored.

===

This is not like g_getenv("LC_ALL"), and should do what we want, IMHO.
Closing as invalid.
Comment 5 John Ralls 2018-06-29 21:32:53 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=431502. Please update any external references or bookmarks.