From: Vasco Almeida Date: Thu, 28 Jul 2016 13:14:03 +0000 (+0000) Subject: i18n: config: unfold error messages marked for translation X-Git-Tag: v2.10.0-rc0~44^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/1b8132d99d80ca98218c2685bbe5ba016a0a42f8?ds=inline;hp=1b8132d99d80ca98218c2685bbe5ba016a0a42f8 i18n: config: unfold error messages marked for translation Introduced in 473166b ("config: add 'origin_type' to config_source struct", 2016-02-19), Git can inform the user about the origin of a config error, but the implementation does not allow translators to translate the keywords 'file', 'blob, 'standard input', and 'submodule-blob'. Moreover, for the second message, a reason for the error is appended to the message, not allowing translators to translate that reason either. Unfold the message into several templates for each known origin_type. That would result in better translation at the expense of code verbosity. Add enum config_oringin_type to ease management of the various configuration origin types (blob, file, etc). Previously origin type was considered from command line if cf->origin_type == NULL, i.e., uninitialized. Now we set origin_type to CONFIG_ORIGIN_CMDLINE in git_config_from_parameters() and configset_add_value(). For error message in git_parse_source(), use xstrfmt() function to prepare the message string, instead of doing something like it's done for die_bad_number(), because intelligibility and code conciseness are improved for that instance. Signed-off-by: Vasco Almeida Signed-off-by: Junio C Hamano ---