[freeside-devel] International issues
Mathieu Dimanche
mdimanche at free.fr
Thu Sep 13 05:48:06 PDT 2007
Hi everyone
First things first, let me introduce myself. I'm a french developper
currently trying to find if freeside is the right tool I need to improve
to have my current phone-business customers happy with a great solution
to deal with their customers. As far as I've looked, freeside is really
well thinked and just needs a few updates for me (and them) to use it
flawlessly.
I'm "specialised" in PHP and straight C++, have a solid linux
background, and am fairly accustomed to databases. I haven't ever coded
perl in my life, but I believe it isn't a big deal since in 2 hours, I
already coded modifications. Once you know how to code, syntax is the
only thing you need to learn with a new language.
So, then, coming to the facts :
The main fact that disturbes me is that you guys (most of you I believe)
are using the english language and the dollar currency, which bring some
troubles for an european business to jump blindlessly in your vision of
the tool. The 2 biggest problems I can see are :
1/ Database in us_ascii instead of UTF8, denying us the use of special
characters (ie. accents in french, cyrillic alphabet, and so on). As an
exemple, something like 40% of the french first-names do have at least
an accent in them.
2/ For you, it is well assumed that a currency is written in a "$
XXXXXX.XX" format, which is really not the case with other currencies
(Euro is written "XXX XXX XXX,XX €"
To try to solve (1), I created the postgres base in utf8 but had
problems in the initial creation of the tables. To be more precise, it
was during the import of the locales (country names I suspect), but I
didn't go any further with this as I could imagine plenty of problems
would arise :
* it requires to have all the html interface in UTF8 as well
* interaction with Perl templates and Tex templates should all be UTF8
Did anyone try to do something about that or has ideas on a roadmap or
something ?
To try to solve (2), I made a little test, simply adding a new
configuration value named "money_char_position" (select left|right) only
used in the FS::cust_bill::print_latex() function and it seems to work
well, but I'm not that pleased about the whole process.
There seems to be a good class to use everywhere, the Math::Currency
class on cpan [1]. Encapsulating it in say a FS::Price object to
automaticaly deal with our configuration variables could be nice. Also,
it could be used everywhere a price is written (HTML interface, Perl
Text Template, Tex templates, emails, and so on.) :
* FS::Price::getHTMLString()
* FS::Price::getTEXString()
Would someone object I try to code that kind of functionnality ?
Of course, having that would deprecate the "money_char" variable, but
then, it's only useful in the html interface.
Also, as I remember, the default tex invoice template (and
FS::cust_bill::print_latex() function as well) seem to rely on a Tex
"/dollar" which should be renamed to a "/currencysymbol".
I also have a huge list of ideas of further improvements but haven't
tried to investigate further for now.
And a last question... what is your policy about patches ? Do you prefer
the "patch first, talk later" approch (as many OSS do) or the "please
discuss and explain everything, and THEN code" ? ;)
Mathieu
[1]
http://search.cpan.org/~jpeacock/Math-Currency-0.4502/lib/Math/Currency.pm
More information about the freeside-devel
mailing list