-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #564 from Pat1enceLos/fixSubtitlePos
fix(opendialog): fix language about open dialog in mas
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
const fs = require('fs'); | ||
|
||
const languages = ['am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', | ||
'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he', | ||
'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv', | ||
'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru', | ||
'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk', | ||
'vi', 'zh-CN', 'zh-TW']; | ||
// locales by https://github.com/electron/electron/pull/363/files | ||
|
||
// https://github.com/electron-userland/electron-builder/issues/708 | ||
// https://github.com/electron/electron/issues/2484 | ||
exports.default = (context) => { | ||
const APP_NAME = context.packager.appInfo.productFilename; | ||
const APP_OUT_DIR = context.appOutDir; | ||
const PLATFORM = context.packager.platform.name; | ||
if (PLATFORM === 'mac') { | ||
languages.forEach((item) => { | ||
fs.writeFile(`${APP_OUT_DIR}/${APP_NAME}.app/Contents/Resources/${item}.lproj`, '', (err) => { | ||
if (err) throw err; | ||
}); | ||
}); | ||
} | ||
}; |