Skip to content

Commit ed47fdf

Browse files
vascoolgitster
authored andcommitted
i18n: unpack-trees: mark strings for translation
Mark strings seen by the user inside setup_unpack_trees_porcelain() and display_error_msgs() functions for translation. Signed-off-by: Vasco Almeida <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ab86885 commit ed47fdf

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

unpack-trees.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,21 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
6161
const char *cmd2 = strcmp(cmd, "checkout") ? cmd : "switch branches";
6262

6363
if (advice_commit_before_merge)
64-
msg = "Your local changes to the following files would be overwritten by %s:\n%%s"
65-
"Please, commit your changes or stash them before you can %s.";
64+
msg = _("Your local changes to the following files would be overwritten by %s:\n%%s"
65+
"Please, commit your changes or stash them before you can %s.");
6666
else
67-
msg = "Your local changes to the following files would be overwritten by %s:\n%%s";
67+
msg = _("Your local changes to the following files would be overwritten by %s:\n%%s");
6868
msgs[ERROR_WOULD_OVERWRITE] = msgs[ERROR_NOT_UPTODATE_FILE] =
6969
xstrfmt(msg, cmd, cmd2);
7070

7171
msgs[ERROR_NOT_UPTODATE_DIR] =
72-
"Updating the following directories would lose untracked files in it:\n%s";
72+
_("Updating the following directories would lose untracked files in it:\n%s");
7373

7474
if (advice_commit_before_merge)
75-
msg = "The following untracked working tree files would be %s by %s:\n%%s"
76-
"Please move or remove them before you can %s.";
75+
msg = _("The following untracked working tree files would be %s by %s:\n%%s"
76+
"Please move or remove them before you can %s.");
7777
else
78-
msg = "The following untracked working tree files would be %s by %s:\n%%s";
78+
msg = _("The following untracked working tree files would be %s by %s:\n%%s");
7979

8080
msgs[ERROR_WOULD_LOSE_UNTRACKED_REMOVED] = xstrfmt(msg, "removed", cmd, cmd2);
8181
msgs[ERROR_WOULD_LOSE_UNTRACKED_OVERWRITTEN] = xstrfmt(msg, "overwritten", cmd, cmd2);
@@ -84,14 +84,14 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
8484
* Special case: ERROR_BIND_OVERLAP refers to a pair of paths, we
8585
* cannot easily display it as a list.
8686
*/
87-
msgs[ERROR_BIND_OVERLAP] = "Entry '%s' overlaps with '%s'. Cannot bind.";
87+
msgs[ERROR_BIND_OVERLAP] = _("Entry '%s' overlaps with '%s'. Cannot bind.");
8888

8989
msgs[ERROR_SPARSE_NOT_UPTODATE_FILE] =
90-
"Cannot update sparse checkout: the following entries are not up-to-date:\n%s";
90+
_("Cannot update sparse checkout: the following entries are not up-to-date:\n%s");
9191
msgs[ERROR_WOULD_LOSE_ORPHANED_OVERWRITTEN] =
92-
"The following Working tree files would be overwritten by sparse checkout update:\n%s";
92+
_("The following Working tree files would be overwritten by sparse checkout update:\n%s");
9393
msgs[ERROR_WOULD_LOSE_ORPHANED_REMOVED] =
94-
"The following Working tree files would be removed by sparse checkout update:\n%s";
94+
_("The following Working tree files would be removed by sparse checkout update:\n%s");
9595

9696
opts->show_all_errors = 1;
9797
/* rejected paths may not have a static buffer */
@@ -168,7 +168,7 @@ static void display_error_msgs(struct unpack_trees_options *o)
168168
string_list_clear(rejects, 0);
169169
}
170170
if (something_displayed)
171-
fprintf(stderr, "Aborting\n");
171+
fprintf(stderr, _("Aborting\n"));
172172
}
173173

174174
/*

0 commit comments

Comments
 (0)