Skip to content

Commit 166e55e

Browse files
vascoolgitster
authored andcommitted
i18n: ident: mark hint for translation
Mark env_hint for translation. Signed-off-by: Vasco Almeida <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a2f05c9 commit 166e55e

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

ident.c

+16-16
Original file line numberDiff line numberDiff line change
@@ -331,17 +331,17 @@ int split_ident_line(struct ident_split *split, const char *line, int len)
331331
}
332332

333333
static const char *env_hint =
334-
"\n"
335-
"*** Please tell me who you are.\n"
336-
"\n"
337-
"Run\n"
338-
"\n"
339-
" git config --global user.email \"[email protected]\"\n"
340-
" git config --global user.name \"Your Name\"\n"
341-
"\n"
342-
"to set your account\'s default identity.\n"
343-
"Omit --global to set the identity only in this repository.\n"
344-
"\n";
334+
N_("\n"
335+
"*** Please tell me who you are.\n"
336+
"\n"
337+
"Run\n"
338+
"\n"
339+
" git config --global user.email \"[email protected]\"\n"
340+
" git config --global user.name \"Your Name\"\n"
341+
"\n"
342+
"to set your account\'s default identity.\n"
343+
"Omit --global to set the identity only in this repository.\n"
344+
"\n");
345345

346346
const char *fmt_ident(const char *name, const char *email,
347347
const char *date_str, int flag)
@@ -356,21 +356,21 @@ const char *fmt_ident(const char *name, const char *email,
356356
if (!name) {
357357
if (strict && ident_use_config_only
358358
&& !(ident_config_given & IDENT_NAME_GIVEN)) {
359-
fputs(env_hint, stderr);
359+
fputs(_(env_hint), stderr);
360360
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) {
365-
fputs(env_hint, stderr);
365+
fputs(_(env_hint), stderr);
366366
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)
373-
fputs(env_hint, stderr);
373+
fputs(_(env_hint), stderr);
374374
die("empty ident name (for <%s>) not allowed", email);
375375
}
376376
pw = xgetpwuid_self(NULL);
@@ -381,12 +381,12 @@ const char *fmt_ident(const char *name, const char *email,
381381
if (!email) {
382382
if (strict && ident_use_config_only
383383
&& !(ident_config_given & IDENT_MAIL_GIVEN)) {
384-
fputs(env_hint, stderr);
384+
fputs(_(env_hint), stderr);
385385
die("no email was given and auto-detection is disabled");
386386
}
387387
email = ident_default_email();
388388
if (strict && default_email_is_bogus) {
389-
fputs(env_hint, stderr);
389+
fputs(_(env_hint), stderr);
390390
die("unable to auto-detect email address (got '%s')", email);
391391
}
392392
}

0 commit comments

Comments
 (0)