Skip to content
This repository has been archived by the owner on Jul 31, 2019. It is now read-only.

Commit

Permalink
#2 Fixed issue that failed to start if OS locale is other than Englis…
Browse files Browse the repository at this point in the history
…h and Japanese.
  • Loading branch information
tks-abe committed Feb 21, 2018
1 parent ba9a2ee commit 20af01f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.ja.md
Expand Up @@ -78,6 +78,8 @@ FlashAir™の無線LAN機能を使い、FlashAir IoT Hubを経由する事で

## Changelog

- [0.3.1](https://github.com/FlashAirDevelopers/FlashAirFileManager/releases/tag/v0.3.1)
- OSの言語設定が英語と日本語以外の場合、起動に失敗する問題を修正しました。
- [0.3.0](https://github.com/FlashAirDevelopers/FlashAirFileManager/releases/tag/v0.3.0)
- 英語表示に対応しました。`メニュー > 言語`から言語を切り替え可能です。(日本語 / 英語)
- [0.2.1](https://github.com/FlashAirDevelopers/FlashAirFileManager/releases/tag/v0.2.1)
Expand Down
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -78,6 +78,8 @@ Note: Since version 0.2.0, Lua scripts are using [FlashAir IoT Hub](https://iot-

## Changelog

- [0.3.1](https://github.com/FlashAirDevelopers/FlashAirFileManager/releases/tag/v0.3.1)
- Fixed issue that failed to start if OS locale is other than English and Japanese.
- [0.3.0](https://github.com/FlashAirDevelopers/FlashAirFileManager/releases/tag/v0.3.0)
- Supported English display. You can switch display languages from `Menu> Language`.
- [0.2.1](https://github.com/FlashAirDevelopers/FlashAirFileManager/releases/tag/v0.2.1)
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "flashair-file-manager",
"version": "0.3.0",
"version": "0.3.1",
"description": "The application to browse and download files on FlashAir™ via the network.",
"homepage": "https://github.com/FlashAirDevelopers/FlashAirFileManager",
"main": "./src/main/main.js",
Expand Down
9 changes: 6 additions & 3 deletions src/main/main.js
Expand Up @@ -123,7 +123,7 @@ const changeLocale = newLocale => {
log.error(error);
}
});
const mainManue = getMainManue(newLocale);
const mainManue = getMainManue(locale);
const menu = Menu.buildFromTemplate(mainManue);
Menu.setApplicationMenu(menu);
if (mainWindow !== null) {
Expand Down Expand Up @@ -204,11 +204,14 @@ app.on('ready', () => {
locale = data.locale;
}
}
// check supported language
if ((locale !== 'ja') && (locale !== 'en-US')) {
locale = 'en-US';
}
createWindow();
// Create menu
changeLocale(locale);
});

createWindow();
});

app.on('did-finish-load', () => {
Expand Down

0 comments on commit 20af01f

Please sign in to comment.