Number to Words and licencing

Thomas Troesch ttroesch at gmail.com
Mon Nov 4 12:58:26 EST 2013


On Sun, Nov 3, 2013 at 8:54 PM, John Ralls <jralls at ceridwen.fremont.ca.us>wrote:

>
>
> Anyway, the question isn't what's the right way to write out the amount in
> words for each language, the question is whether the Wikipedia article
> cited earlier in the thread is correct that checks are used only in the US,
> UK, and Canada. If that's so, we don't need to localize it at all.
>
>
> I didn't get from the article that checks are only used in three places.
When I read from http://en.wikipedia.org/wiki/Cheque

"In Finland, banks stopped issuing personal cheques in about 1993 in favour
of giro systems, which are now almost exclusively electronically initiated
either via internet banking or payment machines located at banks and
shopping malls" and "In most European countries, cheques are now rarely
used, even for third party payments" and "About 70 billion cheques were
written annually in the US by 2001"

I get the sense that international check usage ranges from non-existent, to
rare and being replaced by electronic banking systems, to very important.

It seems to me that the words for printing checks are not simply language
dependent, but also depend on the political/banking system jurisdiction.
 Gnucash currently has a check printing rule based on a Canadian
requirement ( date format ), and it has nothing to do with the language
being English or French.  I can see from the web that Mexico requires all
spellouts to be in capital letters.  I have no idea if this rule applies to
Costa Rica, or example.

It might be helpful to copy a comment from gnc-ui-util.c starting at line
1599:

/* This function is basically untranslatable. I'd
   guess out of the 29 translations we have, 20 will have their number
   wordings in a totally different way than English has (not to
   mention gender-dependent number endings). Which means this
   word-by-word translation will be useless or even plain
   wrong. For this reason, we don't even start to pretend a
   word-by-word translation would be of any use, so we don't mark any
   of these strings for translation. cstim, 2007-04-15. */

As best I can tell, the only time Gnucash spells out numbers as words is in
the context of printing checks.  So the function we have now is really
number_to_english_words_for_checks.

Looking at the ICU number spellout rules that they provide, none of them
are suitable for printing checks.  For example ICU provides 11.04 -> eleven
point zero four, but what is needed ( and gnucash currently does ) is 11.04
-> eleven and 04/100.

The only reason I brought up ICU was that I thought it might work and would
be easy to do.  Now I see it as being difficult, not worth it if only for
the narrow intended purpose, and would cause too much trouble for volunteer
translators to develop rule sets that have very strict syntax requirements.

Sorry for my rambling.  My intuition tells me that something like the
following may be suitable for now:
1. Write plug-ins for number-to-check-words function for each language.
2. Develop a testing program so the function can be tested independently.
2. Load plug-ins based on locale setting if available.
3. Default to current function if locale based plug-in is not available.

This would require a collaboration between a translator and a programmer.
 It may be awkward, but would at least provide an orderly way forward for
people that are sufficiently motivated to get the function.  And hopefully
locale is sufficient for mapping to the correct function.

>
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>


More information about the gnucash-devel mailing list