git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"Ævar Arnfjörð" <avarab@gmail.com>,
	"Jonathan Nieder" <jrnieder@gmail.com>,
	"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH 6/6] test-parse-options: mark parseopt help strings for pseudotranslation
Date: Fri, 24 Aug 2012 12:43:06 +0700	[thread overview]
Message-ID: <1345786986-10826-7-git-send-email-pclouds@gmail.com> (raw)
In-Reply-To: <1345786986-10826-1-git-send-email-pclouds@gmail.com>

This reduces the number of false positives in untranslated.log when we
check for unmarked strings.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 test-parse-options.c | 62 ++++++++++++++++++++++++++--------------------------
 1 file changed, 31 insertions(+), 31 deletions(-)

diff --git a/test-parse-options.c b/test-parse-options.c
index 4a94327..09ddf74 100644
--- a/test-parse-options.c
+++ b/test-parse-options.c
@@ -33,50 +33,50 @@ int main(int argc, const char **argv)
 {
 	const char *prefix = "prefix/";
 	const char *usage[] = {
-		"test-parse-options <options>",
+		N_("test-parse-options <options>"),
 		NULL
 	};
 	struct option options[] = {
-		OPT_BOOL(0, "yes", &boolean, "get a boolean"),
-		OPT_BOOL('D', "no-doubt", &boolean, "begins with 'no-'"),
+		OPT_BOOL(0, "yes", &boolean, N_("get a boolean")),
+		OPT_BOOL('D', "no-doubt", &boolean, N_("begins with 'no-'")),
 		{ OPTION_SET_INT, 'B', "no-fear", &boolean, NULL,
-		  "be brave", PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, 1 },
-		OPT_COUNTUP('b', "boolean", &boolean, "increment by one"),
+		  N_("be brave"), PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, 1 },
+		OPT_COUNTUP('b', "boolean", &boolean, N_("increment by one")),
 		OPT_BIT('4', "or4", &boolean,
-			"bitwise-or boolean with ...0100", 4),
-		OPT_NEGBIT(0, "neg-or4", &boolean, "same as --no-or4", 4),
+			N_("bitwise-or boolean with ...0100"), 4),
+		OPT_NEGBIT(0, "neg-or4", &boolean, N_("same as --no-or4"), 4),
 		OPT_GROUP(""),
-		OPT_INTEGER('i', "integer", &integer, "get a integer"),
-		OPT_INTEGER('j', NULL, &integer, "get a integer, too"),
-		OPT_SET_INT(0, "set23", &integer, "set integer to 23", 23),
-		OPT_DATE('t', NULL, &timestamp, "get timestamp of <time>"),
-		OPT_CALLBACK('L', "length", &integer, "str",
-			"get length of <str>", length_callback),
-		OPT_FILENAME('F', "file", &file, "set file to <file>"),
-		OPT_GROUP("String options"),
-		OPT_STRING('s', "string", &string, "string", "get a string"),
-		OPT_STRING(0, "string2", &string, "str", "get another string"),
-		OPT_STRING(0, "st", &string, "st", "get another string (pervert ordering)"),
-		OPT_STRING('o', NULL, &string, "str", "get another string"),
+		OPT_INTEGER('i', "integer", &integer, N_("get a integer")),
+		OPT_INTEGER('j', NULL, &integer, N_("get a integer, too")),
+		OPT_SET_INT(0, "set23", &integer, N_("set integer to 23"), 23),
+		OPT_DATE('t', NULL, &timestamp, N_("get timestamp of <time>")),
+		OPT_CALLBACK('L', "length", &integer, N_("str"),
+			N_("get length of <str>"), length_callback),
+		OPT_FILENAME('F', "file", &file, N_("set file to <file>")),
+		OPT_GROUP(N_("String options")),
+		OPT_STRING('s', "string", &string, N_("string"), N_("get a string")),
+		OPT_STRING(0, "string2", &string, N_("str"), N_("get another string")),
+		OPT_STRING(0, "st", &string, N_("st"), N_("get another string (pervert ordering)")),
+		OPT_STRING('o', NULL, &string, N_("str"), N_("get another string")),
 		OPT_NOOP_NOARG(0, "obsolete"),
 		OPT_SET_PTR(0, "default-string", &string,
-			"set string to default", (unsigned long)"default"),
-		OPT_STRING_LIST(0, "list", &list, "str", "add str to list"),
-		OPT_GROUP("Magic arguments"),
-		OPT_ARGUMENT("quux", "means --quux"),
-		OPT_NUMBER_CALLBACK(&integer, "set integer to NUM",
+			N_("set string to default"), (unsigned long)"default"),
+		OPT_STRING_LIST(0, "list", &list, N_("str"), N_("add str to list")),
+		OPT_GROUP(N_("Magic arguments")),
+		OPT_ARGUMENT("quux", N_("means --quux")),
+		OPT_NUMBER_CALLBACK(&integer, N_("set integer to NUM"),
 			number_callback),
-		{ OPTION_COUNTUP, '+', NULL, &boolean, NULL, "same as -b",
+		{ OPTION_COUNTUP, '+', NULL, &boolean, NULL, N_("same as -b"),
 		  PARSE_OPT_NOARG | PARSE_OPT_NONEG | PARSE_OPT_NODASH },
 		{ OPTION_COUNTUP, 0, "ambiguous", &ambiguous, NULL,
-		  "positive ambiguity", PARSE_OPT_NOARG | PARSE_OPT_NONEG },
+		  N_("positive ambiguity"), PARSE_OPT_NOARG | PARSE_OPT_NONEG },
 		{ OPTION_COUNTUP, 0, "no-ambiguous", &ambiguous, NULL,
-		  "negative ambiguity", PARSE_OPT_NOARG | PARSE_OPT_NONEG },
-		OPT_GROUP("Standard options"),
+		  N_("negative ambiguity"), PARSE_OPT_NOARG | PARSE_OPT_NONEG },
+		OPT_GROUP(N_("Standard options")),
 		OPT__ABBREV(&abbrev),
-		OPT__VERBOSE(&verbose, "be verbose"),
-		OPT__DRY_RUN(&dry_run, "dry run"),
-		OPT__QUIET(&quiet, "be quiet"),
+		OPT__VERBOSE(&verbose, N_("be verbose")),
+		OPT__DRY_RUN(&dry_run, N_("dry run")),
+		OPT__QUIET(&quiet, N_("be quiet")),
 		OPT_END(),
 	};
 	int i;
-- 
1.7.12.rc2

  parent reply	other threads:[~2012-08-24  5:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-24  5:43 [PATCH 0/6] Gettext poison rework Nguyễn Thái Ngọc Duy
2012-08-24  5:43 ` [PATCH 1/6] Makefile: do not mark strings for l10n from test programs Nguyễn Thái Ngọc Duy
2012-08-24  5:43 ` [PATCH 2/6] Makefile: recreate git.pot if *.sh or *.perl changes Nguyễn Thái Ngọc Duy
2012-08-24  5:43 ` [PATCH 3/6] Replace gettext poison implementation with pseudotranslation generation Nguyễn Thái Ngọc Duy
2012-08-24  5:43 ` [PATCH 4/6] Initialize gettext for test programs that may use it Nguyễn Thái Ngọc Duy
2012-08-24  5:43 ` [PATCH 5/6] Support logging unmarked strings Nguyễn Thái Ngọc Duy
2012-08-24  5:43 ` Nguyễn Thái Ngọc Duy [this message]
2012-08-24  8:51 ` [PATCH 0/6] Gettext poison rework Ævar Arnfjörð Bjarmason
2012-08-24 10:54   ` Nguyen Thai Ngoc Duy
2012-08-24 16:02 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1345786986-10826-7-git-send-email-pclouds@gmail.com \
    --to=pclouds@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).