Skip to content

refactor: Check translatable format strings at compile-time

All translatable format strings are fixed. This change surfaces errors in them at compile-time.

The implementation achieves this by allowing to delay the translation (or std::string construction) that previously happened in _() by returning a new type from this function. The new type can be converted to bilingual_str where needed.

This can be tested by adding a format string error in an original string literal and observing a new compile-time failure.

Fixes https://github.com/bitcoin/bitcoin/issues/30530

Merge request reports

Loading