transport.c: mark more strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nguyễn Thái Ngọc Duy committed Jul 21, 2018 at 09:49 UTC 68e39e41009d5a4d0b75f33ef95255ace335a83b
1 file changed +8 -8
transport.c
+8 -8
@@ -139,7 +139,7 @@ static struct ref *get_refs_from_bundle(struct transport *transport,
139 close(data->fd);
140 data->fd = read_bundle_header(transport->url, &data->header);
141 if (data->fd < 0)
142 - die("could not read bundle '%s'", transport->url);
142 + die(_("could not read bundle '%s'"), transport->url);
143 for (i = 0; i < data->header.references.nr; i++) {
144 struct ref_list_entry *e = data->header.references.list + i;
145 struct ref *ref = alloc_ref(e->name);
@@ -654,7 +654,7 @@ static int git_transport_push(struct transport *transport, struct ref *remote_re
654
655 switch (data->version) {
656 case protocol_v2:
657 - die("support for protocol v2 not implemented yet");
657 + die(_("support for protocol v2 not implemented yet"));
658 break;
659 case protocol_v1:
660 case protocol_v0:
@@ -780,7 +780,7 @@ static enum protocol_allow_config parse_protocol_config(const char *key,
780 else if (!strcasecmp(value, "user"))
781 return PROTOCOL_ALLOW_USER_ONLY;
782
783 - die("unknown value for config '%s': %s", key, value);
783 + die(_("unknown value for config '%s': %s"), key, value);
784 }
785
786 static enum protocol_allow_config get_protocol_config(const char *type)
@@ -846,7 +846,7 @@ int is_transport_allowed(const char *type, int from_user)
846 void transport_check_allowed(const char *type)
847 {
848 if (!is_transport_allowed(type, -1))
849 - die("transport '%s' not allowed", type);
849 + die(_("transport '%s' not allowed"), type);
850 }
851
852 static struct transport_vtable bundle_vtable = {
@@ -898,7 +898,7 @@ struct transport *transport_get(struct remote *remote, const char *url)
898 if (helper) {
899 transport_helper_init(ret, helper);
900 } else if (starts_with(url, "rsync:")) {
901 - die("git-over-rsync is no longer supported");
901 + die(_("git-over-rsync is no longer supported"));
902 } else if (url_is_local_not_ssh(url) && is_file(url) && is_bundle(url, 1)) {
903 struct bundle_transport_data *data = xcalloc(1, sizeof(*data));
904 transport_check_allowed("file");
@@ -1143,7 +1143,7 @@ int transport_push(struct transport *transport,
1143 transport->push_options,
1144 pretend)) {
1145 oid_array_clear(&commits);
1146 - die("failed to push all needed submodules!");
1146 + die(_("failed to push all needed submodules"));
1147 }
1148 oid_array_clear(&commits);
1149 }
@@ -1265,7 +1265,7 @@ int transport_connect(struct transport *transport, const char *name,
1265 if (transport->vtable->connect)
1266 return transport->vtable->connect(transport, name, exec, fd);
1267 else
1268 - die("operation not supported by protocol");
1268 + die(_("operation not supported by protocol"));
1269 }
1270
1271 int transport_disconnect(struct transport *transport)
@@ -1347,7 +1347,7 @@ static void read_alternate_refs(const char *path,
1347
1348 if (get_oid_hex(line.buf, &oid) ||
1349 line.buf[GIT_SHA1_HEXSZ] != ' ') {
1350 - warning("invalid line while parsing alternate refs: %s",
1350 + warning(_("invalid line while parsing alternate refs: %s"),
1351 line.buf);
1352 break;
1353 }