mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +08:00
fix(forge): missing English locale on Windows
This commit is contained in:
parent
9a2264c7f6
commit
9f694fad8b
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user