build/lib/nls.ts/patchJavascript
	function patchJavascript(patches: IPatch[], contents: string, moduleId: string): string {
		const model = new TextModel(contents);

		// patch the localize calls
		lazy(patches).reverse().each(p => model.apply(p));

		// patch the 'vs/nls' imports
		const firstLine = model.get(0);
		const patchedFirstLine = firstLine.replace(/(['"])vs\/nls\1/g, `$1vs/nls!${moduleId}$1`);
		model.set(0, patchedFirstLine);

		return model.toString();
	}