Skip to content

Commit

Permalink
fix(translation): ignore en translation from poeeditor (#2085)
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk authored Jul 26, 2024
1 parent 3e77b37 commit ad2784f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions download_translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ async function main(project_id, api_token) {

for (const locale of locales) {
const exported = await downloadLanguage(project_id, api_token, locale);
const fileName = locale2fileMap[locale.code] || locale.code;
await fs.writeFile(`./src/i18n/locales/${fileName}.json`, JSON.stringify(exported, null, 2));
const code = locale2fileMap[locale.code] || locale.code;
if (code === 'en') {
console.log('Ignoring `en` translation');
} else {
await fs.writeFile(`./src/i18n/locales/${code}.json`, JSON.stringify(exported, null, 2));
}
}
}

Expand Down

0 comments on commit ad2784f

Please sign in to comment.