TranslatableBodyRenderer switches the translator locale to render a translated email body, but if the wrapped renderer throws an exception the original locale is not restored.
That leaves the translator in the wrong state for the rest of the request.
The renderer should always restore the original locale, typically with safe cleanup logic around the wrapped render call.
TranslatableBodyRenderer switches the translator locale to render a translated email body, but if the wrapped renderer throws an exception the original locale is not restored.
That leaves the translator in the wrong state for the rest of the request.
The renderer should always restore the original locale, typically with safe cleanup logic around the wrapped render call.