Skip to content

Commit fbbae14

Browse files
pcloudsgitster
authored andcommitted
i18n: remote: 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 230c6cd commit fbbae14

File tree

1 file changed

+42
-42
lines changed

1 file changed

+42
-42
lines changed

builtin/remote.c

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -8,66 +8,66 @@
88
#include "refs.h"
99

1010
static const char * const builtin_remote_usage[] = {
11-
"git remote [-v | --verbose]",
12-
"git remote add [-t <branch>] [-m <master>] [-f] [--tags|--no-tags] [--mirror=<fetch|push>] <name> <url>",
13-
"git remote rename <old> <new>",
14-
"git remote rm <name>",
15-
"git remote set-head <name> (-a | -d | <branch>)",
16-
"git remote [-v | --verbose] show [-n] <name>",
17-
"git remote prune [-n | --dry-run] <name>",
18-
"git remote [-v | --verbose] update [-p | --prune] [(<group> | <remote>)...]",
19-
"git remote set-branches [--add] <name> <branch>...",
20-
"git remote set-url [--push] <name> <newurl> [<oldurl>]",
21-
"git remote set-url --add <name> <newurl>",
22-
"git remote set-url --delete <name> <url>",
11+
N_("git remote [-v | --verbose]"),
12+
N_("git remote add [-t <branch>] [-m <master>] [-f] [--tags|--no-tags] [--mirror=<fetch|push>] <name> <url>"),
13+
N_("git remote rename <old> <new>"),
14+
N_("git remote rm <name>"),
15+
N_("git remote set-head <name> (-a | -d | <branch>)"),
16+
N_("git remote [-v | --verbose] show [-n] <name>"),
17+
N_("git remote prune [-n | --dry-run] <name>"),
18+
N_("git remote [-v | --verbose] update [-p | --prune] [(<group> | <remote>)...]"),
19+
N_("git remote set-branches [--add] <name> <branch>..."),
20+
N_("git remote set-url [--push] <name> <newurl> [<oldurl>]"),
21+
N_("git remote set-url --add <name> <newurl>"),
22+
N_("git remote set-url --delete <name> <url>"),
2323
NULL
2424
};
2525

2626
static const char * const builtin_remote_add_usage[] = {
27-
"git remote add [<options>] <name> <url>",
27+
N_("git remote add [<options>] <name> <url>"),
2828
NULL
2929
};
3030

3131
static const char * const builtin_remote_rename_usage[] = {
32-
"git remote rename <old> <new>",
32+
N_("git remote rename <old> <new>"),
3333
NULL
3434
};
3535

3636
static const char * const builtin_remote_rm_usage[] = {
37-
"git remote rm <name>",
37+
N_("git remote rm <name>"),
3838
NULL
3939
};
4040

4141
static const char * const builtin_remote_sethead_usage[] = {
42-
"git remote set-head <name> (-a | -d | <branch>])",
42+
N_("git remote set-head <name> (-a | -d | <branch>])"),
4343
NULL
4444
};
4545

4646
static const char * const builtin_remote_setbranches_usage[] = {
47-
"git remote set-branches <name> <branch>...",
48-
"git remote set-branches --add <name> <branch>...",
47+
N_("git remote set-branches <name> <branch>..."),
48+
N_("git remote set-branches --add <name> <branch>..."),
4949
NULL
5050
};
5151

5252
static const char * const builtin_remote_show_usage[] = {
53-
"git remote show [<options>] <name>",
53+
N_("git remote show [<options>] <name>"),
5454
NULL
5555
};
5656

5757
static const char * const builtin_remote_prune_usage[] = {
58-
"git remote prune [<options>] <name>",
58+
N_("git remote prune [<options>] <name>"),
5959
NULL
6060
};
6161

6262
static const char * const builtin_remote_update_usage[] = {
63-
"git remote update [<options>] [<group> | <remote>]...",
63+
N_("git remote update [<options>] [<group> | <remote>]..."),
6464
NULL
6565
};
6666

6767
static const char * const builtin_remote_seturl_usage[] = {
68-
"git remote set-url [--push] <name> <newurl> [<oldurl>]",
69-
"git remote set-url --add <name> <newurl>",
70-
"git remote set-url --delete <name> <url>",
68+
N_("git remote set-url [--push] <name> <newurl> [<oldurl>]"),
69+
N_("git remote set-url --add <name> <newurl>"),
70+
N_("git remote set-url --delete <name> <url>"),
7171
NULL
7272
};
7373

@@ -160,17 +160,17 @@ static int add(int argc, const char **argv)
160160
int i;
161161

162162
struct option options[] = {
163-
OPT_BOOLEAN('f', "fetch", &fetch, "fetch the remote branches"),
163+
OPT_BOOLEAN('f', "fetch", &fetch, N_("fetch the remote branches")),
164164
OPT_SET_INT(0, "tags", &fetch_tags,
165-
"import all tags and associated objects when fetching",
165+
N_("import all tags and associated objects when fetching"),
166166
TAGS_SET),
167167
OPT_SET_INT(0, NULL, &fetch_tags,
168-
"or do not fetch any tag at all (--no-tags)", TAGS_UNSET),
169-
OPT_STRING_LIST('t', "track", &track, "branch",
170-
"branch(es) to track"),
171-
OPT_STRING('m', "master", &master, "branch", "master branch"),
172-
{ OPTION_CALLBACK, 0, "mirror", &mirror, "push|fetch",
173-
"set up remote as a mirror to push to or fetch from",
168+
N_("or do not fetch any tag at all (--no-tags)"), TAGS_UNSET),
169+
OPT_STRING_LIST('t', "track", &track, N_("branch"),
170+
N_("branch(es) to track")),
171+
OPT_STRING('m', "master", &master, N_("branch"), N_("master branch")),
172+
{ OPTION_CALLBACK, 0, "mirror", &mirror, N_("push|fetch"),
173+
N_("set up remote as a mirror to push to or fetch from"),
174174
PARSE_OPT_OPTARG, parse_mirror_opt },
175175
OPT_END()
176176
};
@@ -1088,7 +1088,7 @@ static int show(int argc, const char **argv)
10881088
{
10891089
int no_query = 0, result = 0, query_flag = 0;
10901090
struct option options[] = {
1091-
OPT_BOOLEAN('n', NULL, &no_query, "do not query remotes"),
1091+
OPT_BOOLEAN('n', NULL, &no_query, N_("do not query remotes")),
10921092
OPT_END()
10931093
};
10941094
struct ref_states states;
@@ -1196,9 +1196,9 @@ static int set_head(int argc, const char **argv)
11961196

11971197
struct option options[] = {
11981198
OPT_BOOLEAN('a', "auto", &opt_a,
1199-
"set refs/remotes/<name>/HEAD according to remote"),
1199+
N_("set refs/remotes/<name>/HEAD according to remote")),
12001200
OPT_BOOLEAN('d', "delete", &opt_d,
1201-
"delete refs/remotes/<name>/HEAD"),
1201+
N_("delete refs/remotes/<name>/HEAD")),
12021202
OPT_END()
12031203
};
12041204
argc = parse_options(argc, argv, NULL, options, builtin_remote_sethead_usage,
@@ -1250,7 +1250,7 @@ static int prune(int argc, const char **argv)
12501250
{
12511251
int dry_run = 0, result = 0;
12521252
struct option options[] = {
1253-
OPT__DRY_RUN(&dry_run, "dry run"),
1253+
OPT__DRY_RUN(&dry_run, N_("dry run")),
12541254
OPT_END()
12551255
};
12561256

@@ -1318,7 +1318,7 @@ static int update(int argc, const char **argv)
13181318
int i, prune = 0;
13191319
struct option options[] = {
13201320
OPT_BOOLEAN('p', "prune", &prune,
1321-
"prune remotes after fetching"),
1321+
N_("prune remotes after fetching")),
13221322
OPT_END()
13231323
};
13241324
const char **fetch_argv;
@@ -1404,7 +1404,7 @@ static int set_branches(int argc, const char **argv)
14041404
{
14051405
int add_mode = 0;
14061406
struct option options[] = {
1407-
OPT_BOOLEAN('\0', "add", &add_mode, "add branch"),
1407+
OPT_BOOLEAN('\0', "add", &add_mode, N_("add branch")),
14081408
OPT_END()
14091409
};
14101410

@@ -1433,11 +1433,11 @@ static int set_url(int argc, const char **argv)
14331433
struct strbuf name_buf = STRBUF_INIT;
14341434
struct option options[] = {
14351435
OPT_BOOLEAN('\0', "push", &push_mode,
1436-
"manipulate push URLs"),
1436+
N_("manipulate push URLs")),
14371437
OPT_BOOLEAN('\0', "add", &add_mode,
1438-
"add URL"),
1438+
N_("add URL")),
14391439
OPT_BOOLEAN('\0', "delete", &delete_mode,
1440-
"delete URLs"),
1440+
N_("delete URLs")),
14411441
OPT_END()
14421442
};
14431443
argc = parse_options(argc, argv, NULL, options, builtin_remote_seturl_usage,
@@ -1566,7 +1566,7 @@ static int show_all(void)
15661566
int cmd_remote(int argc, const char **argv, const char *prefix)
15671567
{
15681568
struct option options[] = {
1569-
OPT__VERBOSE(&verbose, "be verbose; must be placed before a subcommand"),
1569+
OPT__VERBOSE(&verbose, N_("be verbose; must be placed before a subcommand")),
15701570
OPT_END()
15711571
};
15721572
int result;

0 commit comments

Comments
 (0)