i18n bug regarding Arabic-Indic numbers needinfo.

Diego Iastrubni elcuco at kdemail.net
Sun Apr 25 00:01:57 BST 2004


ביום ראשון, 25 באפריל 2004, 01:26, נכתב על ידי Thiago Macieira:
> If/when that day comes, I'll let you worry then.
until then hopefully this patch is good to go (did I get it right? I don't 
have a modem here to test):

Index: connect.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kppp/connect.cpp,v
retrieving revision 1.169.2.1
diff -u -r1.169.2.1 connect.cpp
--- connect.cpp 11 Apr 2004 09:10:21 -0000      1.169.2.1
+++ connect.cpp 24 Apr 2004 23:00:43 -0000
@@ -374,14 +374,29 @@

       QStringList &plist = gpppdata.phonenumbers();
       QString bmarg= gpppdata.dialPrefix();
-      bmarg += *plist.at(dialnumber);
+
+      /*
+       * pppd cannot handle number Indic and Bengali digits
+       * need to transform them to Arab digits
+       */
+      QString numberToDial = *plist.at(dialnumber);
+       for (unsigned int i=0; i<numberToDial.length(); i++)
+        {
+                QChar c = numberToDial[i];
+                if (c.isDigit())
+                        c = c.digitValue() + '0';
+                numberToDial[i] = c;
+        }
+
+
+      bmarg += numberToDial;
       QString bm = i18n("Dialing %1").arg(bmarg);
       messg->setText(bm);
       emit debugMessage(bm);

       QString pn = gpppdata.modemDialStr();
       pn += gpppdata.dialPrefix();
-      pn += *plist.at(dialnumber);
+      pn += numberToDial;
       if(++dialnumber >= plist.count())
         dialnumber = 0;
       writeline(pn);

-- 

diego, kde-il translation team

Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
Free MS-Office replacement for most platforms
http://www.openoffice.org/




More information about the kde-core-devel mailing list