Translating the compiler

Nah, we wouldn't use error codes as ids here, we'd have a new id scheme, likely derived from the name of the diagnostic struct. There are plenty of messages without error codes. This would still be pretty automatic -- the diagnostic struct conversion is something we've wanted to do anyway, and it's really easy to piggyback robust id-to-translation support on top of that.

You're responding to outdated comments about rustdoc here, the plan is not to use Fluent there, but to keep using an id-based format with autogenerated ids. See Translating the stdlib docs. This is still somewhat like English-to-translation, but it uses id-to-translation under the hood to be tracked better.

The error index is already generated from a very straightforward format, extracting the strings isn't hard. I already wrote a hacky tool that does this without any integration into the rust build system.


None of the plans involve forcing programmers to "add ids and then add the text in another file", they all work via extracting an English .ftl file from source at build time, using the same proc macro.