i18n: archive: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nguyễn Thái Ngọc Duy committed Aug 20, 2012 at 19:31 UTC 0012a3873b5df4476b5b9142d0b5748a101c1ba8
2 files changed +25 -25
archive.c
+19 -19
@@ -7,10 +7,10 @@
7 #include "unpack-trees.h"
8
9 static char const * const archive_usage[] = {
10 - "git archive [options] <tree-ish> [<path>...]",
11 - "git archive --list",
12 - "git archive --remote <repo> [--exec <cmd>] [options] <tree-ish> [<path>...]",
13 - "git archive --remote <repo> [--exec <cmd>] --list",
10 + N_("git archive [options] <tree-ish> [<path>...]"),
11 + N_("git archive --list"),
12 + N_("git archive --remote <repo> [--exec <cmd>] [options] <tree-ish> [<path>...]"),
13 + N_("git archive --remote <repo> [--exec <cmd>] --list"),
14 NULL
15 };
16
@@ -319,16 +319,16 @@ static int parse_archive_args(int argc, const char **argv,
319 int worktree_attributes = 0;
320 struct option opts[] = {
321 OPT_GROUP(""),
322 - OPT_STRING(0, "format", &format, "fmt", "archive format"),
323 - OPT_STRING(0, "prefix", &base, "prefix",
324 - "prepend prefix to each pathname in the archive"),
325 - OPT_STRING('o', "output", &output, "file",
326 - "write the archive to this file"),
322 + OPT_STRING(0, "format", &format, N_("fmt"), N_("archive format")),
323 + OPT_STRING(0, "prefix", &base, N_("prefix"),
324 + N_("prepend prefix to each pathname in the archive")),
325 + OPT_STRING('o', "output", &output, N_("file"),
326 + N_("write the archive to this file")),
327 OPT_BOOL(0, "worktree-attributes", &worktree_attributes,
328 - "read .gitattributes in working directory"),
329 - OPT__VERBOSE(&verbose, "report archived files on stderr"),
330 - OPT__COMPR('0', &compression_level, "store only", 0),
331 - OPT__COMPR('1', &compression_level, "compress faster", 1),
328 + N_("read .gitattributes in working directory")),
329 + OPT__VERBOSE(&verbose, N_("report archived files on stderr")),
330 + OPT__COMPR('0', &compression_level, N_("store only"), 0),
331 + OPT__COMPR('1', &compression_level, N_("compress faster"), 1),
332 OPT__COMPR_HIDDEN('2', &compression_level, 2),
333 OPT__COMPR_HIDDEN('3', &compression_level, 3),
334 OPT__COMPR_HIDDEN('4', &compression_level, 4),
@@ -336,15 +336,15 @@ static int parse_archive_args(int argc, const char **argv,
336 OPT__COMPR_HIDDEN('6', &compression_level, 6),
337 OPT__COMPR_HIDDEN('7', &compression_level, 7),
338 OPT__COMPR_HIDDEN('8', &compression_level, 8),
339 - OPT__COMPR('9', &compression_level, "compress better", 9),
339 + OPT__COMPR('9', &compression_level, N_("compress better"), 9),
340 OPT_GROUP(""),
341 OPT_BOOL('l', "list", &list,
342 - "list supported archive formats"),
342 + N_("list supported archive formats")),
343 OPT_GROUP(""),
344 - OPT_STRING(0, "remote", &remote, "repo",
345 - "retrieve the archive from remote repository <repo>"),
346 - OPT_STRING(0, "exec", &exec, "cmd",
347 - "path to the remote git-upload-archive command"),
344 + OPT_STRING(0, "remote", &remote, N_("repo"),
345 + N_("retrieve the archive from remote repository <repo>")),
346 + OPT_STRING(0, "exec", &exec, N_("cmd"),
347 + N_("path to the remote git-upload-archive command")),
348 OPT_END()
349 };
350
builtin/archive.c
+6 -6
@@ -88,12 +88,12 @@ int cmd_archive(int argc, const char **argv, const char *prefix)
88 const char *output = NULL;
89 const char *remote = NULL;
90 struct option local_opts[] = {
91 - OPT_STRING('o', "output", &output, "file",
92 - "write the archive to this file"),
93 - OPT_STRING(0, "remote", &remote, "repo",
94 - "retrieve the archive from remote repository <repo>"),
95 - OPT_STRING(0, "exec", &exec, "cmd",
96 - "path to the remote git-upload-archive command"),
91 + OPT_STRING('o', "output", &output, N_("file"),
92 + N_("write the archive to this file")),
93 + OPT_STRING(0, "remote", &remote, N_("repo"),
94 + N_("retrieve the archive from remote repository <repo>")),
95 + OPT_STRING(0, "exec", &exec, N_("cmd"),
96 + N_("path to the remote git-upload-archive command")),
97 OPT_END()
98 };
99