Re: [PATCH] config.c: mark error and warnings strings for translation
From: Matthieu Moy <hidden>
Date: 2016-06-15 23:02:05
Tanay Abhra [off-list ref] writes:
On 7/31/2014 5:01 PM, Matthieu Moy wrote:quoted
Signed-off-by: Matthieu Moy <redacted> --- Noticed while reviewing Tanay's patches, but this one is independant from his series, both syntactically and semantically. config.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)diff --git a/config.c b/config.c index a191328..76eeb63 100644 --- 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) - 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 - 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);Can I package your patch with mine in which I am going to change the error message to print the variable name also?
Yes, you can include it as PATCH 1 for example, and then build on top.
quoted
@@ -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) - die("Failed to expand user dir in: '%s'", value); + die(_("Failed to expand user dir in: '%s'"), value);nit : error messages start with a small letter. same case below for "Invalid". ;)
Indeed. Then I'm letting you continue on the patch. -- Matthieu Moy http://www-verimag.imag.fr/~moy/