Skip to content

Commit

Permalink
add inital language (ar,ja,ru,zh-CN) and implement tools to autoupdate
Browse files Browse the repository at this point in the history
  • Loading branch information
krmanik committed Feb 2, 2024
1 parent a005fb6 commit 9362eeb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
6 changes: 0 additions & 6 deletions tools/localization/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
];
4 changes: 2 additions & 2 deletions tools/localization/src/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import fs from "fs";
import {
LANGUAGES,
TEMP_DIR,
poDirectory,
} from "./constants";
Expand Down Expand Up @@ -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`);

Expand Down

0 comments on commit 9362eeb

Please sign in to comment.