When you use .net core localization through IStringLocalizer or IHtmlLocalizer, you write a code like this: _localizer[“my key”]. This is ok but now you have to manually fill all your .resx files with this key=value.
The idea is to create a source generator that, only in development mode, during compilation time is able to get all the keys called by IStringLocalizer/IHtmlLocalizer and then checks in .resx files if that key is available or not. If not add a new row to the resx like key=key (for value we use the same string on the key).
This helps the dev because for the primary language the resx is automatically filled and for other languages it populates all the keys and you need only to translate the values.
Is is possible to create a source generator with this behaviour?
I don't know about tool that could do what you described, but there is a Visual Studio extension (and it can work also as a standalone tool) that helps with resx files and working with them - ResXManager. You can install it using Visual Studio extensions manager.