]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Improvements based on feedback by Ben Pfaff.
authorBruno Haible <bruno@clisp.org>
Sun, 18 May 2008 11:39:57 +0000 (11:39 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:15:42 +0000 (12:15 +0200)
gnulib-local/lib/propername.h
gnulib-local/modules/propername

index 3115005378d4d38af1873b79f00f51abae379a07..ac9f4fc6af62f424f686a5db26f9c79d16ff0e58 100644 (file)
@@ -1,5 +1,5 @@
 /* Localization of proper names.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2008 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2006.
 
    This program is free software: you can redistribute it and/or modify
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+/* INTRODUCTION
+
+   What do
+
+      Torbjörn Granlund    (coreutils)
+      François Pinard      (coreutils)
+      Danilo Šegan         (gettext)
+
+   have in common?
+
+   A non-ASCII name. This causes trouble in the --version output. The simple
+   "solution", unfortunately mutilates the name.
+
+     $ du --version| grep Granlund
+     Écrit par Torbjorn Granlund, David MacKenzie, Paul Eggert et Jim Meyering.
+
+     $ ptx --version| grep Pinard
+     Écrit par F. Pinard.
+
+   What is desirable, is to print the full name if the output character set
+   allows it, and the ASCIIfied name only as a fallback.
+
+     $ recode-sr-latin --version
+     ...
+     Written by Danilo Šegan and Bruno Haible.
+
+     $ LC_ALL=C recode-sr-latin --version
+     ...
+     Written by Danilo Segan and Bruno Haible.
+
+   The 'propername' module does exactly this. Plus, for languages that use
+   a different writing system than the Latin alphabet, it allows a translator
+   to write the name using that different writing system. In that case the
+   output will look like this:
+      <translated name> (<original name in English>)
+
+   To use the 'propername' module is done in three simple steps:
+
+     1) Add it to the list of gnulib modules to import,
+
+     2) Change the arguments of version_etc, from
+
+          from "Paul Eggert"
+          to   proper_name ("Paul Eggert")
+
+          from "Torbjorn Granlund"
+          to   proper_name_utf8 ("Torbjorn Granlund", "Torbj\303\266rn Granlund")
+
+          from "F. Pinard"
+          to   proper_name_utf8 ("Franc,ois Pinard", "Fran\303\247ois Pinard")
+
+        (Optionally, here you can also add / * TRANSLATORS: ... * / comments
+        explaining how the name is written or pronounced.)
+
+     3) If you are using GNU gettext version 0.16.1 or older, in po/Makevars,
+        in the definition of the XGETTEXT_OPTIONS variable, add:
+
+           --keyword=proper_name:1,"This is a proper name. See the gettext manual, section Names."
+           --keyword=proper_name_utf8:1,"This is a proper name. See the gettext manual, section Names."
+
+        This specifies automatic comments for the translator. (Requires
+        xgettext >= 0.15.)
+
 #ifndef _PROPERNAME_H
 #define _PROPERNAME_H
 
index 7fca804dd3e440abb0c9d084cbe77fef4c8793e8..aef3dac75f6c33b695b18063c08631ca16429d9d 100644 (file)
@@ -1,6 +1,12 @@
 Description:
 Localization of proper names.
 
+Notice:
+If you are using GNU gettext version 0.16.1 or older, add the following options
+to XGETTEXT_OPTIONS in your po/Makevars:
+  --keyword=proper_name:1,'This is a proper name. See the gettext manual, section Names.'
+  --keyword=proper_name_utf8:1,'This is a proper name. See the gettext manual, section Names.'
+
 Files:
 lib/propername.h
 lib/propername.c
@@ -16,6 +22,9 @@ xalloc
 gettext-h
 
 configure.ac:
+m4_ifdef([AM_XGETTEXT_OPTION],
+  [AM_XGETTEXT_OPTION([--keyword=proper_name:1,'This is a proper name. See the gettext manual, section Names.'])
+   AM_XGETTEXT_OPTION([--keyword=proper_name_utf8:1,'This is a proper name. See the gettext manual, section Names.'])])
 
 Makefile.am:
 lib_SOURCES += propername.h propername.c