Skip to content

Commit eceff4b

Browse files
committed
Merge branch 'rt/submodule-i18n' into maint
Comments update. * rt/submodule-i18n: submodule.c: mark more strings for translation
2 parents 8a17eb7 + a4ffbbb commit eceff4b

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

submodule.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ void handle_ignore_submodules_arg(struct diff_options *diffopt,
431431
else if (!strcmp(arg, "dirty"))
432432
diffopt->flags.ignore_dirty_submodules = 1;
433433
else if (strcmp(arg, "none"))
434-
die("bad --ignore-submodules argument: %s", arg);
434+
die(_("bad --ignore-submodules argument: %s"), arg);
435435
/*
436436
* Please update _git_status() in git-completion.bash when you
437437
* add new options
@@ -812,9 +812,9 @@ static void collect_changed_submodules_cb(struct diff_queue_struct *q,
812812
submodule = submodule_from_name(me->repo,
813813
commit_oid, name);
814814
if (submodule) {
815-
warning("Submodule in commit %s at path: "
815+
warning(_("Submodule in commit %s at path: "
816816
"'%s' collides with a submodule named "
817-
"the same. Skipping it.",
817+
"the same. Skipping it."),
818818
oid_to_hex(commit_oid), p->two->path);
819819
name = NULL;
820820
}
@@ -844,7 +844,7 @@ static void collect_changed_submodules(struct repository *r,
844844
repo_init_revisions(r, &rev, NULL);
845845
setup_revisions(argv->argc, argv->argv, &rev, NULL);
846846
if (prepare_revision_walk(&rev))
847-
die("revision walk setup failed");
847+
die(_("revision walk setup failed"));
848848

849849
while ((commit = get_revision(&rev))) {
850850
struct rev_info diff_rev;
@@ -992,7 +992,7 @@ static int submodule_needs_pushing(struct repository *r,
992992
cp.out = -1;
993993
cp.dir = path;
994994
if (start_command(&cp))
995-
die("Could not run 'git rev-list <commits> --not --remotes -n 1' command in submodule %s",
995+
die(_("Could not run 'git rev-list <commits> --not --remotes -n 1' command in submodule %s"),
996996
path);
997997
if (strbuf_read(&buf, cp.out, the_hash_algo->hexsz + 1))
998998
needs_pushing = 1;
@@ -1115,7 +1115,7 @@ static void submodule_push_check(const char *path, const char *head,
11151115
* child process.
11161116
*/
11171117
if (run_command(&cp))
1118-
die("process for submodule '%s' failed", path);
1118+
die(_("process for submodule '%s' failed"), path);
11191119
}
11201120

11211121
int push_unpushed_submodules(struct repository *r,
@@ -1155,10 +1155,10 @@ int push_unpushed_submodules(struct repository *r,
11551155
/* Actually push the submodules */
11561156
for (i = 0; i < needs_pushing.nr; i++) {
11571157
const char *path = needs_pushing.items[i].string;
1158-
fprintf(stderr, "Pushing submodule '%s'\n", path);
1158+
fprintf(stderr, _("Pushing submodule '%s'\n"), path);
11591159
if (!push_submodule(path, remote, rs,
11601160
push_options, dry_run)) {
1161-
fprintf(stderr, "Unable to push submodule '%s'\n", path);
1161+
fprintf(stderr, _("Unable to push submodule '%s'\n"), path);
11621162
ret = 0;
11631163
}
11641164
}
@@ -1448,7 +1448,7 @@ static int get_next_submodule(struct child_process *cp,
14481448
prepare_submodule_repo_env_in_gitdir(&cp->env_array);
14491449
cp->git_cmd = 1;
14501450
if (!spf->quiet)
1451-
strbuf_addf(err, "Fetching submodule %s%s\n",
1451+
strbuf_addf(err, _("Fetching submodule %s%s\n"),
14521452
spf->prefix, ce->name);
14531453
argv_array_init(&cp->args);
14541454
argv_array_pushv(&cp->args, spf->args.argv);
@@ -1610,7 +1610,7 @@ int fetch_populated_submodules(struct repository *r,
16101610
goto out;
16111611

16121612
if (repo_read_index(r) < 0)
1613-
die("index file corrupt");
1613+
die(_("index file corrupt"));
16141614

16151615
argv_array_push(&spf.args, "fetch");
16161616
for (i = 0; i < options->argc; i++)
@@ -1665,7 +1665,7 @@ unsigned is_submodule_modified(const char *path, int ignore_untracked)
16651665
cp.out = -1;
16661666
cp.dir = path;
16671667
if (start_command(&cp))
1668-
die("Could not run 'git status --porcelain=2' in submodule %s", path);
1668+
die(_("Could not run 'git status --porcelain=2' in submodule %s"), path);
16691669

16701670
fp = xfdopen(cp.out, "r");
16711671
while (strbuf_getwholeline(&buf, fp, '\n') != EOF) {
@@ -1706,7 +1706,7 @@ unsigned is_submodule_modified(const char *path, int ignore_untracked)
17061706
fclose(fp);
17071707

17081708
if (finish_command(&cp) && !ignore_cp_exit_code)
1709-
die("'git status --porcelain=2' failed in submodule %s", path);
1709+
die(_("'git status --porcelain=2' failed in submodule %s"), path);
17101710

17111711
strbuf_release(&buf);
17121712
return dirty_submodule;
@@ -1841,7 +1841,7 @@ static int submodule_has_dirty_index(const struct submodule *sub)
18411841
cp.no_stdout = 1;
18421842
cp.dir = sub->path;
18431843
if (start_command(&cp))
1844-
die("could not recurse into submodule '%s'", sub->path);
1844+
die(_("could not recurse into submodule '%s'"), sub->path);
18451845

18461846
return finish_command(&cp);
18471847
}
@@ -1862,7 +1862,7 @@ static void submodule_reset_index(const char *path)
18621862
argv_array_push(&cp.args, empty_tree_oid_hex());
18631863

18641864
if (run_command(&cp))
1865-
die("could not reset submodule index");
1865+
die(_("could not reset submodule index"));
18661866
}
18671867

18681868
/**

0 commit comments

Comments
 (0)