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 <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Vasco Almeida committed
Apr 9, 2016 at 20:38 UTC
ed47fdf7fa80ae5f93eb708e82c625086f837b3f
1 file changed
+12
-12
unpack-trees.c
+12
-12
@@ -61,21 +61,21 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
61
const char *cmd2 = strcmp(cmd, "checkout") ? cmd : "switch branches";
62
63
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.");
66
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");
68
msgs[ERROR_WOULD_OVERWRITE] = msgs[ERROR_NOT_UPTODATE_FILE] =
69
xstrfmt(msg, cmd, cmd2);
70
71
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");
73
74
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.");
77
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");
79
80
msgs[ERROR_WOULD_LOSE_UNTRACKED_REMOVED] = xstrfmt(msg, "removed", cmd, cmd2);
81
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,
84
* Special case: ERROR_BIND_OVERLAP refers to a pair of paths, we
85
* cannot easily display it as a list.
86
*/
87
- msgs[ERROR_BIND_OVERLAP] = "Entry '%s' overlaps with '%s'. Cannot bind.";
87
+ msgs[ERROR_BIND_OVERLAP] = _("Entry '%s' overlaps with '%s'. Cannot bind.");
88
89
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");
91
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");
93
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");
95
96
opts->show_all_errors = 1;
97
/* rejected paths may not have a static buffer */
@@ -168,7 +168,7 @@ static void display_error_msgs(struct unpack_trees_options *o)
168
string_list_clear(rejects, 0);
169
}
170
if (something_displayed)
171
- fprintf(stderr, "Aborting\n");
171
+ fprintf(stderr, _("Aborting\n"));
172
}
173
174
/*