]> err.no Git - util-linux/commitdiff
docs: add ngettext() into TODO file
authorKarel Zak <kzak@redhat.com>
Thu, 10 Dec 2009 12:14:55 +0000 (13:14 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 10 Dec 2009 12:14:55 +0000 (13:14 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
TODO

diff --git a/TODO b/TODO
index bcedb9eb7614992e6ef82645ced9e6e649277585..cc3c0f9f8b594b88869451a4e9ff9aca00998eb6 100644 (file)
--- a/TODO
+++ b/TODO
@@ -45,6 +45,15 @@ fdisk(s)
 misc
 ----
 
+ * use ngettext() for strings with plurals, for example
+
+    /* include/nls.h */
+    #define P_(id, id_plural, n)       ngettext(id, id_plural, n)
+
+    printf(P_("%d used sector",
+              "%d used sectors", sectors),
+              sectors);
+
  * check for program_invocation_short_name in ./configure.ac and add 
    lib/progname.c fallback for libc without this feature (for example
    use the 1st field from /proc/#/cmdline)