mirror of
https://github.com/git/git.git
synced 2024-10-28 12:59:41 +01:00
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>
This commit is contained in:
parent
a2f05c9454
commit
166e55e328
1 changed files with 16 additions and 16 deletions
32
ident.c
32
ident.c
|
@ -331,17 +331,17 @@ int split_ident_line(struct ident_split *split, const char *line, int len)
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *env_hint =
|
static const char *env_hint =
|
||||||
"\n"
|
N_("\n"
|
||||||
"*** Please tell me who you are.\n"
|
"*** Please tell me who you are.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Run\n"
|
"Run\n"
|
||||||
"\n"
|
"\n"
|
||||||
" git config --global user.email \"you@example.com\"\n"
|
" git config --global user.email \"you@example.com\"\n"
|
||||||
" git config --global user.name \"Your Name\"\n"
|
" git config --global user.name \"Your Name\"\n"
|
||||||
"\n"
|
"\n"
|
||||||
"to set your account\'s default identity.\n"
|
"to set your account\'s default identity.\n"
|
||||||
"Omit --global to set the identity only in this repository.\n"
|
"Omit --global to set the identity only in this repository.\n"
|
||||||
"\n";
|
"\n");
|
||||||
|
|
||||||
const char *fmt_ident(const char *name, const char *email,
|
const char *fmt_ident(const char *name, const char *email,
|
||||||
const char *date_str, int flag)
|
const char *date_str, int flag)
|
||||||
|
@ -356,13 +356,13 @@ const char *fmt_ident(const char *name, const char *email,
|
||||||
if (!name) {
|
if (!name) {
|
||||||
if (strict && ident_use_config_only
|
if (strict && ident_use_config_only
|
||||||
&& !(ident_config_given & IDENT_NAME_GIVEN)) {
|
&& !(ident_config_given & IDENT_NAME_GIVEN)) {
|
||||||
fputs(env_hint, stderr);
|
fputs(_(env_hint), stderr);
|
||||||
die("no name was given and auto-detection is disabled");
|
die("no name was given and auto-detection is disabled");
|
||||||
}
|
}
|
||||||
name = ident_default_name();
|
name = ident_default_name();
|
||||||
using_default = 1;
|
using_default = 1;
|
||||||
if (strict && default_name_is_bogus) {
|
if (strict && default_name_is_bogus) {
|
||||||
fputs(env_hint, stderr);
|
fputs(_(env_hint), stderr);
|
||||||
die("unable to auto-detect name (got '%s')", name);
|
die("unable to auto-detect name (got '%s')", name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -370,7 +370,7 @@ const char *fmt_ident(const char *name, const char *email,
|
||||||
struct passwd *pw;
|
struct passwd *pw;
|
||||||
if (strict) {
|
if (strict) {
|
||||||
if (using_default)
|
if (using_default)
|
||||||
fputs(env_hint, stderr);
|
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);
|
pw = xgetpwuid_self(NULL);
|
||||||
|
@ -381,12 +381,12 @@ const char *fmt_ident(const char *name, const char *email,
|
||||||
if (!email) {
|
if (!email) {
|
||||||
if (strict && ident_use_config_only
|
if (strict && ident_use_config_only
|
||||||
&& !(ident_config_given & IDENT_MAIL_GIVEN)) {
|
&& !(ident_config_given & IDENT_MAIL_GIVEN)) {
|
||||||
fputs(env_hint, stderr);
|
fputs(_(env_hint), stderr);
|
||||||
die("no email was given and auto-detection is disabled");
|
die("no email was given and auto-detection is disabled");
|
||||||
}
|
}
|
||||||
email = ident_default_email();
|
email = ident_default_email();
|
||||||
if (strict && default_email_is_bogus) {
|
if (strict && default_email_is_bogus) {
|
||||||
fputs(env_hint, stderr);
|
fputs(_(env_hint), stderr);
|
||||||
die("unable to auto-detect email address (got '%s')", email);
|
die("unable to auto-detect email address (got '%s')", email);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue