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

List:       kde-core-devel
Subject:    Patch for Irish plural forms (bug 96127)
From:       "Barry O'Donovan" <barry.odonovan () kdemail ! net>
Date:       2005-02-19 11:54:32
Message-ID: 200502191154.41032.barry.odonovan () kdemail ! net
[Download RAW message or body]

[Attachment #2 (multipart/mixed)]


Hi folks,

Please find attached a suggested patch to close bug 96127 
(http://bugs.kde.org/show_bug.cgi?id=96127). 

I am not up to speed with the KDE i18n framework so I'm winging it a 
bit. If this is not the correct way to solve this problem then any 
suggestions will be gratefully appreciated.

If the patch is okay, is there any other files that need modification 
before closing the bug report?

Kind regards,
Barry

-- 
Regards,
Barry O'Donovan
http://www.barryodonovan.com/
http://www.ihl.ucd.ie/	

Public key: http://www.barryodonovan.com/gpg.asc


["klocale-ga-patch.diff" (text/x-diff)]

Index: klocale.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdecore/klocale.cpp,v
retrieving revision 1.363
diff -u -p -r1.363 klocale.cpp
--- klocale.cpp	13 Feb 2005 10:51:38 -0000	1.363
+++ klocale.cpp	19 Feb 2005 11:42:28 -0000
@@ -224,7 +224,7 @@ int KLocale::pluralType( const KCatalogu
       return 1;
     else if ( pf == "French" )
       return 2;
-    else if ( pf == "OneTwoRest" || pf == "Gaeilge" ) // Gaelige is the old name
+    else if ( pf == "OneTwoRest" )
       return 3;
     else if ( pf == "Russian" )
       return 4;
@@ -246,6 +246,8 @@ int KLocale::pluralType( const KCatalogu
       return 12;
     else if ( pf == "Macedonian" )
       return 13;
+    else if ( pf == "Gaeilge" )
+        return 14;
     else {
       kdWarning(173) << "Definition of PluralForm is none of "
 		       << "NoPlural/"
@@ -260,7 +262,8 @@ int KLocale::pluralType( const KCatalogu
 		       << "Slovak/"
 		       << "Arabic/"
 		       << "Balcan/"
-		       << "Macedonian/"
+               << "Macedonian/"
+               << "Gaeilge/"
 		       << "Maltese: " << pf << endl;
       exit(1);
     }
@@ -829,7 +832,7 @@ QString KLocale::translate( const char *
       return put_n_in( forms[0], n);
     else
       return put_n_in( forms[1], n);
-  case 3: // Gaeilge
+  case 3: // OneTwoRest
     EXPECT_LENGTH( 3 );
     if ( n == 1 )
       return put_n_in( forms[0], n);
@@ -923,6 +926,18 @@ QString KLocale::translate( const char *
 	return put_n_in(forms[1], n);
      else
 	return put_n_in(forms[2], n);
+  case 14: // Gaeilge
+      EXPECT_LENGTH(5);
+      if (n == 1)                       // "ceann amháin"
+          return put_n_in(forms[0], n);
+      else if (n == 2)                  // "dhá cheann"
+          return put_n_in(forms[1], n);
+      else if (n < 7)                   // "%n cinn"
+          return put_n_in(forms[2], n);
+      else if (n < 11)                  // "%n gcinn"
+          return put_n_in(forms[3], n);
+      else                              // "%n ceann"
+          return put_n_in(forms[4], n);
   }
   kdFatal() << "The function should have been returned in another way\n";
 

[Attachment #6 (application/pgp-signature)]

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

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