Skip to content

Commit

Permalink
chore(webpack): remove unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
msyavuz committed Dec 23, 2024
1 parent 0a49f2f commit 97f88be
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions superset-frontend/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,6 @@ const APP_DIR = path.resolve(__dirname, './');
// output dir
const BUILD_DIR = path.resolve(__dirname, '../superset/static/assets');
const ROOT_DIR = path.resolve(__dirname, '..');
const TRANSLATIONS_DIR = path.resolve(__dirname, '../superset/translations');

const getAvailableTranslationCodes = () => {
if (process.env.BUILD_TRANSLATIONS === 'true') {
const LOCALE_CODE_MAPPING = {
zh: 'zh-cn',
};
const files = fs.readdirSync(TRANSLATIONS_DIR);
return files
.filter(file =>
fs.statSync(path.join(TRANSLATIONS_DIR, file)).isDirectory(),
)
.filter(dirName => !dirName.startsWith('__'))
.map(dirName => dirName.replace('_', '-'))
.map(dirName => LOCALE_CODE_MAPPING[dirName] || dirName);
}
return [];
};

const {
mode = 'development',
Expand Down

0 comments on commit 97f88be

Please sign in to comment.