config.c: mark error and warnings strings for translation

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>

Matthieu Moy committed Aug 7, 2014 at 04:59 UTC 8262aaa2835d71b0cdf44e68712703a452761328
1 file changed +10 -10
config.c
+10 -10
@@ -457,9 +457,9 @@ static int git_parse_source(config_fn_t fn, void *data)
457 break;
458 }
459 if (cf->die_on_error)
460 - die("bad config file line %d in %s", cf->linenr, cf->name);
460 + die(_("bad config file line %d in %s"), cf->linenr, cf->name);
461 else
462 - return error("bad config file line %d in %s", cf->linenr, cf->name);
462 + return error(_("bad config file line %d in %s"), cf->linenr, cf->name);
463 }
464
465 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)
575 value = "";
576
577 if (cf && cf->name)
578 - die("bad numeric config value '%s' for '%s' in %s: %s",
578 + die(_("bad numeric config value '%s' for '%s' in %s: %s"),
579 value, name, cf->name, reason);
580 - die("bad numeric config value '%s' for '%s': %s", value, name, reason);
580 + die(_("bad numeric config value '%s' for '%s': %s"), value, name, reason);
581 }
582
583 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)
662 return config_error_nonbool(var);
663 *dest = expand_user_path(value);
664 if (!*dest)
665 - die("Failed to expand user dir in: '%s'", value);
665 + die(_("failed to expand user dir in: '%s'"), value);
666 return 0;
667 }
668
@@ -740,7 +740,7 @@ static int git_default_core_config(const char *var, const char *value)
740 if (level == -1)
741 level = Z_DEFAULT_COMPRESSION;
742 else if (level < 0 || level > Z_BEST_COMPRESSION)
743 - die("bad zlib compression level %d", level);
743 + die(_("bad zlib compression level %d"), level);
744 zlib_compression_level = level;
745 zlib_compression_seen = 1;
746 return 0;
@@ -751,7 +751,7 @@ static int git_default_core_config(const char *var, const char *value)
751 if (level == -1)
752 level = Z_DEFAULT_COMPRESSION;
753 else if (level < 0 || level > Z_BEST_COMPRESSION)
754 - die("bad zlib compression level %d", level);
754 + die(_("bad zlib compression level %d"), level);
755 core_compression_level = level;
756 core_compression_seen = 1;
757 if (!zlib_compression_seen)
@@ -875,7 +875,7 @@ static int git_default_core_config(const char *var, const char *value)
875 else if (!strcmp(value, "link"))
876 object_creation_mode = OBJECT_CREATION_USES_HARDLINKS;
877 else
878 - die("Invalid mode for object creation: %s", value);
878 + die(_("invalid mode for object creation: %s"), value);
879 return 0;
880 }
881
@@ -1175,7 +1175,7 @@ int git_config_early(config_fn_t fn, void *data, const char *repo_config)
1175
1176 switch (git_config_from_parameters(fn, data)) {
1177 case -1: /* error */
1178 - die("unable to parse command-line config");
1178 + die(_("unable to parse command-line config"));
1179 break;
1180 case 0: /* found nothing */
1181 break;
@@ -1516,7 +1516,7 @@ static int store_aux(const char *key, const char *value, void *cb)
1516 case KEY_SEEN:
1517 if (matches(key, value)) {
1518 if (store.seen == 1 && store.multi_replace == 0) {
1519 - warning("%s has multiple values", key);
1519 + warning(_("%s has multiple values"), key);
1520 }
1521
1522 ALLOC_GROW(store.offset, store.seen + 1,