Skip to content

Commit ad2784f

Browse files
authored
fix(translation): ignore en translation from poeeditor (#2085)
1 parent 3e77b37 commit ad2784f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

download_translations.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@ async function main(project_id, api_token) {
1212

1313
for (const locale of locales) {
1414
const exported = await downloadLanguage(project_id, api_token, locale);
15-
const fileName = locale2fileMap[locale.code] || locale.code;
16-
await fs.writeFile(`./src/i18n/locales/${fileName}.json`, JSON.stringify(exported, null, 2));
15+
const code = locale2fileMap[locale.code] || locale.code;
16+
if (code === 'en') {
17+
console.log('Ignoring `en` translation');
18+
} else {
19+
await fs.writeFile(`./src/i18n/locales/${code}.json`, JSON.stringify(exported, null, 2));
20+
}
1721
}
1822
}
1923

0 commit comments

Comments
 (0)