i18n: notes: 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:32 UTC e6b895efdb77f3a1c8e489ff13ed5834bba16736
1 file changed +60 -60
builtin/notes.c
+60 -60
@@ -20,71 +20,71 @@
20 #include "notes-merge.h"
21
22 static const char * const git_notes_usage[] = {
23 - "git notes [--ref <notes_ref>] [list [<object>]]",
24 - "git notes [--ref <notes_ref>] add [-f] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]",
25 - "git notes [--ref <notes_ref>] copy [-f] <from-object> <to-object>",
26 - "git notes [--ref <notes_ref>] append [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]",
27 - "git notes [--ref <notes_ref>] edit [<object>]",
28 - "git notes [--ref <notes_ref>] show [<object>]",
29 - "git notes [--ref <notes_ref>] merge [-v | -q] [-s <strategy> ] <notes_ref>",
30 - "git notes merge --commit [-v | -q]",
31 - "git notes merge --abort [-v | -q]",
32 - "git notes [--ref <notes_ref>] remove [<object>...]",
33 - "git notes [--ref <notes_ref>] prune [-n | -v]",
34 - "git notes [--ref <notes_ref>] get-ref",
23 + N_("git notes [--ref <notes_ref>] [list [<object>]]"),
24 + N_("git notes [--ref <notes_ref>] add [-f] [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"),
25 + N_("git notes [--ref <notes_ref>] copy [-f] <from-object> <to-object>"),
26 + N_("git notes [--ref <notes_ref>] append [-m <msg> | -F <file> | (-c | -C) <object>] [<object>]"),
27 + N_("git notes [--ref <notes_ref>] edit [<object>]"),
28 + N_("git notes [--ref <notes_ref>] show [<object>]"),
29 + N_("git notes [--ref <notes_ref>] merge [-v | -q] [-s <strategy> ] <notes_ref>"),
30 + N_("git notes merge --commit [-v | -q]"),
31 + N_("git notes merge --abort [-v | -q]"),
32 + N_("git notes [--ref <notes_ref>] remove [<object>...]"),
33 + N_("git notes [--ref <notes_ref>] prune [-n | -v]"),
34 + N_("git notes [--ref <notes_ref>] get-ref"),
35 NULL
36 };
37
38 static const char * const git_notes_list_usage[] = {
39 - "git notes [list [<object>]]",
39 + N_("git notes [list [<object>]]"),
40 NULL
41 };
42
43 static const char * const git_notes_add_usage[] = {
44 - "git notes add [<options>] [<object>]",
44 + N_("git notes add [<options>] [<object>]"),
45 NULL
46 };
47
48 static const char * const git_notes_copy_usage[] = {
49 - "git notes copy [<options>] <from-object> <to-object>",
50 - "git notes copy --stdin [<from-object> <to-object>]...",
49 + N_("git notes copy [<options>] <from-object> <to-object>"),
50 + N_("git notes copy --stdin [<from-object> <to-object>]..."),
51 NULL
52 };
53
54 static const char * const git_notes_append_usage[] = {
55 - "git notes append [<options>] [<object>]",
55 + N_("git notes append [<options>] [<object>]"),
56 NULL
57 };
58
59 static const char * const git_notes_edit_usage[] = {
60 - "git notes edit [<object>]",
60 + N_("git notes edit [<object>]"),
61 NULL
62 };
63
64 static const char * const git_notes_show_usage[] = {
65 - "git notes show [<object>]",
65 + N_("git notes show [<object>]"),
66 NULL
67 };
68
69 static const char * const git_notes_merge_usage[] = {
70 - "git notes merge [<options>] <notes_ref>",
71 - "git notes merge --commit [<options>]",
72 - "git notes merge --abort [<options>]",
70 + N_("git notes merge [<options>] <notes_ref>"),
71 + N_("git notes merge --commit [<options>]"),
72 + N_("git notes merge --abort [<options>]"),
73 NULL
74 };
75
76 static const char * const git_notes_remove_usage[] = {
77 - "git notes remove [<object>]",
77 + N_("git notes remove [<object>]"),
78 NULL
79 };
80
81 static const char * const git_notes_prune_usage[] = {
82 - "git notes prune [<options>]",
82 + N_("git notes prune [<options>]"),
83 NULL
84 };
85
86 static const char * const git_notes_get_ref_usage[] = {
87 - "git notes get-ref",
87 + N_("git notes get-ref"),
88 NULL
89 };
90
@@ -531,19 +531,19 @@ static int add(int argc, const char **argv, const char *prefix)
531 const unsigned char *note;
532 struct msg_arg msg = { 0, 0, STRBUF_INIT };
533 struct option options[] = {
534 - { OPTION_CALLBACK, 'm', "message", &msg, "msg",
535 - "note contents as a string", PARSE_OPT_NONEG,
534 + { OPTION_CALLBACK, 'm', "message", &msg, N_("msg"),
535 + N_("note contents as a string"), PARSE_OPT_NONEG,
536 parse_msg_arg},
537 - { OPTION_CALLBACK, 'F', "file", &msg, "file",
538 - "note contents in a file", PARSE_OPT_NONEG,
537 + { OPTION_CALLBACK, 'F', "file", &msg, N_("file"),
538 + N_("note contents in a file"), PARSE_OPT_NONEG,
539 parse_file_arg},
540 - { OPTION_CALLBACK, 'c', "reedit-message", &msg, "object",
541 - "reuse and edit specified note object", PARSE_OPT_NONEG,
540 + { OPTION_CALLBACK, 'c', "reedit-message", &msg, N_("object"),
541 + N_("reuse and edit specified note object"), PARSE_OPT_NONEG,
542 parse_reedit_arg},
543 - { OPTION_CALLBACK, 'C', "reuse-message", &msg, "object",
544 - "reuse specified note object", PARSE_OPT_NONEG,
543 + { OPTION_CALLBACK, 'C', "reuse-message", &msg, N_("object"),
544 + N_("reuse specified note object"), PARSE_OPT_NONEG,
545 parse_reuse_arg},
546 - OPT__FORCE(&force, "replace existing notes"),
546 + OPT__FORCE(&force, N_("replace existing notes")),
547 OPT_END()
548 };
549
@@ -611,11 +611,11 @@ static int copy(int argc, const char **argv, const char *prefix)
611 struct notes_tree *t;
612 const char *rewrite_cmd = NULL;
613 struct option options[] = {
614 - OPT__FORCE(&force, "replace existing notes"),
615 - OPT_BOOLEAN(0, "stdin", &from_stdin, "read objects from stdin"),
616 - OPT_STRING(0, "for-rewrite", &rewrite_cmd, "command",
617 - "load rewriting config for <command> (implies "
618 - "--stdin)"),
614 + OPT__FORCE(&force, N_("replace existing notes")),
615 + OPT_BOOLEAN(0, "stdin", &from_stdin, N_("read objects from stdin")),
616 + OPT_STRING(0, "for-rewrite", &rewrite_cmd, N_("command"),
617 + N_("load rewriting config for <command> (implies "
618 + "--stdin)")),
619 OPT_END()
620 };
621
@@ -688,17 +688,17 @@ static int append_edit(int argc, const char **argv, const char *prefix)
688 const char * const *usage;
689 struct msg_arg msg = { 0, 0, STRBUF_INIT };
690 struct option options[] = {
691 - { OPTION_CALLBACK, 'm', "message", &msg, "msg",
692 - "note contents as a string", PARSE_OPT_NONEG,
691 + { OPTION_CALLBACK, 'm', "message", &msg, N_("msg"),
692 + N_("note contents as a string"), PARSE_OPT_NONEG,
693 parse_msg_arg},
694 - { OPTION_CALLBACK, 'F', "file", &msg, "file",
695 - "note contents in a file", PARSE_OPT_NONEG,
694 + { OPTION_CALLBACK, 'F', "file", &msg, N_("file"),
695 + N_("note contents in a file"), PARSE_OPT_NONEG,
696 parse_file_arg},
697 - { OPTION_CALLBACK, 'c', "reedit-message", &msg, "object",
698 - "reuse and edit specified note object", PARSE_OPT_NONEG,
697 + { OPTION_CALLBACK, 'c', "reedit-message", &msg, N_("object"),
698 + N_("reuse and edit specified note object"), PARSE_OPT_NONEG,
699 parse_reedit_arg},
700 - { OPTION_CALLBACK, 'C', "reuse-message", &msg, "object",
701 - "reuse specified note object", PARSE_OPT_NONEG,
700 + { OPTION_CALLBACK, 'C', "reuse-message", &msg, N_("object"),
701 + N_("reuse specified note object"), PARSE_OPT_NONEG,
702 parse_reuse_arg},
703 OPT_END()
704 };
@@ -861,19 +861,19 @@ static int merge(int argc, const char **argv, const char *prefix)
861 int verbosity = 0, result;
862 const char *strategy = NULL;
863 struct option options[] = {
864 - OPT_GROUP("General options"),
864 + OPT_GROUP(N_("General options")),
865 OPT__VERBOSITY(&verbosity),
866 - OPT_GROUP("Merge options"),
867 - OPT_STRING('s', "strategy", &strategy, "strategy",
868 - "resolve notes conflicts using the given strategy "
869 - "(manual/ours/theirs/union/cat_sort_uniq)"),
870 - OPT_GROUP("Committing unmerged notes"),
866 + OPT_GROUP(N_("Merge options")),
867 + OPT_STRING('s', "strategy", &strategy, N_("strategy"),
868 + N_("resolve notes conflicts using the given strategy "
869 + "(manual/ours/theirs/union/cat_sort_uniq)")),
870 + OPT_GROUP(N_("Committing unmerged notes")),
871 { OPTION_BOOLEAN, 0, "commit", &do_commit, NULL,
872 - "finalize notes merge by committing unmerged notes",
872 + N_("finalize notes merge by committing unmerged notes"),
873 PARSE_OPT_NOARG | PARSE_OPT_NONEG },
874 - OPT_GROUP("Aborting notes merge resolution"),
874 + OPT_GROUP(N_("Aborting notes merge resolution")),
875 { OPTION_BOOLEAN, 0, "abort", &do_abort, NULL,
876 - "abort notes merge",
876 + N_("abort notes merge"),
877 PARSE_OPT_NOARG | PARSE_OPT_NONEG },
878 OPT_END()
879 };
@@ -980,10 +980,10 @@ static int remove_cmd(int argc, const char **argv, const char *prefix)
980 int from_stdin = 0;
981 struct option options[] = {
982 OPT_BIT(0, "ignore-missing", &flag,
983 - "attempt to remove non-existent note is not an error",
983 + N_("attempt to remove non-existent note is not an error"),
984 IGNORE_MISSING),
985 OPT_BOOLEAN(0, "stdin", &from_stdin,
986 - "read object names from the standard input"),
986 + N_("read object names from the standard input")),
987 OPT_END()
988 };
989 struct notes_tree *t;
@@ -1064,8 +1064,8 @@ int cmd_notes(int argc, const char **argv, const char *prefix)
1064 int result;
1065 const char *override_notes_ref = NULL;
1066 struct option options[] = {
1067 - OPT_STRING(0, "ref", &override_notes_ref, "notes_ref",
1068 - "use notes from <notes_ref>"),
1067 + OPT_STRING(0, "ref", &override_notes_ref, N_("notes_ref"),
1068 + N_("use notes from <notes_ref>")),
1069 OPT_END()
1070 };
1071