[PATCH 6/6] test-parse-options: mark parseopt help strings for pseudotranslation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]