Map zh_TW to zh-Hant in NSIS

This commit is contained in:
Fedor Indutny 2023-05-10 12:31:40 -07:00 committed by GitHub
parent 1ec9bce79d
commit 834bc16c0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,6 +55,9 @@ for (const lang of REQUIRED_LANGUAGES) {
// We use "-" in folder names
const folder = lang.replace(/_/g, '-');
const fallbacks = [folder, folder.replace(/-.*/g, ''), 'en'];
if (lang === 'zh_TW') {
fallbacks.unshift('zh-Hant');
}
let json: Buffer | undefined;
for (const f of fallbacks) {
try {