@matheusbsbs / matheus-bagliano / commits / a4ffbbbb99
Fork 0

submodule.c: mark more strings for translation

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ralf Thielow committed Jan 15, 2020 at 19:07 UTC a4ffbbbb993c8827ee2282605ebb46e36d51880b
1 file changed +14 -14
submodule.c
+14 -14
@@ -431,7 +431,7 @@ void handle_ignore_submodules_arg(struct diff_options *diffopt,
431 else if (!strcmp(arg, "dirty"))
432 diffopt->flags.ignore_dirty_submodules = 1;
433 else if (strcmp(arg, "none"))
434 - die("bad --ignore-submodules argument: %s", arg);
434 + die(_("bad --ignore-submodules argument: %s"), arg);
435 /*
436 * Please update _git_status() in git-completion.bash when you
437 * add new options
@@ -812,9 +812,9 @@ static void collect_changed_submodules_cb(struct diff_queue_struct *q,
812 submodule = submodule_from_name(me->repo,
813 commit_oid, name);
814 if (submodule) {
815 - warning("Submodule in commit %s at path: "
815 + warning(_("Submodule in commit %s at path: "
816 "'%s' collides with a submodule named "
817 - "the same. Skipping it.",
817 + "the same. Skipping it."),
818 oid_to_hex(commit_oid), p->two->path);
819 name = NULL;
820 }
@@ -844,7 +844,7 @@ static void collect_changed_submodules(struct repository *r,
844 repo_init_revisions(r, &rev, NULL);
845 setup_revisions(argv->argc, argv->argv, &rev, NULL);
846 if (prepare_revision_walk(&rev))
847 - die("revision walk setup failed");
847 + die(_("revision walk setup failed"));
848
849 while ((commit = get_revision(&rev))) {
850 struct rev_info diff_rev;
@@ -992,7 +992,7 @@ static int submodule_needs_pushing(struct repository *r,
992 cp.out = -1;
993 cp.dir = path;
994 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"),
996 path);
997 if (strbuf_read(&buf, cp.out, the_hash_algo->hexsz + 1))
998 needs_pushing = 1;
@@ -1115,7 +1115,7 @@ static void submodule_push_check(const char *path, const char *head,
1115 * child process.
1116 */
1117 if (run_command(&cp))
1118 - die("process for submodule '%s' failed", path);
1118 + die(_("process for submodule '%s' failed"), path);
1119 }
1120
1121 int push_unpushed_submodules(struct repository *r,
@@ -1155,10 +1155,10 @@ int push_unpushed_submodules(struct repository *r,
1155 /* Actually push the submodules */
1156 for (i = 0; i < needs_pushing.nr; i++) {
1157 const char *path = needs_pushing.items[i].string;
1158 - fprintf(stderr, "Pushing submodule '%s'\n", path);
1158 + fprintf(stderr, _("Pushing submodule '%s'\n"), path);
1159 if (!push_submodule(path, remote, rs,
1160 push_options, dry_run)) {
1161 - fprintf(stderr, "Unable to push submodule '%s'\n", path);
1161 + fprintf(stderr, _("Unable to push submodule '%s'\n"), path);
1162 ret = 0;
1163 }
1164 }
@@ -1448,7 +1448,7 @@ static int get_next_submodule(struct child_process *cp,
1448 prepare_submodule_repo_env_in_gitdir(&cp->env_array);
1449 cp->git_cmd = 1;
1450 if (!spf->quiet)
1451 - strbuf_addf(err, "Fetching submodule %s%s\n",
1451 + strbuf_addf(err, _("Fetching submodule %s%s\n"),
1452 spf->prefix, ce->name);
1453 argv_array_init(&cp->args);
1454 argv_array_pushv(&cp->args, spf->args.argv);
@@ -1610,7 +1610,7 @@ int fetch_populated_submodules(struct repository *r,
1610 goto out;
1611
1612 if (repo_read_index(r) < 0)
1613 - die("index file corrupt");
1613 + die(_("index file corrupt"));
1614
1615 argv_array_push(&spf.args, "fetch");
1616 for (i = 0; i < options->argc; i++)
@@ -1665,7 +1665,7 @@ unsigned is_submodule_modified(const char *path, int ignore_untracked)
1665 cp.out = -1;
1666 cp.dir = path;
1667 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);
1669
1670 fp = xfdopen(cp.out, "r");
1671 while (strbuf_getwholeline(&buf, fp, '\n') != EOF) {
@@ -1706,7 +1706,7 @@ unsigned is_submodule_modified(const char *path, int ignore_untracked)
1706 fclose(fp);
1707
1708 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);
1710
1711 strbuf_release(&buf);
1712 return dirty_submodule;
@@ -1841,7 +1841,7 @@ static int submodule_has_dirty_index(const struct submodule *sub)
1841 cp.no_stdout = 1;
1842 cp.dir = sub->path;
1843 if (start_command(&cp))
1844 - die("could not recurse into submodule '%s'", sub->path);
1844 + die(_("could not recurse into submodule '%s'"), sub->path);
1845
1846 return finish_command(&cp);
1847 }
@@ -1862,7 +1862,7 @@ static void submodule_reset_index(const char *path)
1862 argv_array_push(&cp.args, empty_tree_oid_hex());
1863
1864 if (run_command(&cp))
1865 - die("could not reset submodule index");
1865 + die(_("could not reset submodule index"));
1866 }
1867
1868 /**