i18n: ident: mark hint for translation
Mark env_hint for translation. Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Vasco Almeida committed
Sep 19, 2016 at 13:08 UTC
166e55e328a5b303031140f758a0463df331777a
1 file changed
+16
-16
ident.c
+16
-16
@@ -331,17 +331,17 @@ person_only:
331
}
332
333
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 \"you@example.com\"\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 \"you@example.com\"\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");
345
346
const char *fmt_ident(const char *name, const char *email,
347
const char *date_str, int flag)
@@ -356,13 +356,13 @@ const char *fmt_ident(const char *name, const char *email,
356
if (!name) {
357
if (strict && ident_use_config_only
358
&& !(ident_config_given & IDENT_NAME_GIVEN)) {
359
- fputs(env_hint, stderr);
359
+ fputs(_(env_hint), stderr);
360
die("no name was given and auto-detection is disabled");
361
}
362
name = ident_default_name();
363
using_default = 1;
364
if (strict && default_name_is_bogus) {
365
- fputs(env_hint, stderr);
365
+ fputs(_(env_hint), stderr);
366
die("unable to auto-detect name (got '%s')", name);
367
}
368
}
@@ -370,7 +370,7 @@ const char *fmt_ident(const char *name, const char *email,
370
struct passwd *pw;
371
if (strict) {
372
if (using_default)
373
- fputs(env_hint, stderr);
373
+ fputs(_(env_hint), stderr);
374
die("empty ident name (for <%s>) not allowed", email);
375
}
376
pw = xgetpwuid_self(NULL);
@@ -381,12 +381,12 @@ const char *fmt_ident(const char *name, const char *email,
381
if (!email) {
382
if (strict && ident_use_config_only
383
&& !(ident_config_given & IDENT_MAIL_GIVEN)) {
384
- fputs(env_hint, stderr);
384
+ fputs(_(env_hint), stderr);
385
die("no email was given and auto-detection is disabled");
386
}
387
email = ident_default_email();
388
if (strict && default_email_is_bogus) {
389
- fputs(env_hint, stderr);
389
+ fputs(_(env_hint), stderr);
390
die("unable to auto-detect email address (got '%s')", email);
391
}
392
}