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 626001 - make NumberToWord translatable or at least the result edible
make NumberToWord translatable or at least the result edible
Status: RESOLVED OBSOLETE
Product: GnuCash
Classification: Other
Component: Check Printing
unspecified
Other All
: Normal enhancement
: ---
Assigned To: gnucash-reports-maint
gnucash-reports-maint
: 750133 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-08-04 06:38 UTC by sv12en
Modified: 2018-06-29 22:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description sv12en 2010-08-04 06:38:33 UTC
Hi,

I trying to configure GnuCash to work with a spanish (es_es) locale.
When I use the cheque printing feature the text of the amount is not translated.
Half my cheque ends up in Spanish and the other in English.

Also tried with fr_fr and it did not work.

Could you please point me towards the source file of the mechanism that handles the translation?
Could you also tell me which file to write the translation in?

Or else could you help me fix this?

This bug renders the cheque printing feature useless to people of other locales other than English.


Thank you for your time,


Sven
Comment 1 Frank H. Ellenberger 2010-08-04 23:40:05 UTC
Thanks for your report. 

The current state can be seen in src/app-utils/gnc-ui-util.c line 1728ff:

xaccPrintAmount (gnc_numeric val, GNCPrintAmountInfo info)
:
/* 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. */

It is really not trivial, IIRC for 80 fr_FR would spell 4*20, where fr_BE would spell 8*10, so one language has two different spellings for one number.

India and neighbors use lakh and crore - 10^5, 10^7 instead of 10^6, 10^9.

But I could imagine, there is somewhere a GPL'ed library, which offers the required functionality. If somebody knows one, let us know.

At least we should non-english users offer the opportunity to edit the - word by word translated or untranslated - string, because otherwise cheque printing is of no use for them.
Comment 2 Geert Janssens 2015-05-30 10:55:09 UTC
*** Bug 750133 has been marked as a duplicate of this bug. ***
Comment 3 Frank H. Ellenberger 2015-11-12 12:56:42 UTC
feron.ahom attached https://bug750133.bugzilla-attachments.gnome.org/attachment.cgi?id=307728 - impression de cheque en langues europeenne
Comment 4 John Ralls 2015-11-13 17:32:45 UTC
ICU provides a "Rule-based Number Format", http://icu-project.org/apiref/icu4j/com/ibm/icu/text/RuleBasedNumberFormat.html. That, or a private implementation of a similar approach, is likely the only maintainable solution to this bug. Our dependence on WebKit means that we already depend on ICU, albeit indirectly.

That said, is this really that relevant in the 21st century? Paper checks are largely deprecated already. They may well be gone completely in another 10 years.
Comment 5 John Ralls 2018-06-29 22:42:30 UTC
GnuCash bug tracking has moved to a new Bugzilla host. The new URL for this bug is https://bugs.gnucash.org/show_bug.cgi?id=626001. Please continue processing the bug there and please update any external references or bookmarks.