Code that needs to construct Message objects from message keys currently tends to rely on IContextSource::msg, or the global function wfMsg(). To avoid reliance on global state, and dragging in the kitchen sink that is IContextSource, a narrow interface called MessageLocalizer should be introduced, exposing just the msg() function from IContextSource. The IContextSource interface can then extend MessageLocalizer. Calling code that only needs the msg() method can then start using MessageLocalizer instead of IContextSource, without further refactoring being required.
This allows testing and re-use of such components without the need to construct or get an IContextSource from global state.