GNOME Bugzilla – Bug 626001
make NumberToWord translatable or at least the result edible
Last modified: 2018-06-29 22:42:30 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
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.
*** Bug 750133 has been marked as a duplicate of this bug. ***
feron.ahom attached https://bug750133.bugzilla-attachments.gnome.org/attachment.cgi?id=307728 - impression de cheque en langues europeenne
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.
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.