|
8 | 8 | #include "refs.h" |
9 | 9 |
|
10 | 10 | 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>"), |
23 | 23 | NULL |
24 | 24 | }; |
25 | 25 |
|
26 | 26 | static const char * const builtin_remote_add_usage[] = { |
27 | | - "git remote add [<options>] <name> <url>", |
| 27 | + N_("git remote add [<options>] <name> <url>"), |
28 | 28 | NULL |
29 | 29 | }; |
30 | 30 |
|
31 | 31 | static const char * const builtin_remote_rename_usage[] = { |
32 | | - "git remote rename <old> <new>", |
| 32 | + N_("git remote rename <old> <new>"), |
33 | 33 | NULL |
34 | 34 | }; |
35 | 35 |
|
36 | 36 | static const char * const builtin_remote_rm_usage[] = { |
37 | | - "git remote rm <name>", |
| 37 | + N_("git remote rm <name>"), |
38 | 38 | NULL |
39 | 39 | }; |
40 | 40 |
|
41 | 41 | 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>])"), |
43 | 43 | NULL |
44 | 44 | }; |
45 | 45 |
|
46 | 46 | 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>..."), |
49 | 49 | NULL |
50 | 50 | }; |
51 | 51 |
|
52 | 52 | static const char * const builtin_remote_show_usage[] = { |
53 | | - "git remote show [<options>] <name>", |
| 53 | + N_("git remote show [<options>] <name>"), |
54 | 54 | NULL |
55 | 55 | }; |
56 | 56 |
|
57 | 57 | static const char * const builtin_remote_prune_usage[] = { |
58 | | - "git remote prune [<options>] <name>", |
| 58 | + N_("git remote prune [<options>] <name>"), |
59 | 59 | NULL |
60 | 60 | }; |
61 | 61 |
|
62 | 62 | static const char * const builtin_remote_update_usage[] = { |
63 | | - "git remote update [<options>] [<group> | <remote>]...", |
| 63 | + N_("git remote update [<options>] [<group> | <remote>]..."), |
64 | 64 | NULL |
65 | 65 | }; |
66 | 66 |
|
67 | 67 | 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>"), |
71 | 71 | NULL |
72 | 72 | }; |
73 | 73 |
|
@@ -160,17 +160,17 @@ static int add(int argc, const char **argv) |
160 | 160 | int i; |
161 | 161 |
|
162 | 162 | struct option options[] = { |
163 | | - OPT_BOOLEAN('f', "fetch", &fetch, "fetch the remote branches"), |
| 163 | + OPT_BOOLEAN('f', "fetch", &fetch, N_("fetch the remote branches")), |
164 | 164 | 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"), |
166 | 166 | TAGS_SET), |
167 | 167 | 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"), |
174 | 174 | PARSE_OPT_OPTARG, parse_mirror_opt }, |
175 | 175 | OPT_END() |
176 | 176 | }; |
@@ -1088,7 +1088,7 @@ static int show(int argc, const char **argv) |
1088 | 1088 | { |
1089 | 1089 | int no_query = 0, result = 0, query_flag = 0; |
1090 | 1090 | 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")), |
1092 | 1092 | OPT_END() |
1093 | 1093 | }; |
1094 | 1094 | struct ref_states states; |
@@ -1196,9 +1196,9 @@ static int set_head(int argc, const char **argv) |
1196 | 1196 |
|
1197 | 1197 | struct option options[] = { |
1198 | 1198 | 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")), |
1200 | 1200 | OPT_BOOLEAN('d', "delete", &opt_d, |
1201 | | - "delete refs/remotes/<name>/HEAD"), |
| 1201 | + N_("delete refs/remotes/<name>/HEAD")), |
1202 | 1202 | OPT_END() |
1203 | 1203 | }; |
1204 | 1204 | argc = parse_options(argc, argv, NULL, options, builtin_remote_sethead_usage, |
@@ -1250,7 +1250,7 @@ static int prune(int argc, const char **argv) |
1250 | 1250 | { |
1251 | 1251 | int dry_run = 0, result = 0; |
1252 | 1252 | struct option options[] = { |
1253 | | - OPT__DRY_RUN(&dry_run, "dry run"), |
| 1253 | + OPT__DRY_RUN(&dry_run, N_("dry run")), |
1254 | 1254 | OPT_END() |
1255 | 1255 | }; |
1256 | 1256 |
|
@@ -1318,7 +1318,7 @@ static int update(int argc, const char **argv) |
1318 | 1318 | int i, prune = 0; |
1319 | 1319 | struct option options[] = { |
1320 | 1320 | OPT_BOOLEAN('p', "prune", &prune, |
1321 | | - "prune remotes after fetching"), |
| 1321 | + N_("prune remotes after fetching")), |
1322 | 1322 | OPT_END() |
1323 | 1323 | }; |
1324 | 1324 | const char **fetch_argv; |
@@ -1404,7 +1404,7 @@ static int set_branches(int argc, const char **argv) |
1404 | 1404 | { |
1405 | 1405 | int add_mode = 0; |
1406 | 1406 | struct option options[] = { |
1407 | | - OPT_BOOLEAN('\0', "add", &add_mode, "add branch"), |
| 1407 | + OPT_BOOLEAN('\0', "add", &add_mode, N_("add branch")), |
1408 | 1408 | OPT_END() |
1409 | 1409 | }; |
1410 | 1410 |
|
@@ -1433,11 +1433,11 @@ static int set_url(int argc, const char **argv) |
1433 | 1433 | struct strbuf name_buf = STRBUF_INIT; |
1434 | 1434 | struct option options[] = { |
1435 | 1435 | OPT_BOOLEAN('\0', "push", &push_mode, |
1436 | | - "manipulate push URLs"), |
| 1436 | + N_("manipulate push URLs")), |
1437 | 1437 | OPT_BOOLEAN('\0', "add", &add_mode, |
1438 | | - "add URL"), |
| 1438 | + N_("add URL")), |
1439 | 1439 | OPT_BOOLEAN('\0', "delete", &delete_mode, |
1440 | | - "delete URLs"), |
| 1440 | + N_("delete URLs")), |
1441 | 1441 | OPT_END() |
1442 | 1442 | }; |
1443 | 1443 | argc = parse_options(argc, argv, NULL, options, builtin_remote_seturl_usage, |
@@ -1566,7 +1566,7 @@ static int show_all(void) |
1566 | 1566 | int cmd_remote(int argc, const char **argv, const char *prefix) |
1567 | 1567 | { |
1568 | 1568 | 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")), |
1570 | 1570 | OPT_END() |
1571 | 1571 | }; |
1572 | 1572 | int result; |
|
0 commit comments