Re: [PATCH 11/22] ident.c: mark strings for translation
On Mon, Feb 29, 2016 at 10:34:59AM -0800, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duywrites: > > > Signed-off-by: Nguyễn Thái Ngọc Duy > > --- > > All (or at least most of) these look old ones; even the ones blamed > to 59f92959 (fmt_ident: refactor strictness checks, 2016-02-04) had > original in the same file without _(). > > I'm inclined to say we should do the whole thing post 2.8.0 release > for this file. I guess I'm cc'd as the author of some of these. These all look fine to me (and the other one for credential-*). I'm happy to have them down now or post-2.8.0 (it is really not any work for me, but for the translators). -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 11/22] ident.c: mark strings for translation
Nguyễn Thái Ngọc Duywrites: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- All (or at least most of) these look old ones; even the ones blamed to 59f92959 (fmt_ident: refactor strictness checks, 2016-02-04) had original in the same file without _(). I'm inclined to say we should do the whole thing post 2.8.0 release for this file. > ident.c | 18 +- > 1 file changed, 9 insertions(+), 9 deletions(-) > > diff --git a/ident.c b/ident.c > index 6e12582..367a5dc 100644 > --- a/ident.c > +++ b/ident.c > @@ -75,13 +75,13 @@ static int add_mailname_host(struct strbuf *buf) > mailname = fopen("/etc/mailname", "r"); > if (!mailname) { > if (errno != ENOENT) > - warning("cannot open /etc/mailname: %s", > + warning(_("cannot open /etc/mailname: %s"), > strerror(errno)); > return -1; > } > if (strbuf_getline(, mailname) == EOF) { > if (ferror(mailname)) > - warning("cannot read /etc/mailname: %s", > + warning(_("cannot read /etc/mailname: %s"), > strerror(errno)); > strbuf_release(); > fclose(mailname); > @@ -125,7 +125,7 @@ static void add_domainname(struct strbuf *out, int > *is_bogus) > char buf[1024]; > > if (gethostname(buf, sizeof(buf))) { > - warning("cannot get host name: %s", strerror(errno)); > + warning(_("cannot get host name: %s"), strerror(errno)); > strbuf_addstr(out, "(none)"); > *is_bogus = 1; > return; > @@ -355,18 +355,18 @@ const char *fmt_ident(const char *name, const char > *email, > using_default = 1; > if (strict && default_name_is_bogus) { > fputs(env_hint, stderr); > - die("unable to auto-detect name (got '%s')", > name); > + die(_("unable to auto-detect name (got '%s')"), > name); > } > if (strict && ident_use_config_only > && !(ident_config_given & IDENT_NAME_GIVEN)) > - die("user.useConfigOnly set but no name given"); > + die(_("user.useConfigOnly set but no name > given")); > } > if (!*name) { > struct passwd *pw; > if (strict) { > if (using_default) > fputs(env_hint, stderr); > - die("empty ident name (for <%s>) not allowed", > email); > + die(_("empty ident name (for <%s>) not > allowed"), email); > } > pw = xgetpwuid_self(NULL); > name = pw->pw_name; > @@ -377,11 +377,11 @@ const char *fmt_ident(const char *name, const char > *email, > email = ident_default_email(); > if (strict && default_email_is_bogus) { > fputs(env_hint, stderr); > - die("unable to auto-detect email address (got '%s')", > email); > + die(_("unable to auto-detect email address (got > '%s')"), email); > } > if (strict && ident_use_config_only > && !(ident_config_given & IDENT_MAIL_GIVEN)) > - die("user.useConfigOnly set but no mail given"); > + die(_("user.useConfigOnly set but no mail given")); > } > > strbuf_reset(); > @@ -396,7 +396,7 @@ const char *fmt_ident(const char *name, const char *email, > strbuf_addch(, ' '); > if (date_str && date_str[0]) { > if (parse_date(date_str, ) < 0) > - die("invalid date format: %s", date_str); > + die(_("invalid date format: %s"), date_str); > } > else > strbuf_addstr(, ident_default_date()); -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 11/22] ident.c: mark strings for translation
Signed-off-by: Nguyễn Thái Ngọc Duy--- ident.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ident.c b/ident.c index 6e12582..367a5dc 100644 --- a/ident.c +++ b/ident.c @@ -75,13 +75,13 @@ static int add_mailname_host(struct strbuf *buf) mailname = fopen("/etc/mailname", "r"); if (!mailname) { if (errno != ENOENT) - warning("cannot open /etc/mailname: %s", + warning(_("cannot open /etc/mailname: %s"), strerror(errno)); return -1; } if (strbuf_getline(, mailname) == EOF) { if (ferror(mailname)) - warning("cannot read /etc/mailname: %s", + warning(_("cannot read /etc/mailname: %s"), strerror(errno)); strbuf_release(); fclose(mailname); @@ -125,7 +125,7 @@ static void add_domainname(struct strbuf *out, int *is_bogus) char buf[1024]; if (gethostname(buf, sizeof(buf))) { - warning("cannot get host name: %s", strerror(errno)); + warning(_("cannot get host name: %s"), strerror(errno)); strbuf_addstr(out, "(none)"); *is_bogus = 1; return; @@ -355,18 +355,18 @@ const char *fmt_ident(const char *name, const char *email, using_default = 1; if (strict && default_name_is_bogus) { fputs(env_hint, stderr); - die("unable to auto-detect name (got '%s')", name); + die(_("unable to auto-detect name (got '%s')"), name); } if (strict && ident_use_config_only && !(ident_config_given & IDENT_NAME_GIVEN)) - die("user.useConfigOnly set but no name given"); + die(_("user.useConfigOnly set but no name given")); } if (!*name) { struct passwd *pw; if (strict) { if (using_default) fputs(env_hint, stderr); - die("empty ident name (for <%s>) not allowed", email); + die(_("empty ident name (for <%s>) not allowed"), email); } pw = xgetpwuid_self(NULL); name = pw->pw_name; @@ -377,11 +377,11 @@ const char *fmt_ident(const char *name, const char *email, email = ident_default_email(); if (strict && default_email_is_bogus) { fputs(env_hint, stderr); - die("unable to auto-detect email address (got '%s')", email); + die(_("unable to auto-detect email address (got '%s')"), email); } if (strict && ident_use_config_only && !(ident_config_given & IDENT_MAIL_GIVEN)) - die("user.useConfigOnly set but no mail given"); + die(_("user.useConfigOnly set but no mail given")); } strbuf_reset(); @@ -396,7 +396,7 @@ const char *fmt_ident(const char *name, const char *email, strbuf_addch(, ' '); if (date_str && date_str[0]) { if (parse_date(date_str, ) < 0) - die("invalid date format: %s", date_str); + die(_("invalid date format: %s"), date_str); } else strbuf_addstr(, ident_default_date()); -- 2.8.0.rc0.205.g7ec8cf1 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html