Skip to content

Commit e6b895e

Browse files
pcloudsgitster
authored andcommitted
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>
1 parent 422cad0 commit e6b895e

File tree

1 file changed

+60
-60
lines changed

1 file changed

+60
-60
lines changed

builtin/notes.c

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -20,71 +20,71 @@
2020
#include "notes-merge.h"
2121

2222
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"),
3535
NULL
3636
};
3737

3838
static const char * const git_notes_list_usage[] = {
39-
"git notes [list [<object>]]",
39+
N_("git notes [list [<object>]]"),
4040
NULL
4141
};
4242

4343
static const char * const git_notes_add_usage[] = {
44-
"git notes add [<options>] [<object>]",
44+
N_("git notes add [<options>] [<object>]"),
4545
NULL
4646
};
4747

4848
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>]..."),
5151
NULL
5252
};
5353

5454
static const char * const git_notes_append_usage[] = {
55-
"git notes append [<options>] [<object>]",
55+
N_("git notes append [<options>] [<object>]"),
5656
NULL
5757
};
5858

5959
static const char * const git_notes_edit_usage[] = {
60-
"git notes edit [<object>]",
60+
N_("git notes edit [<object>]"),
6161
NULL
6262
};
6363

6464
static const char * const git_notes_show_usage[] = {
65-
"git notes show [<object>]",
65+
N_("git notes show [<object>]"),
6666
NULL
6767
};
6868

6969
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>]"),
7373
NULL
7474
};
7575

7676
static const char * const git_notes_remove_usage[] = {
77-
"git notes remove [<object>]",
77+
N_("git notes remove [<object>]"),
7878
NULL
7979
};
8080

8181
static const char * const git_notes_prune_usage[] = {
82-
"git notes prune [<options>]",
82+
N_("git notes prune [<options>]"),
8383
NULL
8484
};
8585

8686
static const char * const git_notes_get_ref_usage[] = {
87-
"git notes get-ref",
87+
N_("git notes get-ref"),
8888
NULL
8989
};
9090

@@ -531,19 +531,19 @@ static int add(int argc, const char **argv, const char *prefix)
531531
const unsigned char *note;
532532
struct msg_arg msg = { 0, 0, STRBUF_INIT };
533533
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,
536536
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,
539539
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,
542542
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,
545545
parse_reuse_arg},
546-
OPT__FORCE(&force, "replace existing notes"),
546+
OPT__FORCE(&force, N_("replace existing notes")),
547547
OPT_END()
548548
};
549549

@@ -611,11 +611,11 @@ static int copy(int argc, const char **argv, const char *prefix)
611611
struct notes_tree *t;
612612
const char *rewrite_cmd = NULL;
613613
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)")),
619619
OPT_END()
620620
};
621621

@@ -688,17 +688,17 @@ static int append_edit(int argc, const char **argv, const char *prefix)
688688
const char * const *usage;
689689
struct msg_arg msg = { 0, 0, STRBUF_INIT };
690690
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,
693693
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,
696696
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,
699699
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,
702702
parse_reuse_arg},
703703
OPT_END()
704704
};
@@ -861,19 +861,19 @@ static int merge(int argc, const char **argv, const char *prefix)
861861
int verbosity = 0, result;
862862
const char *strategy = NULL;
863863
struct option options[] = {
864-
OPT_GROUP("General options"),
864+
OPT_GROUP(N_("General options")),
865865
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")),
871871
{ OPTION_BOOLEAN, 0, "commit", &do_commit, NULL,
872-
"finalize notes merge by committing unmerged notes",
872+
N_("finalize notes merge by committing unmerged notes"),
873873
PARSE_OPT_NOARG | PARSE_OPT_NONEG },
874-
OPT_GROUP("Aborting notes merge resolution"),
874+
OPT_GROUP(N_("Aborting notes merge resolution")),
875875
{ OPTION_BOOLEAN, 0, "abort", &do_abort, NULL,
876-
"abort notes merge",
876+
N_("abort notes merge"),
877877
PARSE_OPT_NOARG | PARSE_OPT_NONEG },
878878
OPT_END()
879879
};
@@ -980,10 +980,10 @@ static int remove_cmd(int argc, const char **argv, const char *prefix)
980980
int from_stdin = 0;
981981
struct option options[] = {
982982
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"),
984984
IGNORE_MISSING),
985985
OPT_BOOLEAN(0, "stdin", &from_stdin,
986-
"read object names from the standard input"),
986+
N_("read object names from the standard input")),
987987
OPT_END()
988988
};
989989
struct notes_tree *t;
@@ -1064,8 +1064,8 @@ int cmd_notes(int argc, const char **argv, const char *prefix)
10641064
int result;
10651065
const char *override_notes_ref = NULL;
10661066
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>")),
10691069
OPT_END()
10701070
};
10711071

0 commit comments

Comments
 (0)