fix(ivy): i18n - remove `translate` function when clearing translations (#34346)
The `loadTranslations()` function will attach the `translate()` function to `$localize.translate` to cause runtime translation to occur. We should cleanup after ourselves by unattaching this function when we call `clearTranslations()`. Fixes #32781 PR Close #34346
This commit is contained in:
parent
656607b640
commit
6ce940315b
|
@ -52,6 +52,7 @@ export function loadTranslations(translations: Record<MessageId, TargetMessage>)
|
|||
* @publicApi
|
||||
*/
|
||||
export function clearTranslations() {
|
||||
$localize.translate = undefined;
|
||||
$localize.TRANSLATIONS = {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue