浏览代码

chore: throw i18n errors

Gerald 5 年之前
父节点
当前提交
5220af96da
共有 1 个文件被更改,包括 2 次插入6 次删除
  1. 2 6
      scripts/i18n.js

+ 2 - 6
scripts/i18n.js

@@ -27,12 +27,8 @@ class Locale {
       const ext = path.extname(file);
       const transformer = transformers[ext];
       if (transformer) {
-        try {
-          const res = await fs.readFile(`${localeDir}/${file}`, 'utf8');
-          Object.assign(this.data, transformer(res));
-        } catch {
-          // ignore
-        }
+        const res = await fs.readFile(`${localeDir}/${file}`, 'utf8');
+        Object.assign(this.data, transformer(res));
       }
     }
     Object.keys(this.data)