i18n: revert, cherry-pick: 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
a3b26dc78d877e7fdbd8c7b8f09e71762723021e
1 file changed
+18
-18
builtin/revert.c
+18
-18
@@ -19,14 +19,14 @@
19
*/
20
21
static const char * const revert_usage[] = {
22
- "git revert [options] <commit-ish>",
23
- "git revert <subcommand>",
22
+ N_("git revert [options] <commit-ish>"),
23
+ N_("git revert <subcommand>"),
24
NULL
25
};
26
27
static const char * const cherry_pick_usage[] = {
28
- "git cherry-pick [options] <commit-ish>",
29
- "git cherry-pick <subcommand>",
28
+ N_("git cherry-pick [options] <commit-ish>"),
29
+ N_("git cherry-pick <subcommand>"),
30
NULL
31
};
32
@@ -100,18 +100,18 @@ static void parse_args(int argc, const char **argv, struct replay_opts *opts)
100
int contin = 0;
101
int rollback = 0;
102
struct option options[] = {
103
- OPT_BOOLEAN(0, "quit", &remove_state, "end revert or cherry-pick sequence"),
104
- OPT_BOOLEAN(0, "continue", &contin, "resume revert or cherry-pick sequence"),
105
- OPT_BOOLEAN(0, "abort", &rollback, "cancel revert or cherry-pick sequence"),
106
- OPT_BOOLEAN('n', "no-commit", &opts->no_commit, "don't automatically commit"),
107
- OPT_BOOLEAN('e', "edit", &opts->edit, "edit the commit message"),
103
+ OPT_BOOLEAN(0, "quit", &remove_state, N_("end revert or cherry-pick sequence")),
104
+ OPT_BOOLEAN(0, "continue", &contin, N_("resume revert or cherry-pick sequence")),
105
+ OPT_BOOLEAN(0, "abort", &rollback, N_("cancel revert or cherry-pick sequence")),
106
+ OPT_BOOLEAN('n', "no-commit", &opts->no_commit, N_("don't automatically commit")),
107
+ OPT_BOOLEAN('e', "edit", &opts->edit, N_("edit the commit message")),
108
OPT_NOOP_NOARG('r', NULL),
109
- OPT_BOOLEAN('s', "signoff", &opts->signoff, "add Signed-off-by:"),
110
- OPT_INTEGER('m', "mainline", &opts->mainline, "parent number"),
109
+ OPT_BOOLEAN('s', "signoff", &opts->signoff, N_("add Signed-off-by:")),
110
+ OPT_INTEGER('m', "mainline", &opts->mainline, N_("parent number")),
111
OPT_RERERE_AUTOUPDATE(&opts->allow_rerere_auto),
112
- OPT_STRING(0, "strategy", &opts->strategy, "strategy", "merge strategy"),
113
- OPT_CALLBACK('X', "strategy-option", &opts, "option",
114
- "option for merge strategy", option_parse_x),
112
+ OPT_STRING(0, "strategy", &opts->strategy, N_("strategy"), N_("merge strategy")),
113
+ OPT_CALLBACK('X', "strategy-option", &opts, N_("option"),
114
+ N_("option for merge strategy"), option_parse_x),
115
OPT_END(),
116
OPT_END(),
117
OPT_END(),
@@ -121,10 +121,10 @@ static void parse_args(int argc, const char **argv, struct replay_opts *opts)
121
122
if (opts->action == REPLAY_PICK) {
123
struct option cp_extra[] = {
124
- OPT_BOOLEAN('x', NULL, &opts->record_origin, "append commit name"),
125
- OPT_BOOLEAN(0, "ff", &opts->allow_ff, "allow fast-forward"),
126
- OPT_BOOLEAN(0, "allow-empty", &opts->allow_empty, "preserve initially empty commits"),
127
- OPT_BOOLEAN(0, "keep-redundant-commits", &opts->keep_redundant_commits, "keep redundant, empty commits"),
124
+ OPT_BOOLEAN('x', NULL, &opts->record_origin, N_("append commit name")),
125
+ OPT_BOOLEAN(0, "ff", &opts->allow_ff, N_("allow fast-forward")),
126
+ OPT_BOOLEAN(0, "allow-empty", &opts->allow_empty, N_("preserve initially empty commits")),
127
+ OPT_BOOLEAN(0, "keep-redundant-commits", &opts->keep_redundant_commits, N_("keep redundant, empty commits")),
128
OPT_END(),
129
};
130
if (parse_options_concat(options, ARRAY_SIZE(options), cp_extra))