[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/office/kmymoney/kmymoney/widgets
From:       Alvaro Soliverez <asoliverez () kde ! org>
Date:       2010-09-01 2:44:18
Message-ID: 20100901024418.D64D9AC876 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1170476 by asoliverez:

Skip the postDay suffix calculation if a string is not translated correctly

BUG:232757

 M  +5 -3      kmymoneyscheduleddatetbl.cpp  


--- trunk/extragear/office/kmymoney/kmymoney/widgets/kmymoneyscheduleddatetbl.cpp \
#1170475:1170476 @@ -268,13 +268,15 @@
   int d = text.toInt();
 
   if (d >= 1 && d <= 31) {
-    QStringList postfixList =
-      i18nc("These are the suffix strings of the days in the calendar view; please \
                make sure that you keep all the 30 separators (the '-' character) \
                when translating",
-            "st-nd-rd-th-th-th-th-th-th-th-th-th-th-th-th-th-th-th-th-th-st-nd-rd-th-th-th-th-th-th-th-st").split('-', \
QString::KeepEmptyParts); +    QString suffix = i18nc("These are the suffix strings \
of the days in the calendar view; please make sure that you keep all the 30 \
separators (the '-' character) when translating", +                           \
"st-nd-rd-th-th-th-th-th-th-th-th-th-th-th-th-th-th-th-th-th-st-nd-rd-th-th-th-th-th-th-th-st");
 +    if(suffix.length() > 30 ) { // if length is below 30, then skip it because it \
has not been translated correctly +      QStringList postfixList = suffix.split('-', \
                QString::KeepEmptyParts);
     if (postfixList.size() <= d) // make sure that an improper translation will not \
cause a crash  text += postfixList[d-1];
   }
 }
+}
 
 void kMyMoneyScheduledDateTbl::refresh()
 {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic