File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/** contains the ts-ignore, and the global window manipulation */
22export const localize = ( key : string , fallback : string ) =>
33 // @ts -ignore
4- 'i ' in window ? window . i ( key ) : fallback
4+ '__tsLocalize ' in window ? window . __tsLocalize ( key ) : fallback
Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ const Play: React.FC<Props> = (props) => {
4040 window . reactDOM = ReactDOM
4141 // @ts -ignore - so that plugins etc can use local functions
4242 window . i = i
43+ // @ts -ignore - same as window.i but hopefully not overwritten by App Insights
44+ window . __tsLocalize = i
4345
4446 const getLoaderScript = document . createElement ( 'script' ) ;
4547 getLoaderScript . src = withPrefix ( "/js/vs.loader.js" ) ;
Original file line number Diff line number Diff line change @@ -66,6 +66,8 @@ const Play: React.FC<Props> = (props) => {
6666 window . reactDOM = ReactDOM
6767 // @ts -ignore - so that plugins etc can use i18n
6868 window . i = i
69+ // @ts -ignore - same as window.i but hopefully not overwritten by App Insights
70+ window . __tsLocalize = i
6971
7072 const getLoaderScript = document . createElement ( 'script' ) ;
7173 getLoaderScript . src = withPrefix ( "/js/vs.loader.js" ) ;
You can’t perform that action at this time.
0 commit comments