fix(forge): missing English locale on Windows

pull/2314/head
Elian Doran 2025-06-15 11:38:14 +07:00
parent 9a2264c7f6
commit 9f694fad8b
No known key found for this signature in database
1 changed files with 7 additions and 1 deletions

@ -161,7 +161,13 @@ module.exports = {
const files = fs.readdirSync(localesDir);
for (const file of files) {
const localeName = path.basename(file, ".pak");
let localeName = path.basename(file, ".pak");
if (localeName === "en-US" && process.platform === "win32") {
// If the locale is "en-US" on Windows, we treat it as "en".
// This is because the Windows version of Electron uses "en-US.pak" instead of "en.pak".
localeName = "en";
}
if (localesToKeep.includes(localeName)) {
keptLocales.add(localeName);
continue;