SOURCES: kbd-ngettext.patch (NEW) - use ngettext()

qboosh qboosh at pld-linux.org
Fri Dec 5 22:43:39 CET 2008


Author: qboosh                       Date: Fri Dec  5 21:43:39 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- use ngettext()

---- Files affected:
SOURCES:
   kbd-ngettext.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/kbd-ngettext.patch
diff -u /dev/null SOURCES/kbd-ngettext.patch:1.1
--- /dev/null	Fri Dec  5 22:43:40 2008
+++ SOURCES/kbd-ngettext.patch	Fri Dec  5 22:43:34 2008
@@ -0,0 +1,105 @@
+--- kbd-1.15/src/loadkeys.y.orig	2008-10-23 21:03:59.000000000 +0200
++++ kbd-1.15/src/loadkeys.y	2008-12-05 22:13:37.720317959 +0100
+@@ -1044,15 +1044,13 @@
+ 	keyct = defkeys(fd, console, warned);
+ 	funcct = deffuncs(fd);
+ 	if (verbose) {
+-	        printf(_("\nChanged %d %s and %d %s.\n"),
+-		       keyct, (keyct == 1) ? _("key") : _("keys"),
+-		       funcct, (funcct == 1) ? _("string") : _("strings"));
++		printf(ngettext("\nChanged %d key", "\nChanged %d keys", keyct), keyct);
++		printf(ngettext(" and %d string.", " and %d strings.", funcct), funcct);
+ 	}
+ 	if (accent_table_size > 0 || nocompose) {
+ 	  diacct = defdiacs(fd);
+ 	  if (verbose) {
+-			printf(_("Loaded %d compose %s.\n"), diacct,
+-			       (diacct == 1) ? _("definition") : _("definitions"));
++		printf(ngettext("Loaded %d compose definition.\n", "Loaded %d compose definitions.\n", diacct), diacct);
+ 	  }
+ 	}
+ 	else
+--- kbd-1.15/po/pl.po.orig	2008-12-01 20:58:05.000000000 +0100
++++ kbd-1.15/po/pl.po	2008-12-05 22:25:04.324293655 +0100
+@@ -13,6 +13,7 @@
+ "MIME-Version: 1.0\n"
+ "Content-Type: text/plain; charset=ISO-8859-2\n"
+ "Content-Transfer-Encoding: 8bit\n"
++"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+ 
+ #: src/chvt.c:28
+ #, c-format
+@@ -615,47 +616,41 @@
+ msgid "impossible error in do_constant"
+ msgstr "niemo¿liwy b³±d w do_constant"
+ 
+-# XXX: ngettext should be used for the following five messages
+ #: loadkeys.y:1047
+ #, c-format
+ msgid ""
+ "\n"
+-"Changed %d %s and %d %s.\n"
+-msgstr ""
++"Changed %d key"
++msgid_plural ""
+ "\n"
+-"Zmienionych klawiszy: %d%s ³añcuchów: %d%s\n"
+-
+-#: loadkeys.y:1048
+-msgid "key"
+-msgstr ","
++"Changed %d keys"
++msgstr[0] ""
++"\n"
++"Zmieniono %d klawisz"
++msgstr[1] ""
++"\n"
++"Zmieniono %d klawisze"
++msgstr[2] ""
++"\n"
++"Zmieniono %d klawiszy"
+ 
+ #: loadkeys.y:1048
+-msgid "keys"
+-msgstr ","
+-
+-#: loadkeys.y:1049
+-msgid "string"
+-msgstr "."
+-
+-#: loadkeys.y:1049
+-msgid "strings"
+-msgstr "."
+-
+-# XXX: ngettext should be used for the following three messages
+-#: loadkeys.y:1054
+ #, c-format
+-msgid "Loaded %d compose %s.\n"
+-msgstr "Wczytanych definicji compose: %d%s\n"
+-
+-#: loadkeys.y:1055
+-msgid "definition"
+-msgstr "."
++msgid " and %d string."
++msgid_plural " and %d strings."
++msgstr[0] " i %d ³añcuch."
++msgstr[1] " i %d ³añcuchy."
++msgstr[2] " i %d ³añcuchów."
++
++#: loadkeys.y:1053
++#, c-format
++msgid "Loaded %d compose definition.\n"
++msgid_plural "Loaded %d compose definitions.\n"
++msgstr[0] "Wczytano %d definicjê compose.\n"
++msgstr[1] "Wczytano %d definicje compose.\n"
++msgstr[2] "Wczytano %d definicji compose.\n"
+ 
+-#: loadkeys.y:1055
+-msgid "definitions"
+-msgstr "."
+-
+-#: loadkeys.y:1060
++#: loadkeys.y:1058
+ #, c-format
+ msgid "(No change in compose definitions.)\n"
+ msgstr "(Brak zmian w definicjach compose)\n"
================================================================


More information about the pld-cvs-commit mailing list