Found some bug in Thai again :)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
NUMBERTEXT |
New
|
Undecided
|
Unassigned |
Bug Description
Hi.
I found some bug in Thai when i type a number more than million. It's replace the word "ล้าน" in every number more than million.
Example
1,351,000,000
It display : หนึ่งพั
It should be : หนึ่งพั
So, I make a patch to fix this.
--- numbertext_
+++ numbertext_th_TH.py 2012-11-03 19:34:40.000000000 +0700
@@ -1,9 +1,10 @@
-# -*- encoding: UTF-8 -*-
+# -*- encoding: UTF-8 -*-
ur"""
__numbertext__
^0 ศูนย์
^1 หนึ่ง
-1 เอ็ด
+1$ เอ็ด
+1 หนึ่ง
2 สอง
3 สาม
4 สี่
@@ -19,25 +20,7 @@ __numbertext__
(\d)(\d{3}) $1พัน$2
(\d)(\d{4}) $1หมื่น$2
(\d)(\d{5}) $1แสน$2
-(\d)(\d{6}) $1ล้าน$2
-(\d\d)(\d{6}) $1ล้าน$2
-(\d)(\d{8}) $1ร้อยล้าน$2
-(\d)(\d{9}) $1พันล้าน$2
-(\d)(\d{10}) $1หมื่นล้าน$2
-(\d)(\d{11}) $1แสนล้าน$2
-(\d)(\d{12}) $1ล้านล้าน$2
-(\d\d)(\d{12}) $1ล้านล้าน$2
-(\d)(\d{14}) $1ร้อยล้านล้าน$2
-(\d)(\d{15}) $1พันล้านล้าน$2
-(\d)(\d{16}) $1หมื่นล้านล้าน$2
-(\d)(\d{17}) $1แสนล้านล้าน$2
-(\d)(\d{18}) $1ล้านล้านล้าน$2
-(\d\d)(\d{18}) $1ล้านล้านล้าน$2
-(\d)(\d{20}) $1ร้อยล้
-(\d)(\d{21}) $1พันล้านล้านล้าน$2
-(\d)(\d{22}) $1หมื่นล้
-(\d)(\d{23}) $1แสนล้านล้านล้าน$2
-(\d)(\d{24}) $1ล้านล้
+(\d+)(\d{6}) $1ล้าน$2
# negative numbers
thanks