In the mainwindow account balaces are displayed with the currency symbol
($ for USD, Fr. for CHF etc.) in front of them. The bug here is that
whether it's a "foreign" currency or not, it's allways the same symbol
that's displayed. This symbol is ultimatively fetched through 
localconv() and for that reason doesn't care about what currency the
account is in but only about the locales settings:


export LC_ALL=; export LANG=C

Displays in gnucash:

account name    currency        balance
---------------------------------------
usbank          USD             $1000
swissbank       CHF             $2000



export LC_ALL=de_CH; export LANG=de_CH; export LINGUAS=de_CH

Display in gnucash:

account name    currency        display
---------------------------------------
usbank          USD             Fr.1000
swissbank       CHF             Fr.2000


As far as I can see, this is nonsense. I'd suggest to drop completely
displaying the curreny in the balance since there already -is- a field
"currency" in place to do exactly this. That would be the simplest correct
solution, but unfortunately one would loose this pretty "localised"
balance.

So to get it --really-- right one would have to either, extend some of the
tables containing the currency names with the correct symbol:

raw/country.sql ->
        INSERT INTO countries
        (country,  countrycode, currencycode, currencysymbol)
        VALUES
        ('United States of America', 'US', 'USD', '$') 
        \g

or

raw/currencynames ->
        shortname  ("USD", "$US", "$"); 
        longname  ("USD", "US Dollars"); 


(I don't know which yet...), or use the locales in some ->really tricky<-
way to get the right symbol out of it:

getsymbol = f(localeconv, shortname[1])

Another problem with the second solution is, that the routines dealing
with the balance:

xaccPrintAmount()
xaccSPrintAmount()
gnc_localeconv()

don't give a frogs eye about their context, so that would be additional 
trouble, to carry the correct context through all of them.

I'm ready to try to figure out a patch. Any opinions?
*t

----------------------------------------------------------------------------
             Tomas Pospisek - Freelance: Linuxing, Networking
                       http://spin.ch/~tpo/freelance
----------------------------------------------------------------------------


--
Gnucash Developer's List 
To unsubscribe send empty email to: [EMAIL PROTECTED]


Reply via email to