Browse Source

chore: throw i18n errors

Gerald 5 years ago
parent
commit
5220af96da
1 changed files with 2 additions and 6 deletions
  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)