From 97f88be8bff0bd822d311c452f4126e55370be6a Mon Sep 17 00:00:00 2001 From: Mehmet Salih Yavuz Date: Mon, 23 Dec 2024 21:56:54 +0300 Subject: [PATCH] chore(webpack): remove unused functions --- superset-frontend/webpack.config.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/superset-frontend/webpack.config.js b/superset-frontend/webpack.config.js index fa5a9edf60485..6cf0c2900d440 100644 --- a/superset-frontend/webpack.config.js +++ b/superset-frontend/webpack.config.js @@ -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',