diff --git a/tools/localization/src/constants.ts b/tools/localization/src/constants.ts index 2f0c708..7784ae3 100644 --- a/tools/localization/src/constants.ts +++ b/tools/localization/src/constants.ts @@ -28,9 +28,3 @@ export const messagesPotFile = path.join(poDirectory, "messages.pot"); export const TEMP_DIR = path.join(__dirname, "../temp_dir"); createDirIfNotExisting(TEMP_DIR); - -export const LANGUAGES = [ - "ar", - "ja", - "zh-CN", -]; diff --git a/tools/localization/src/update.ts b/tools/localization/src/update.ts index b1e676d..336fbfa 100644 --- a/tools/localization/src/update.ts +++ b/tools/localization/src/update.ts @@ -14,7 +14,6 @@ import fs from "fs"; import { - LANGUAGES, TEMP_DIR, poDirectory, } from "./constants"; @@ -58,8 +57,9 @@ async function update( * Update translated I18n files in po/ dir */ export async function updateI18nFiles() { + const tempDir = fs.readdirSync(TEMP_DIR); - for (const language of LANGUAGES) { + for (const language of tempDir) { console.log(`\nCopying language files from temp_dir/${language}/messages-${language}.po to po/${language}.po`);