ajoute du support de toute ces langues :

fr → Français
en → Anglais
es → Espagnol
de → Allemand
ja → Japonais
pt → Portugais
ru → Russe
it → Italien
nl → Néerlandais
pl → Polonais
zh → Chinois
hi → Hindi
ar → Arabe
bn → Bengali
id → Indonésien
tr → Turc
This commit is contained in:
Puechberty Arthur
2026-04-21 19:22:33 +02:00
parent f101af4872
commit a3c0b0b9b4
55 changed files with 10588 additions and 1499 deletions
+11 -4
View File
@@ -4,19 +4,26 @@ import { fileURLToPath } from "node:url";
const SCRIPT_DIR = path.dirname(fileURLToPath(import.meta.url));
const BOT_DIR = path.resolve(SCRIPT_DIR, "..");
const SOURCE_DIR = path.join(BOT_DIR, "src", "legacy", "i18n");
const TARGET_DIR = path.join(BOT_DIR, "dist", "legacy", "i18n");
const SOURCE_DIR = path.join(BOT_DIR, "locales");
const TARGET_DIRECTORIES = [
path.join(BOT_DIR, "dist", "locales"),
path.join(BOT_DIR, "dist", "legacy", "i18n"),
];
if (!existsSync(SOURCE_DIR)) {
throw new Error(`[i18n] source locale directory not found: ${SOURCE_DIR}`);
}
mkdirSync(TARGET_DIR, { recursive: true });
for (const targetDirectory of TARGET_DIRECTORIES) {
mkdirSync(targetDirectory, { recursive: true });
}
for (const fileName of readdirSync(SOURCE_DIR)) {
if (!fileName.endsWith(".json")) {
continue;
}
copyFileSync(path.join(SOURCE_DIR, fileName), path.join(TARGET_DIR, fileName));
for (const targetDirectory of TARGET_DIRECTORIES) {
copyFileSync(path.join(SOURCE_DIR, fileName), path.join(targetDirectory, fileName));
}
}