git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] config.c: mark error and warnings strings for translation

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jul 31, 2014, 12:18 UTC
Message-ID
<vpq61idafhj.fsf@anie.imag.fr>
In-Reply-To
<53DA3269.40901@gmail.com>
Tanay Abhra <tanayabh@gmail.com> writes:
Show 25 quoted lines
> On 7/31/2014 5:01 PM, Matthieu Moy wrote:
>> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
>> ---
>> 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.
Show 8 quoted lines
>> @@ -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/
Previous: Tanay Abhra
Message 3 of 3 in “config.c: mark error and warnings strings for translation”
  1. config.c: mark error and warnings strings for translationMatthieu Moy, Jul 31, 2014
  2. Tanay AbhraJul 31, 2014
  3. Matthieu MoyJul 31, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.