Skip to content

Commit 68e39e4

Browse files
pcloudsgitster
authored andcommitted
transport.c: mark more strings for translation
Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 259328b commit 68e39e4

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

transport.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ static struct ref *get_refs_from_bundle(struct transport *transport,
139139
close(data->fd);
140140
data->fd = read_bundle_header(transport->url, &data->header);
141141
if (data->fd < 0)
142-
die("could not read bundle '%s'", transport->url);
142+
die(_("could not read bundle '%s'"), transport->url);
143143
for (i = 0; i < data->header.references.nr; i++) {
144144
struct ref_list_entry *e = data->header.references.list + i;
145145
struct ref *ref = alloc_ref(e->name);
@@ -654,7 +654,7 @@ static int git_transport_push(struct transport *transport, struct ref *remote_re
654654

655655
switch (data->version) {
656656
case protocol_v2:
657-
die("support for protocol v2 not implemented yet");
657+
die(_("support for protocol v2 not implemented yet"));
658658
break;
659659
case protocol_v1:
660660
case protocol_v0:
@@ -780,7 +780,7 @@ static enum protocol_allow_config parse_protocol_config(const char *key,
780780
else if (!strcasecmp(value, "user"))
781781
return PROTOCOL_ALLOW_USER_ONLY;
782782

783-
die("unknown value for config '%s': %s", key, value);
783+
die(_("unknown value for config '%s': %s"), key, value);
784784
}
785785

786786
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)
846846
void transport_check_allowed(const char *type)
847847
{
848848
if (!is_transport_allowed(type, -1))
849-
die("transport '%s' not allowed", type);
849+
die(_("transport '%s' not allowed"), type);
850850
}
851851

852852
static struct transport_vtable bundle_vtable = {
@@ -898,7 +898,7 @@ struct transport *transport_get(struct remote *remote, const char *url)
898898
if (helper) {
899899
transport_helper_init(ret, helper);
900900
} else if (starts_with(url, "rsync:")) {
901-
die("git-over-rsync is no longer supported");
901+
die(_("git-over-rsync is no longer supported"));
902902
} else if (url_is_local_not_ssh(url) && is_file(url) && is_bundle(url, 1)) {
903903
struct bundle_transport_data *data = xcalloc(1, sizeof(*data));
904904
transport_check_allowed("file");
@@ -1143,7 +1143,7 @@ int transport_push(struct transport *transport,
11431143
transport->push_options,
11441144
pretend)) {
11451145
oid_array_clear(&commits);
1146-
die("failed to push all needed submodules!");
1146+
die(_("failed to push all needed submodules"));
11471147
}
11481148
oid_array_clear(&commits);
11491149
}
@@ -1265,7 +1265,7 @@ int transport_connect(struct transport *transport, const char *name,
12651265
if (transport->vtable->connect)
12661266
return transport->vtable->connect(transport, name, exec, fd);
12671267
else
1268-
die("operation not supported by protocol");
1268+
die(_("operation not supported by protocol"));
12691269
}
12701270

12711271
int transport_disconnect(struct transport *transport)
@@ -1347,7 +1347,7 @@ static void read_alternate_refs(const char *path,
13471347

13481348
if (get_oid_hex(line.buf, &oid) ||
13491349
line.buf[GIT_SHA1_HEXSZ] != ' ') {
1350-
warning("invalid line while parsing alternate refs: %s",
1350+
warning(_("invalid line while parsing alternate refs: %s"),
13511351
line.buf);
13521352
break;
13531353
}

0 commit comments

Comments
 (0)