Has any thought been given to changing the signature of GetLocalizedString from accepting a string to accepting a LocalizedString constant/enumeration?
That would allow code like this:
log.Error(GetLocalizedString("stats no servers"));
It's not a bad idea, it's a pretty simple change (although tedious), and I don't think it's breaking since GetLocalizedString is private and people shouldn't even really be able to see that. I'll log that as a request.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hmm, actually after thinking out loud with my last post I think I may just leave it because it's private and outside callers shouldn't need to do anything with the localized strings anyway.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Has any thought been given to changing the signature of GetLocalizedString from accepting a string to accepting a LocalizedString constant/enumeration?
That would allow code like this:
log.Error(GetLocalizedString("stats no servers"));
to be replaced with this:
log.Error(GetLocalizedString(LocalizedString.StatsNoServers));
and reduce the chance of a typo in the future.
It's not a bad idea, it's a pretty simple change (although tedious), and I don't think it's breaking since GetLocalizedString is private and people shouldn't even really be able to see that. I'll log that as a request.
Hmm, actually after thinking out loud with my last post I think I may just leave it because it's private and outside callers shouldn't need to do anything with the localized strings anyway.