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

i18n: git-fetch update_local_ref messages

Translate a "[rejected]" message spotted by Jeff King, and other things in update_local_ref along with it. Reported-by: Jeff King <peff@peff.net> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Feb 22, 2011 at 23:41 UTC f7b3742a6b60d39adbf02258cfc72cb5b9ca8ad5
1 file changed +5 -5
builtin/fetch.c
+5 -5
@@ -279,17 +279,17 @@ static int update_local_ref(struct ref *ref,
279 int r;
280 if (!strncmp(ref->name, "refs/tags/", 10)) {
281 msg = "storing tag";
282 - what = "[new tag]";
282 + what = _("[new tag]");
283 }
284 else {
285 msg = "storing head";
286 - what = "[new branch]";
286 + what = _("[new branch]");
287 }
288
289 r = s_update_ref(msg, ref, 0);
290 sprintf(display, "%c %-*s %-*s -> %s%s", r ? '!' : '*',
291 TRANSPORT_SUMMARY_WIDTH, what, REFCOL_WIDTH, remote, pretty_ref,
292 - r ? " (unable to update local ref)" : "");
292 + r ? _(" (unable to update local ref)") : "");
293 return r;
294 }
295
@@ -302,7 +302,7 @@ static int update_local_ref(struct ref *ref,
302 r = s_update_ref("fast-forward", ref, 1);
303 sprintf(display, "%c %-*s %-*s -> %s%s", r ? '!' : ' ',
304 TRANSPORT_SUMMARY_WIDTH, quickref, REFCOL_WIDTH, remote,
305 - pretty_ref, r ? " (unable to update local ref)" : "");
305 + pretty_ref, r ? _(" (unable to update local ref)") : "");
306 return r;
307 } else if (force || ref->force) {
308 char quickref[84];
@@ -314,7 +314,7 @@ static int update_local_ref(struct ref *ref,
314 sprintf(display, "%c %-*s %-*s -> %s (%s)", r ? '!' : '+',
315 TRANSPORT_SUMMARY_WIDTH, quickref, REFCOL_WIDTH, remote,
316 pretty_ref,
317 - r ? "unable to update local ref" : "forced update");
317 + r ? _("unable to update local ref") : _("forced update"));
318 return r;
319 } else {
320 sprintf(display, "! %-*s %-*s -> %s (non-fast-forward)",