(locale: string)
| 64 | let originalLocale: string; |
| 65 | |
| 66 | function initLocale(locale: string) { |
| 67 | hasGlobalLocalize = Object.getOwnPropertyNames(global).includes('$localize'); |
| 68 | if (!hasGlobalLocalize) { |
| 69 | global.$localize = {}; |
| 70 | } |
| 71 | hasGlobalLocale = Object.getOwnPropertyNames(global.$localize).includes('locale'); |
| 72 | originalLocale = global.$localize.locale; |
| 73 | global.$localize.locale = locale; |
| 74 | } |
| 75 | |
| 76 | function restoreLocale() { |
| 77 | if (hasGlobalLocale) { |
no outgoing calls
no test coverage detected