Skip to content

Commit afb6c30

Browse files
peffgitster
authored andcommitted
ident: mark error messages for translation
We already translate the big "please tell me who you are" hint, but missed the individual error messages that go with it. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3b9e3c2 commit afb6c30

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ident.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -357,21 +357,21 @@ const char *fmt_ident(const char *name, const char *email,
357357
if (strict && ident_use_config_only
358358
&& !(ident_config_given & IDENT_NAME_GIVEN)) {
359359
fputs(_(env_hint), stderr);
360-
die("no name was given and auto-detection is disabled");
360+
die(_("no name was given and auto-detection is disabled"));
361361
}
362362
name = ident_default_name();
363363
using_default = 1;
364364
if (strict && default_name_is_bogus) {
365365
fputs(_(env_hint), stderr);
366-
die("unable to auto-detect name (got '%s')", name);
366+
die(_("unable to auto-detect name (got '%s')"), name);
367367
}
368368
}
369369
if (!*name) {
370370
struct passwd *pw;
371371
if (strict) {
372372
if (using_default)
373373
fputs(_(env_hint), stderr);
374-
die("empty ident name (for <%s>) not allowed", email);
374+
die(_("empty ident name (for <%s>) not allowed"), email);
375375
}
376376
pw = xgetpwuid_self(NULL);
377377
name = pw->pw_name;
@@ -382,12 +382,12 @@ const char *fmt_ident(const char *name, const char *email,
382382
if (strict && ident_use_config_only
383383
&& !(ident_config_given & IDENT_MAIL_GIVEN)) {
384384
fputs(_(env_hint), stderr);
385-
die("no email was given and auto-detection is disabled");
385+
die(_("no email was given and auto-detection is disabled"));
386386
}
387387
email = ident_default_email();
388388
if (strict && default_email_is_bogus) {
389389
fputs(_(env_hint), stderr);
390-
die("unable to auto-detect email address (got '%s')", email);
390+
die(_("unable to auto-detect email address (got '%s')"), email);
391391
}
392392
}
393393

@@ -403,7 +403,7 @@ const char *fmt_ident(const char *name, const char *email,
403403
strbuf_addch(&ident, ' ');
404404
if (date_str && date_str[0]) {
405405
if (parse_date(date_str, &ident) < 0)
406-
die("invalid date format: %s", date_str);
406+
die(_("invalid date format: %s"), date_str);
407407
}
408408
else
409409
strbuf_addstr(&ident, ident_default_date());

0 commit comments

Comments
 (0)