Skip to content

Commit de37393

Browse files
pcloudsgitster
authored andcommitted
i18n: apply: mark parseopt strings for translation
Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 54e6dc7 commit de37393

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

builtin/apply.c

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static const char *fake_ancestor;
5050
static int line_termination = '\n';
5151
static unsigned int p_context = UINT_MAX;
5252
static const char * const apply_usage[] = {
53-
"git apply [options] [<patch>...]",
53+
N_("git apply [options] [<patch>...]"),
5454
NULL
5555
};
5656

@@ -3952,66 +3952,66 @@ int cmd_apply(int argc, const char **argv, const char *prefix_)
39523952
const char *whitespace_option = NULL;
39533953

39543954
struct option builtin_apply_options[] = {
3955-
{ OPTION_CALLBACK, 0, "exclude", NULL, "path",
3956-
"don't apply changes matching the given path",
3955+
{ OPTION_CALLBACK, 0, "exclude", NULL, N_("path"),
3956+
N_("don't apply changes matching the given path"),
39573957
0, option_parse_exclude },
3958-
{ OPTION_CALLBACK, 0, "include", NULL, "path",
3959-
"apply changes matching the given path",
3958+
{ OPTION_CALLBACK, 0, "include", NULL, N_("path"),
3959+
N_("apply changes matching the given path"),
39603960
0, option_parse_include },
3961-
{ OPTION_CALLBACK, 'p', NULL, NULL, "num",
3962-
"remove <num> leading slashes from traditional diff paths",
3961+
{ OPTION_CALLBACK, 'p', NULL, NULL, N_("num"),
3962+
N_("remove <num> leading slashes from traditional diff paths"),
39633963
0, option_parse_p },
39643964
OPT_BOOLEAN(0, "no-add", &no_add,
3965-
"ignore additions made by the patch"),
3965+
N_("ignore additions made by the patch")),
39663966
OPT_BOOLEAN(0, "stat", &diffstat,
3967-
"instead of applying the patch, output diffstat for the input"),
3967+
N_("instead of applying the patch, output diffstat for the input")),
39683968
OPT_NOOP_NOARG(0, "allow-binary-replacement"),
39693969
OPT_NOOP_NOARG(0, "binary"),
39703970
OPT_BOOLEAN(0, "numstat", &numstat,
3971-
"shows number of added and deleted lines in decimal notation"),
3971+
N_("shows number of added and deleted lines in decimal notation")),
39723972
OPT_BOOLEAN(0, "summary", &summary,
3973-
"instead of applying the patch, output a summary for the input"),
3973+
N_("instead of applying the patch, output a summary for the input")),
39743974
OPT_BOOLEAN(0, "check", &check,
3975-
"instead of applying the patch, see if the patch is applicable"),
3975+
N_("instead of applying the patch, see if the patch is applicable")),
39763976
OPT_BOOLEAN(0, "index", &check_index,
3977-
"make sure the patch is applicable to the current index"),
3977+
N_("make sure the patch is applicable to the current index")),
39783978
OPT_BOOLEAN(0, "cached", &cached,
3979-
"apply a patch without touching the working tree"),
3979+
N_("apply a patch without touching the working tree")),
39803980
OPT_BOOLEAN(0, "apply", &force_apply,
3981-
"also apply the patch (use with --stat/--summary/--check)"),
3981+
N_("also apply the patch (use with --stat/--summary/--check)")),
39823982
OPT_FILENAME(0, "build-fake-ancestor", &fake_ancestor,
3983-
"build a temporary index based on embedded index information"),
3983+
N_("build a temporary index based on embedded index information")),
39843984
{ OPTION_CALLBACK, 'z', NULL, NULL, NULL,
3985-
"paths are separated with NUL character",
3985+
N_("paths are separated with NUL character"),
39863986
PARSE_OPT_NOARG, option_parse_z },
39873987
OPT_INTEGER('C', NULL, &p_context,
3988-
"ensure at least <n> lines of context match"),
3989-
{ OPTION_CALLBACK, 0, "whitespace", &whitespace_option, "action",
3990-
"detect new or modified lines that have whitespace errors",
3988+
N_("ensure at least <n> lines of context match")),
3989+
{ OPTION_CALLBACK, 0, "whitespace", &whitespace_option, N_("action"),
3990+
N_("detect new or modified lines that have whitespace errors"),
39913991
0, option_parse_whitespace },
39923992
{ OPTION_CALLBACK, 0, "ignore-space-change", NULL, NULL,
3993-
"ignore changes in whitespace when finding context",
3993+
N_("ignore changes in whitespace when finding context"),
39943994
PARSE_OPT_NOARG, option_parse_space_change },
39953995
{ OPTION_CALLBACK, 0, "ignore-whitespace", NULL, NULL,
3996-
"ignore changes in whitespace when finding context",
3996+
N_("ignore changes in whitespace when finding context"),
39973997
PARSE_OPT_NOARG, option_parse_space_change },
39983998
OPT_BOOLEAN('R', "reverse", &apply_in_reverse,
3999-
"apply the patch in reverse"),
3999+
N_("apply the patch in reverse")),
40004000
OPT_BOOLEAN(0, "unidiff-zero", &unidiff_zero,
4001-
"don't expect at least one line of context"),
4001+
N_("don't expect at least one line of context")),
40024002
OPT_BOOLEAN(0, "reject", &apply_with_reject,
4003-
"leave the rejected hunks in corresponding *.rej files"),
4003+
N_("leave the rejected hunks in corresponding *.rej files")),
40044004
OPT_BOOLEAN(0, "allow-overlap", &allow_overlap,
4005-
"allow overlapping hunks"),
4006-
OPT__VERBOSE(&apply_verbosely, "be verbose"),
4005+
N_("allow overlapping hunks")),
4006+
OPT__VERBOSE(&apply_verbosely, N_("be verbose")),
40074007
OPT_BIT(0, "inaccurate-eof", &options,
4008-
"tolerate incorrectly detected missing new-line at the end of file",
4008+
N_("tolerate incorrectly detected missing new-line at the end of file"),
40094009
INACCURATE_EOF),
40104010
OPT_BIT(0, "recount", &options,
4011-
"do not trust the line counts in the hunk headers",
4011+
N_("do not trust the line counts in the hunk headers"),
40124012
RECOUNT),
4013-
{ OPTION_CALLBACK, 0, "directory", NULL, "root",
4014-
"prepend <root> to all filenames",
4013+
{ OPTION_CALLBACK, 0, "directory", NULL, N_("root"),
4014+
N_("prepend <root> to all filenames"),
40154015
0, option_parse_directory },
40164016
OPT_END()
40174017
};

0 commit comments

Comments
 (0)