Jeff King <peff@xxxxxxxx> writes: > Another alternative is to generate the doc from the code, rather than > the other way around. Yup, that indeed was what I envisioned in the "Possible future directions" comment in the cover letter. It might not even be bad to do #define FOREACH_FSCK_MSG_ID(FUNC) \ /* fatal errors */ \ FUNC(NUL_IN_HEADER, FATAL, N_("NUL byte exists in the object header.")) \ FUNC(UNTERMINATED_HEADER, FATAL, N_("Missing end-of-line in the object header.")) \ /* errors */ \ FUNC(BAD_DATE, ERROR, N_("Invalid date format in an author/committer line.")) \ ... as some of the users of the macro may have use of the translatable messages themselves.