I have an C application that makes use of ansi color codes which are defined like this:
#define RED "\x1b[31;01m"
#define RESET "\x1b[0m"
These defines are used in prints to color the output:
/* Actual example: */
log_error(_(RED"FATAL: "RESET"Aborting due to a fatal error."))
So, here's the actual problem: How to make xgettext play nicely with those color escapes? Currently running xgettext on this kind of source produces a .pot entry like this:
#: src/main.c:89
msgid "FATAL: "
msgstr ""
As you see, not the full string is recognized.
Any ideas on how to change this? I was unable to find an answer in man xgettext
.
Edit: I assume the solution is "use %s for the color escapes", but I'd like to prevent that.