This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] gettextize some overlooked option arguments


Hi,

In any localized output of 'iconv --help' or 'iconv --usage', the word FILE
does not get localized.  This is because the word has not been marked for
translation in the source file.  The same goes for the words FILE and PATH
in iconvconfig output.  Attached patch fixes this.

This tiny defect was first reported in Bugzilla as bug  #14812
(http://sourceware.org/bugzilla/show_bug.cgi?id=14812).

Regards,

Benno

-- 
http://www.fastmail.fm - Accessible with your email software
                          or over the web

From eb1f706d42424740ea1a33bac43ab9dd0cf4b0f0 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Fri, 15 Mar 2013 20:14:44 +0100
Subject: [PATCH] Gettextize a few overlooked option arguments.

---
 ChangeLog           |    5 +++++
 iconv/iconv_prog.c  |    6 +++---
 iconv/iconvconfig.c |    4 ++--
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2e8affb..38b223b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-03-15  Benno Schulenberg  <bensberg@justemail.net>
+
+	* iconv/iconv_prog.c: Gettextize also the option arguments.
+	* iconv/iconvconfig.c: Likewise.
+
 2013-03-15  Siddhesh Poyarekar  <siddhesh@redhat.com>
 	    Richard Henderson  <rth@redhat.com>
 	    Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>
diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c
index 4142020..91a29d1 100644
--- a/iconv/iconv_prog.c
+++ b/iconv/iconv_prog.c
@@ -57,13 +57,13 @@ void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
 static const struct argp_option options[] =
 {
   { NULL, 0, NULL, 0, N_("Input/Output format specification:") },
-  { "from-code", 'f', "NAME", 0, N_("encoding of original text") },
-  { "to-code", 't', "NAME", 0, N_("encoding for output") },
+  { "from-code", 'f', N_("NAME"), 0, N_("encoding of original text") },
+  { "to-code", 't', N_("NAME"), 0, N_("encoding for output") },
   { NULL, 0, NULL, 0, N_("Information:") },
   { "list", 'l', NULL, 0, N_("list all known coded character sets") },
   { NULL, 0, NULL, 0, N_("Output control:") },
   { NULL, 'c', NULL, 0, N_("omit invalid characters from output") },
-  { "output", 'o', "FILE", 0, N_("output file") },
+  { "output", 'o', N_("FILE"), 0, N_("write the output to this file") },
   { "silent", 's', NULL, 0, N_("suppress warnings") },
   { "verbose", OPT_VERBOSE, NULL, 0, N_("print progress information") },
   { NULL, 0, NULL, 0, NULL }
diff --git a/iconv/iconvconfig.c b/iconv/iconvconfig.c
index 677620b..7e9ab48 100644
--- a/iconv/iconvconfig.c
+++ b/iconv/iconvconfig.c
@@ -123,8 +123,8 @@ static char *more_help (int key, const char *text, void *input);
 #define OPT_NOSTDLIB 301
 static const struct argp_option options[] =
 {
-  { "prefix", OPT_PREFIX, "PATH", 0, N_("Prefix used for all file accesses") },
-  { "output", 'o', "FILE", 0, N_("\
+  { "prefix", OPT_PREFIX, N_("PATH"), 0, N_("Prefix used for all file accesses") },
+  { "output", 'o', N_("FILE"), 0, N_("\
 Put output in FILE instead of installed location\
  (--prefix does not apply to FILE)") },
   { "nostdlib", OPT_NOSTDLIB, NULL, 0,
-- 
1.7.0.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]