fetch-pack: mark die strings for translation
authorBrandon Williams <bmwill@google.com>
Mon, 23 Jul 2018 17:56:35 +0000 (10:56 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 23 Jul 2018 22:59:40 +0000 (15:59 -0700)
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fetch-pack.c
index 0b4a9f288f973a13ab8c55b420d52143ee1d026d..51abee618196b0a0148e7a1674ee71cbf4c7334e 100644 (file)
@@ -1245,13 +1245,13 @@ static int process_section_header(struct packet_reader *reader,
        int ret;
 
        if (packet_reader_peek(reader) != PACKET_READ_NORMAL)
        int ret;
 
        if (packet_reader_peek(reader) != PACKET_READ_NORMAL)
-               die("error reading section header '%s'", section);
+               die(_("error reading section header '%s'"), section);
 
        ret = !strcmp(reader->line, section);
 
        if (!peek) {
                if (!ret)
 
        ret = !strcmp(reader->line, section);
 
        if (!peek) {
                if (!ret)
-                       die("expected '%s', received '%s'",
+                       die(_("expected '%s', received '%s'"),
                            section, reader->line);
                packet_reader_read(reader);
        }
                            section, reader->line);
                packet_reader_read(reader);
        }
@@ -1289,12 +1289,12 @@ static int process_acks(struct packet_reader *reader, struct oidset *common)
                        continue;
                }
 
                        continue;
                }
 
-               die("unexpected acknowledgment line: '%s'", reader->line);
+               die(_("unexpected acknowledgment line: '%s'"), reader->line);
        }
 
        if (reader->status != PACKET_READ_FLUSH &&
            reader->status != PACKET_READ_DELIM)
        }
 
        if (reader->status != PACKET_READ_FLUSH &&
            reader->status != PACKET_READ_DELIM)
-               die("error processing acks: %d", reader->status);
+               die(_("error processing acks: %d"), reader->status);
 
        /* return 0 if no common, 1 if there are common, or 2 if ready */
        return received_ready ? 2 : (received_ack ? 1 : 0);
 
        /* return 0 if no common, 1 if there are common, or 2 if ready */
        return received_ready ? 2 : (received_ack ? 1 : 0);
@@ -1331,7 +1331,7 @@ static void receive_shallow_info(struct fetch_pack_args *args,
 
        if (reader->status != PACKET_READ_FLUSH &&
            reader->status != PACKET_READ_DELIM)
 
        if (reader->status != PACKET_READ_FLUSH &&
            reader->status != PACKET_READ_DELIM)
-               die("error processing shallow info: %d", reader->status);
+               die(_("error processing shallow info: %d"), reader->status);
 
        setup_alternate_shallow(&shallow_lock, &alternate_shallow_file, NULL);
        args->deepen = 1;
 
        setup_alternate_shallow(&shallow_lock, &alternate_shallow_file, NULL);
        args->deepen = 1;
@@ -1346,7 +1346,7 @@ static void receive_wanted_refs(struct packet_reader *reader, struct ref *refs)
                struct ref *r = NULL;
 
                if (parse_oid_hex(reader->line, &oid, &end) || *end++ != ' ')
                struct ref *r = NULL;
 
                if (parse_oid_hex(reader->line, &oid, &end) || *end++ != ' ')
-                       die("expected wanted-ref, got '%s'", reader->line);
+                       die(_("expected wanted-ref, got '%s'"), reader->line);
 
                for (r = refs; r; r = r->next) {
                        if (!strcmp(end, r->name)) {
 
                for (r = refs; r; r = r->next) {
                        if (!strcmp(end, r->name)) {
@@ -1356,11 +1356,11 @@ static void receive_wanted_refs(struct packet_reader *reader, struct ref *refs)
                }
 
                if (!r)
                }
 
                if (!r)
-                       die("unexpected wanted-ref: '%s'", reader->line);
+                       die(_("unexpected wanted-ref: '%s'"), reader->line);
        }
 
        if (reader->status != PACKET_READ_DELIM)
        }
 
        if (reader->status != PACKET_READ_DELIM)
-               die("error processing wanted refs: %d", reader->status);
+               die(_("error processing wanted refs: %d"), reader->status);
 }
 
 enum fetch_state {
 }
 
 enum fetch_state {