https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116724
--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> --- I tried this for some examples; consider: $ LANG=C ./xgcc -B. ../../src/gcc/testsuite/gcc.dg/format/sentinel-1.c -fdiagnostics-format=text -Wall -S -fdiagnostics-format=text ../../src/gcc/testsuite/gcc.dg/format/sentinel-1.c:15:1: warning: 'sentinel' attribute only applies to function types [-Wattributes] 15 | extern int a ATTR; /* { dg-warning "applies to function types" "sentinel" } */ | ^~~~~~ ../../src/gcc/testsuite/gcc.dg/format/sentinel-1.c:19:1: warning: 'sentinel' attribute requires prototypes with named arguments [-Wattributes] 19 | extern void foo3 () ATTR; /* { dg-warning "named arguments" "sentinel" } */ | ^~~~~~ ../../src/gcc/testsuite/gcc.dg/format/sentinel-1.c:20:1: warning: 'sentinel' attribute only applies to variadic functions [-Wattributes] 20 | extern void foo4 (const char *, int) ATTR; /* { dg-warning "variadic functions" "sentinel" } */ | ^~~~~~ [...snip...] Now try running with LANG=ja_JP.UTF-8 $ LANG=ja_JP.UTF-8 ./xgcc -B. ../../src/gcc/testsuite/gcc.dg/format/sentinel-1.c -fdiagnostics-format=text -Wall -S -fdiagnostics-format=text ../../src/gcc/testsuite/gcc.dg/format/sentinel-1.c:15:1: 警告: ‘sentinel’ 属性は関数型にのみ適用できます [-Wattributes] 15 | extern int a ATTR; /* { dg-warning "applies to function types" "sentinel" } */ | ^~~~~~ ../../src/gcc/testsuite/gcc.dg/format/sentinel-1.c:19:1: 警告: ‘sentinel’ 属性は名前付き引数があるプロトタイプが必要です [-Wattributes] 19 | extern void foo3 () ATTR; /* { dg-warning "named arguments" "sentinel" } */ | ^~~~~~ ../../src/gcc/testsuite/gcc.dg/format/sentinel-1.c:20:1: 警告: ‘sentinel’ attribute only applies to variadic functions [-Wattributes] 20 | extern void foo4 (const char *, int) ATTR; /* { dg-warning "variadic functions" "sentinel" } */ | ^~~~~~ [...lots snipped...] Note that some of the msg fmt strings have translations in ja.po; others don't. Trying again with -fdiagnostics-format=sarif-file "results": [{"ruleId": "-Wattributes", "level": "warning", "message": {"text": "‘[sentinel](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-sentinel-function-attribute)’ 属性は関数型にのみ適用できます"}, [...snipped...] Note how the message text in the SARIF output is translated via the ja.po, which could be a problem if the maintainer doesn't speak the same language as the user. Perhaps we should try to capture both the untranslated text and the translated text? SARIF has various abilities for handling translations.