Open AgPeHaJIuH1 opened 4 years ago
ResXManager might preserve this data, but the built-in editors of VS definitely won't. The only save place is to add this to the comment field, eg:
<data name="abc">
<value>the value</value>
<comment>#LogLevel=Error</comment>
</data>
ResXManager e.g. uses this way to tag items as invariant.
However I don't think resources is a good place to store such information, a log level has nothing to do with localization.
I don’t need built-in editors. I use only ResXManager and to generate the Message class I use my own T4 template. As for the level of logging, I agree with you, but I also generate methods for displaying messages on the console with a certain color, and it should be localized. This will add just a little convenience. I repeat I can keep these comments, but it is difficult to understand and read. Individual columns would look much better.
Since this is really a very individual use case, you could implement this in you own fork.
I would be happy to do this, maybe it would be useful to other users. But now I don’t have so much time to study your code and the specifics of work. =( But in any case, thanks for your attention. Your ResXManager is really a good tool and a lot of work!
Hello. I would like to be able to add custom columns and attributes to the resx file. The fact is that I use a custom T4 template to generate the .cs class, and I would like to add a LogLevel attribute to some records so that my T4 generates methods for the logger. For example, resx can be generated like this:
It would be nice, for more detailed configuration and generation of .cs, I would like to include some more columns there, so as not to write code manually, but for me the T4 template did it. Thank you in advance.
PS Now I use a crutch and just add the necessary information in the comment, for example, "#loglevel=debug#console=red". I don’t like it, it’s hard to read and understand, but it makes the job easier. It would be very cool to see the individual columns and the information in them.