UK company VAT account structure, updated

Vincent V vincentv at dsl.pipex.com
Fri Jul 25 12:27:28 CDT 2003


Ah, yes. I like the idea of an override structure. Now I'm ignorant of 
the conventions used in the 'translation', so bear with me a minute, but 
how would this approach fit in

Directory         Contents
en                     Common files in english (local language) (default)
fr                     Common files in french (local language)
de                     Common files in german (local language)
etc

en_CA            Canadian (english) laocale files
en_UK            UK laocale files
en_US            US laocale files
fr_CA            Canadian (french) locale files
etc

with an override structure like

en <--- local language <-------- locale

or if C needs to be present then the default files go into that and the 
'en' directory will contain xea files that are only relevant and common 
to english speaking countries (if there are any such files)
C <--- local language <-------- locale

So Selected Files For Display are:
1) All locale files
2) plus All local language files not already selected
3) plus All en (or C) files not aready selected

It doesn't matter if en is also the local language, the files won't be 
selected twice

This makes it relativley easy for someone to translate some of the 
default accounts into, say, Spanish and simply place them into the 
Spanish local language directory (es?), then all Spanish speaking users 
will see those files no matter what locale they are in. Any default 
accounts which have not been translated will still appear in English.

I'm quite happy to take a look at the code, in principle any 'override' 
scheme should be quite straightforward to implement.
My only concern (from experience) is the amount of time that it will 
take to get to grips with GNUcash in general - I also gather that the 
knowledge required to compile GNUcash with all its interdependencies 
would form a major part of a PHD thesis! :) Like most contributors in 
the Open Source community I have to earn a crust as well, and starting a 
new busisness doesn't leave a lot of spare time.

But if this code section is in a nice separately compilable / testable 
module and someone can point me in the right direction to find it then 
thats fine - go for it!

Vince


Derek Atkins wrote:

>No, it only shows the ones in the locale directory (because
>technically you're supposed to "translate" all of them).  I suppose,
>theoretically, it could use the locale to "override" the Common
>accounts, in order words:
>
> 1) If it exists only in locale, use locale
> 2) If it exists only in C, use C
> 3) If it exists in both locale and C, use locale
>
>I do not know how hard it would be to do this.  Care to take a look?
>
>-derek
>
>Vincent V <vincentv at dsl.pipex.com> writes:
>
>  
>
>>That's spooky, it all works now!
>>
>>I already had a en_GB directory but when I moved the last version of
>>my xea file into it the druid found it. Perhaps there was a bug in my
>>structure that the second copy fixed! So I have sent the file off to
>>gnucash-patches.
>>
>>But then I noticed that not all the locale directories had hyphenated
>>names, there was a C and a da and an sk. So I tried renaming the en_GB
>>directory to GB. Now the druid displayed all the basic account
>>structures that I had seen the first time that I had run GNUcash. So C
>>must be Common accounts and not Canada as I had mistakenly thought
>>(that would be en_CA of course). But that means that anyone who has a
>>locale with an associated directory will only ever see the contents of
>>that directory and not the common ones. So a new user with an en_GB
>>locale will only ever see my VAT accounts - which is probably not what
>>most users want! Surely the druid should show both the common and
>>locale directory of the user?
>>
>>Vince
>>
>>
>>
>>Derek Atkins wrote:
>>
>>    
>>
>>>>The trouble is that I can't test it; when I start the 'new file' druid
>>>>it doesn't show any accounts files at all - just a blank selection. If
>>>>I try to load any xea file manually - using file:open - I get an error
>>>>message saying that the file was created usng a later version of
>>>>gnucash than mine (even the file I just created) and I should
>>>>upgrade. Actually I suppose it has a point, the xml code does clearly
>>>>say <gnc:account version="2.0.0"> adnI'm running 1.8.1
>>>>
>>>>        
>>>>
>>>Yea, you need to add the file to accounts/<locale>/ and get it to install
>>>properly (or you can just hand-install it into the runtime tree).  I think
>>>it goes into <prefix>/share/accounts/<locale>/
>>>
>>>-derek
>>>
>>>
>>>      
>>>
>
>  
>



More information about the gnucash-user mailing list