Skip to content

Commit

Permalink
chore(webpack): remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
msyavuz committed Jan 9, 2025
1 parent f5a699d commit 32f2d46
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions superset-frontend/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +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',
zh_TW: 'zh-tw',
pt_BR: 'pt-br',
};
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 32f2d46

Please sign in to comment.