Found some bug in Thai again :)

Bug #1074639 reported by Tantai Thanakanok
18
This bug affects 4 people
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_th_TH.py.orig 2010-11-03 18:17:04.000000000 +0700
+++ 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ร้อยล้านล้านล้าน$2
-(\d)(\d{21}) $1พันล้านล้านล้าน$2
-(\d)(\d{22}) $1หมื่นล้านล้านล้าน$2
-(\d)(\d{23}) $1แสนล้านล้านล้าน$2
-(\d)(\d{24}) $1ล้านล้านล้านล้าน$2
+(\d+)(\d{6}) $1ล้าน$2

 # negative numbers

thanks

Revision history for this message
Tantai Thanakanok (leknarm) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.