|
20 | 20 | #include "notes-merge.h" |
21 | 21 |
|
22 | 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 | 35 | NULL |
36 | 36 | }; |
37 | 37 |
|
38 | 38 | static const char * const git_notes_list_usage[] = { |
39 | | - "git notes [list [<object>]]", |
| 39 | + N_("git notes [list [<object>]]"), |
40 | 40 | NULL |
41 | 41 | }; |
42 | 42 |
|
43 | 43 | static const char * const git_notes_add_usage[] = { |
44 | | - "git notes add [<options>] [<object>]", |
| 44 | + N_("git notes add [<options>] [<object>]"), |
45 | 45 | NULL |
46 | 46 | }; |
47 | 47 |
|
48 | 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 | 51 | NULL |
52 | 52 | }; |
53 | 53 |
|
54 | 54 | static const char * const git_notes_append_usage[] = { |
55 | | - "git notes append [<options>] [<object>]", |
| 55 | + N_("git notes append [<options>] [<object>]"), |
56 | 56 | NULL |
57 | 57 | }; |
58 | 58 |
|
59 | 59 | static const char * const git_notes_edit_usage[] = { |
60 | | - "git notes edit [<object>]", |
| 60 | + N_("git notes edit [<object>]"), |
61 | 61 | NULL |
62 | 62 | }; |
63 | 63 |
|
64 | 64 | static const char * const git_notes_show_usage[] = { |
65 | | - "git notes show [<object>]", |
| 65 | + N_("git notes show [<object>]"), |
66 | 66 | NULL |
67 | 67 | }; |
68 | 68 |
|
69 | 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 | 73 | NULL |
74 | 74 | }; |
75 | 75 |
|
76 | 76 | static const char * const git_notes_remove_usage[] = { |
77 | | - "git notes remove [<object>]", |
| 77 | + N_("git notes remove [<object>]"), |
78 | 78 | NULL |
79 | 79 | }; |
80 | 80 |
|
81 | 81 | static const char * const git_notes_prune_usage[] = { |
82 | | - "git notes prune [<options>]", |
| 82 | + N_("git notes prune [<options>]"), |
83 | 83 | NULL |
84 | 84 | }; |
85 | 85 |
|
86 | 86 | static const char * const git_notes_get_ref_usage[] = { |
87 | | - "git notes get-ref", |
| 87 | + N_("git notes get-ref"), |
88 | 88 | NULL |
89 | 89 | }; |
90 | 90 |
|
@@ -531,19 +531,19 @@ static int add(int argc, const char **argv, const char *prefix) |
531 | 531 | const unsigned char *note; |
532 | 532 | struct msg_arg msg = { 0, 0, STRBUF_INIT }; |
533 | 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 | 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 | 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 | 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 | 545 | parse_reuse_arg}, |
546 | | - OPT__FORCE(&force, "replace existing notes"), |
| 546 | + OPT__FORCE(&force, N_("replace existing notes")), |
547 | 547 | OPT_END() |
548 | 548 | }; |
549 | 549 |
|
@@ -611,11 +611,11 @@ static int copy(int argc, const char **argv, const char *prefix) |
611 | 611 | struct notes_tree *t; |
612 | 612 | const char *rewrite_cmd = NULL; |
613 | 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 | 619 | OPT_END() |
620 | 620 | }; |
621 | 621 |
|
@@ -688,17 +688,17 @@ static int append_edit(int argc, const char **argv, const char *prefix) |
688 | 688 | const char * const *usage; |
689 | 689 | struct msg_arg msg = { 0, 0, STRBUF_INIT }; |
690 | 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 | 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 | 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 | 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 | 702 | parse_reuse_arg}, |
703 | 703 | OPT_END() |
704 | 704 | }; |
@@ -861,19 +861,19 @@ static int merge(int argc, const char **argv, const char *prefix) |
861 | 861 | int verbosity = 0, result; |
862 | 862 | const char *strategy = NULL; |
863 | 863 | struct option options[] = { |
864 | | - OPT_GROUP("General options"), |
| 864 | + OPT_GROUP(N_("General options")), |
865 | 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 | 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 | 873 | PARSE_OPT_NOARG | PARSE_OPT_NONEG }, |
874 | | - OPT_GROUP("Aborting notes merge resolution"), |
| 874 | + OPT_GROUP(N_("Aborting notes merge resolution")), |
875 | 875 | { OPTION_BOOLEAN, 0, "abort", &do_abort, NULL, |
876 | | - "abort notes merge", |
| 876 | + N_("abort notes merge"), |
877 | 877 | PARSE_OPT_NOARG | PARSE_OPT_NONEG }, |
878 | 878 | OPT_END() |
879 | 879 | }; |
@@ -980,10 +980,10 @@ static int remove_cmd(int argc, const char **argv, const char *prefix) |
980 | 980 | int from_stdin = 0; |
981 | 981 | struct option options[] = { |
982 | 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 | 984 | IGNORE_MISSING), |
985 | 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 | 987 | OPT_END() |
988 | 988 | }; |
989 | 989 | struct notes_tree *t; |
@@ -1064,8 +1064,8 @@ int cmd_notes(int argc, const char **argv, const char *prefix) |
1064 | 1064 | int result; |
1065 | 1065 | const char *override_notes_ref = NULL; |
1066 | 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 | 1069 | OPT_END() |
1070 | 1070 | }; |
1071 | 1071 |
|
|
0 commit comments