ERPNext Conference 2019* ERPNext.com Blog

Turkish language introduced to savoirfairelinux/num2words


#1

Turkish language to read numbers to words has recently been introduced to savoirfairelinux/num2words. Will somebody include this to frappe/num2words. The frappe fork is way behind.

Turkish language is required for my implementation and sales opportunities.

If frappe fork is discontinued or unsupported, I can make another integration for the community on another package.


#2

Dears,
anyone able to include this in the new version?

If we have contributed to the wrong package, please let us know which one to contribute so that we will get InWords in Turkish language.

Thank you.


#3

Does anyone have any clue why the num2words used by Frappe Utils do not translate the Turkish language? The money_in_words and in_words implementations just simply do not get it!

How do you expect any Turkish customer to use ErpNext while this is not working?


#4

Don’t forget with open source concerned users have the option to troubleshoot and fix this themselves. That is what community is about!


#5

Other ideas - if this is not the problem

See test_utils.py and write a test to replicate the problem

frappe@ubuntu:~/frappe-bench$ find . -name '*.py' | xargs grep money_in_words
./apps/erpnext/erpnext/controllers/buying_controller.py:		from frappe.utils import money_in_words
./apps/erpnext/erpnext/controllers/buying_controller.py:			self.base_in_words = money_in_words(amount, self.company_currency)
./apps/erpnext/erpnext/controllers/buying_controller.py:			self.in_words = money_in_words(amount, self.currency)
./apps/erpnext/erpnext/controllers/selling_controller.py:		from frappe.utils import money_in_words
./apps/erpnext/erpnext/controllers/selling_controller.py:			self.base_in_words = money_in_words(base_amount, self.company_currency)
./apps/erpnext/erpnext/controllers/selling_controller.py:			self.in_words = money_in_words(amount, self.currency)
./apps/erpnext/erpnext/patches/v5_0/recalculate_total_amount_in_jv.py:from frappe.utils import money_in_words
./apps/erpnext/erpnext/patches/v5_0/recalculate_total_amount_in_jv.py:					total_amount_in_words = money_in_words(total_amount, company_currency.get(je_doc.company))
./apps/erpnext/erpnext/education/doctype/fees/fees.py:from frappe.utils import money_in_words
./apps/erpnext/erpnext/education/doctype/fees/fees.py:		self.grand_total_in_words = money_in_words(self.grand_total)
./apps/erpnext/erpnext/education/doctype/fee_schedule/fee_schedule.py:from frappe.utils import money_in_words
./apps/erpnext/erpnext/education/doctype/fee_schedule/fee_schedule.py:		self.grand_total_in_words = money_in_words(self.grand_total)
./apps/erpnext/erpnext/accounts/doctype/journal_entry/journal_entry.py:		from frappe.utils import money_in_words
./apps/erpnext/erpnext/accounts/doctype/journal_entry/journal_entry.py:		self.total_amount_in_words = money_in_words(amt, currency)
./apps/erpnext/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.py:				{{frappe.utils.money_in_words(doc.base_paid_amount or doc.base_received_amount)}}
./apps/erpnext/erpnext/hr/doctype/salary_slip/salary_slip.py:from frappe.utils import add_days, cint, cstr, flt, getdate, rounded, date_diff, money_in_words
./apps/erpnext/erpnext/hr/doctype/salary_slip/salary_slip.py:		self.total_in_words = money_in_words(self.rounded_total, company_currency)
./apps/frappe/frappe/utils/data.py:def money_in_words(number, main_currency = None, fraction_currency=None):
./apps/frappe/frappe/tests/test_utils.py:from frappe.utils import evaluate_filters, money_in_words, scrub_urls, get_url
./apps/frappe/frappe/tests/test_utils.py:	def test_money_in_words(self):
./apps/frappe/frappe/tests/test_utils.py:				money_in_words(num[0], "BHD"), num[1], "{0} is not the same as {1}".
./apps/frappe/frappe/tests/test_utils.py:					format(money_in_words(num[0], "BHD"), num[1])
./apps/frappe/frappe/tests/test_utils.py:				money_in_words(num[0], "NGN"), num[1], "{0} is not the same as {1}".
./apps/frappe/frappe/tests/test_utils.py:					format(money_in_words(num[0], "NGN"), num[1])

#6

Having forked the project and gone through the code, I think that is because of bad coding. Not sure where the currency is received from while using the function but looks like being defaulted always to EN somehow.

No chances for a Turkish expansion if that is not solved even though I am using in my company as the main system for two and a half years already. I do not need the Turkish as I produce invoice in a different way but all accounting is done in ErpNext. I have also implemented the Turkish salary calculation but we stand no chance now.


#7

Dears,
would increasing the version requirement for the relevant package work?


#8

A few screenshots would help focus and illustrate the problem context such as this case here Can't translate Department, Leave Type, Employment Types etc

If this issue has been reported on github post a link here?