Skip to content

Commit

Permalink
Merge pull request #564 from Pat1enceLos/fixSubtitlePos
Browse files Browse the repository at this point in the history
fix(opendialog): fix language about open dialog in mas
  • Loading branch information
ipy authored Apr 11, 2019
2 parents 069fe7f + 6ad91ed commit 96135bb
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"repo": "splayerx"
}
],
"afterPack": "scripts/afterPack.js",
"productName": "SPlayer",
"appId": "org.splayer.splayerx",
"compression": "maximum",
Expand Down
24 changes: 24 additions & 0 deletions scripts/afterPack.js
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;
});
});
}
};

0 comments on commit 96135bb

Please sign in to comment.