Re: [PATCH] fetch-pack: mark die strings for translation
On 07/23, Junio C Hamano wrote: > Junio C Hamano writes: > > > Brandon Williams writes: > > > >> Signed-off-by: Brandon Williams > >> --- > >> fetch-pack.c | 16 > >> 1 file changed, 8 insertions(+), 8 deletions(-) > > > > I do think this is a good idea, but what release does this target? > > It does not seem to apply to master@{4.hours.ago}, and I do not > > think a change as trivial like this wants to be taken of a hostage > > of _all_ topics that are in 'next'. > > > > Answering myself, this would come on top of (and would become part > of) bw/ref-in-want topic, I would think. And I am perfectly OK for > this change to be hostage of that topic ;-) haha yes sorry for not mention it, but yes I built it on top of bw/ref-in-want because it was in response to this topic :) -- Brandon Williams
Re: [PATCH] fetch-pack: mark die strings for translation
Junio C Hamano writes: > Brandon Williams writes: > >> Signed-off-by: Brandon Williams >> --- >> fetch-pack.c | 16 >> 1 file changed, 8 insertions(+), 8 deletions(-) > > I do think this is a good idea, but what release does this target? > It does not seem to apply to master@{4.hours.ago}, and I do not > think a change as trivial like this wants to be taken of a hostage > of _all_ topics that are in 'next'. > Answering myself, this would come on top of (and would become part of) bw/ref-in-want topic, I would think. And I am perfectly OK for this change to be hostage of that topic ;-)
Re: [PATCH] fetch-pack: mark die strings for translation
Brandon Williams writes: > Signed-off-by: Brandon Williams > --- > fetch-pack.c | 16 > 1 file changed, 8 insertions(+), 8 deletions(-) I do think this is a good idea, but what release does this target? It does not seem to apply to master@{4.hours.ago}, and I do not think a change as trivial like this wants to be taken of a hostage of _all_ topics that are in 'next'. > diff --git a/fetch-pack.c b/fetch-pack.c > index 0b4a9f288f..51abee6181 100644 > --- a/fetch-pack.c > +++ b/fetch-pack.c > @@ -1245,13 +1245,13 @@ static int process_section_header(struct > packet_reader *reader, > 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) > - die("expected '%s', received '%s'", > + die(_("expected '%s', received '%s'"), > section, reader->line); > packet_reader_read(reader); > } > @@ -1289,12 +1289,12 @@ static int process_acks(struct packet_reader *reader, > struct oidset *common) > 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) > - 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); > @@ -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) > - die("error processing shallow info: %d", reader->status); > + die(_("error processing shallow info: %d"), reader->status); > > setup_alternate_shallow(_lock, _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, , ) || *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)) { > @@ -1356,11 +1356,11 @@ static void receive_wanted_refs(struct packet_reader > *reader, struct ref *refs) > } > > if (!r) > - die("unexpected wanted-ref: '%s'", reader->line); > + die(_("unexpected wanted-ref: '%s'"), reader->line); > } > > 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 {
Re: [PATCH] fetch-pack: mark die strings for translation
Brandon Williams wrote: > Signed-off-by: Brandon Williams > --- > fetch-pack.c | 16 > 1 file changed, 8 insertions(+), 8 deletions(-) Reviewed-by: Jonathan Nieder Thanks.
Re: [PATCH] fetch-pack: mark die strings for translation
On Mon, Jul 23, 2018 at 10:56 AM Brandon Williams wrote: > fetch-pack is listed as a plumbing command, which means its prime consumer is supposedly a machine; But fetch-pack is also used by git-fetch that is invoked by a human, who prefers translations. .. goes reads code... This translates protocol v2 messages, and p0 messages are translated already, so this just aligns the new protocol to the old protocol w.r.t. i18n. Sounds good, Thanks, Stefan [ This message is a gentle hint for better commit messages. ;-) ] > Signed-off-by: Brandon Williams > --- > fetch-pack.c | 16 > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/fetch-pack.c b/fetch-pack.c > index 0b4a9f288f..51abee6181 100644 > --- a/fetch-pack.c > +++ b/fetch-pack.c > @@ -1245,13 +1245,13 @@ static int process_section_header(struct > packet_reader *reader, > 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) > - die("expected '%s', received '%s'", > + die(_("expected '%s', received '%s'"), > section, reader->line); > packet_reader_read(reader); > } > @@ -1289,12 +1289,12 @@ static int process_acks(struct packet_reader *reader, > struct oidset *common) > 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) > - 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); > @@ -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) > - die("error processing shallow info: %d", reader->status); > + die(_("error processing shallow info: %d"), reader->status); > > setup_alternate_shallow(_lock, _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, , ) || *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)) { > @@ -1356,11 +1356,11 @@ static void receive_wanted_refs(struct packet_reader > *reader, struct ref *refs) > } > > if (!r) > - die("unexpected wanted-ref: '%s'", reader->line); > + die(_("unexpected wanted-ref: '%s'"), reader->line); > } > > 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 { > -- > 2.18.0.233.g985f88cf7e-goog >
[PATCH] fetch-pack: mark die strings for translation
Signed-off-by: Brandon Williams --- fetch-pack.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fetch-pack.c b/fetch-pack.c index 0b4a9f288f..51abee6181 100644 --- a/fetch-pack.c +++ b/fetch-pack.c @@ -1245,13 +1245,13 @@ static int process_section_header(struct packet_reader *reader, 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) - die("expected '%s', received '%s'", + die(_("expected '%s', received '%s'"), section, reader->line); packet_reader_read(reader); } @@ -1289,12 +1289,12 @@ static int process_acks(struct packet_reader *reader, struct oidset *common) 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) - 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); @@ -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) - die("error processing shallow info: %d", reader->status); + die(_("error processing shallow info: %d"), reader->status); setup_alternate_shallow(_lock, _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, , ) || *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)) { @@ -1356,11 +1356,11 @@ static void receive_wanted_refs(struct packet_reader *reader, struct ref *refs) } if (!r) - die("unexpected wanted-ref: '%s'", reader->line); + die(_("unexpected wanted-ref: '%s'"), reader->line); } 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 { -- 2.18.0.233.g985f88cf7e-goog