Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
config.c: mark error and warnings strings for translation
author
Matthieu Moy
<Matthieu.Moy@imag.fr>
Thu, 7 Aug 2014 11:59:12 +0000
(
04:59
-0700)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 7 Aug 2014 18:37:44 +0000
(11:37 -0700)
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
4c715eb
)
diff --git
a/config.c
b/config.c
index d3ad661fca6b1cc1ab5e93af277f5ad859998792..300d626018b18b87ad3d82a5926639d2207b7ada 100644
(file)
--- a/
config.c
+++ b/
config.c
@@
-457,9
+457,9
@@
static int git_parse_source(config_fn_t fn, void *data)
break;
}
if (cf->die_on_error)
break;
}
if (cf->die_on_error)
- die(
"bad config file line %d in %s"
, cf->linenr, cf->name);
+ die(
_("bad config file line %d in %s")
, cf->linenr, cf->name);
else
else
- return error(
"bad config file line %d in %s"
, cf->linenr, cf->name);
+ return error(
_("bad config file line %d in %s")
, cf->linenr, cf->name);
}
static int parse_unit_factor(const char *end, uintmax_t *val)
}
static int parse_unit_factor(const char *end, uintmax_t *val)
@@
-575,9
+575,9
@@
static void die_bad_number(const char *name, const char *value)
value = "";
if (cf && cf->name)
value = "";
if (cf && cf->name)
- die(
"bad numeric config value '%s' for '%s' in %s: %s"
,
+ die(
_("bad numeric config value '%s' for '%s' in %s: %s")
,
value, name, cf->name, reason);
value, name, cf->name, reason);
- die(
"bad numeric config value '%s' for '%s': %s"
, value, name, reason);
+ die(
_("bad numeric config value '%s' for '%s': %s")
, value, name, reason);
}
int git_config_int(const char *name, const char *value)
}
int git_config_int(const char *name, const char *value)
@@
-662,7
+662,7
@@
int git_config_pathname(const char **dest, const char *var, const char *value)
return config_error_nonbool(var);
*dest = expand_user_path(value);
if (!*dest)
return config_error_nonbool(var);
*dest = expand_user_path(value);
if (!*dest)
- die(
"Failed to expand user dir in: '%s'"
, value);
+ die(
_("failed to expand user dir in: '%s'")
, value);
return 0;
}
return 0;
}
@@
-740,7
+740,7
@@
static int git_default_core_config(const char *var, const char *value)
if (level == -1)
level = Z_DEFAULT_COMPRESSION;
else if (level < 0 || level > Z_BEST_COMPRESSION)
if (level == -1)
level = Z_DEFAULT_COMPRESSION;
else if (level < 0 || level > Z_BEST_COMPRESSION)
- die(
"bad zlib compression level %d"
, level);
+ die(
_("bad zlib compression level %d")
, level);
zlib_compression_level = level;
zlib_compression_seen = 1;
return 0;
zlib_compression_level = level;
zlib_compression_seen = 1;
return 0;
@@
-751,7
+751,7
@@
static int git_default_core_config(const char *var, const char *value)
if (level == -1)
level = Z_DEFAULT_COMPRESSION;
else if (level < 0 || level > Z_BEST_COMPRESSION)
if (level == -1)
level = Z_DEFAULT_COMPRESSION;
else if (level < 0 || level > Z_BEST_COMPRESSION)
- die(
"bad zlib compression level %d"
, level);
+ die(
_("bad zlib compression level %d")
, level);
core_compression_level = level;
core_compression_seen = 1;
if (!zlib_compression_seen)
core_compression_level = level;
core_compression_seen = 1;
if (!zlib_compression_seen)
@@
-875,7
+875,7
@@
static int git_default_core_config(const char *var, const char *value)
else if (!strcmp(value, "link"))
object_creation_mode = OBJECT_CREATION_USES_HARDLINKS;
else
else if (!strcmp(value, "link"))
object_creation_mode = OBJECT_CREATION_USES_HARDLINKS;
else
- die(
"Invalid mode for object creation: %s"
, value);
+ die(
_("invalid mode for object creation: %s")
, value);
return 0;
}
return 0;
}
@@
-1175,7
+1175,7
@@
int git_config_early(config_fn_t fn, void *data, const char *repo_config)
switch (git_config_from_parameters(fn, data)) {
case -1: /* error */
switch (git_config_from_parameters(fn, data)) {
case -1: /* error */
- die(
"unable to parse command-line config"
);
+ die(
_("unable to parse command-line config")
);
break;
case 0: /* found nothing */
break;
break;
case 0: /* found nothing */
break;
@@
-1516,7
+1516,7
@@
static int store_aux(const char *key, const char *value, void *cb)
case KEY_SEEN:
if (matches(key, value)) {
if (store.seen == 1 && store.multi_replace == 0) {
case KEY_SEEN:
if (matches(key, value)) {
if (store.seen == 1 && store.multi_replace == 0) {
- warning(
"%s has multiple values"
, key);
+ warning(
_("%s has multiple values")
, key);
}
ALLOC_GROW(store.offset, store.seen + 1,
}
ALLOC_GROW(store.offset, store.seen + 1,