Skip to content

Commit

Permalink
fix: replace - in translation imports
Browse files Browse the repository at this point in the history
  • Loading branch information
itschip committed Jan 24, 2024
1 parent 010d232 commit 2ae1ecd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/generateLocales.js
Expand Up @@ -15,8 +15,10 @@ const exportData = [];
exportData.push('export default {');

languages.forEach((lng) => {
importData.push(`import ${lng} from './${lng}/default.json';`);
exportData.push(` ${lng},`);
const language = lng.replace('-', '');

importData.push(`import ${language} from './${lng}/default.json';`);
exportData.push(` ${language},`);
});

/* Add spacing after imports */
Expand Down

0 comments on commit 2ae1ecd

Please sign in to comment.