text: "main";_686‍.x([["getText",()=>getText]]);let fs;_686‍.w("fs",[["default",["fs"],function(v){fs=v}]]);let path;_686‍.w("path",[["default",["path"],function(v){path=v}]]);let winston;_686‍.w("winston",[["default",["winston"],function(v){winston=v}]]);
  
  
  
  const THEME_LOCALES_PATH = 'theme/locales/';
  let text = null;
  
         const getText = locale => {
  	if (text) {
  		return Promise.resolve(text);
  	} else {
  		const filePath = path.resolve(THEME_LOCALES_PATH + locale + '.json');
  		return new Promise((resolve, reject) => {
  			fs.readFile(filePath, 'utf8', (err, data) => {
  				if (err) {
  					winston.error('Fail to read theme locale', filePath, err);
  					reject(err);
  				} else {
  					text = JSON.parse(data);
  					resolve(text);
  				}
  			});
  		});
  	}
  };