
On Mon, Dec 17, 2018 at 16:06:34 +0000, Daniel Berrange wrote:
On Thu, Dec 06, 2018 at 11:42:44AM +0000, Daniel P. Berrangé wrote:
On Wed, Dec 05, 2018 at 05:47:49PM +0100, Peter Krempa wrote:
Use a macro to declare how the strings for individual error codes. This unifies the used condition and will allow simplifying the code further.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
[...]
#define MSG(msg, suffix) \ msg, msg # suffix
{ VIR_ERR_NO_SUPPORT, MSG("this function is not supported by the connection driver", ": %s") },
Then, only a handful will need separate entries
I've unfortunately just realized this was an absolutely terrible suggestion of mine. We cannot use CPP string concatenation here as it breaks xgettext's ability to discover translatable strings. IOW we just lost all our error messages from the translations :-(
I've posted a patch that puts it back to roughly what you have in this v1 patch.
I was actually wondering whether gettext collects them after macro processing or not, but it's very hard to google the answer so I gave up. Actually after macro-processing it would possibly miss some as some parts of the code could be disabled.