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

Commit 20af01f

Browse files
committed
#2 Fixed issue that failed to start if OS locale is other than English and Japanese.
1 parent ba9a2ee commit 20af01f

4 files changed

Lines changed: 11 additions & 4 deletions

File tree

README.ja.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ FlashAir™の無線LAN機能を使い、FlashAir IoT Hubを経由する事で
7878

7979
## Changelog
8080

81+
- [0.3.1](https://github.com/FlashAirDevelopers/FlashAirFileManager/releases/tag/v0.3.1)
82+
- OSの言語設定が英語と日本語以外の場合、起動に失敗する問題を修正しました。
8183
- [0.3.0](https://github.com/FlashAirDevelopers/FlashAirFileManager/releases/tag/v0.3.0)
8284
- 英語表示に対応しました。`メニュー > 言語`から言語を切り替え可能です。(日本語 / 英語)
8385
- [0.2.1](https://github.com/FlashAirDevelopers/FlashAirFileManager/releases/tag/v0.2.1)

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ Note: Since version 0.2.0, Lua scripts are using [FlashAir IoT Hub](https://iot-
7878

7979
## Changelog
8080

81+
- [0.3.1](https://github.com/FlashAirDevelopers/FlashAirFileManager/releases/tag/v0.3.1)
82+
- Fixed issue that failed to start if OS locale is other than English and Japanese.
8183
- [0.3.0](https://github.com/FlashAirDevelopers/FlashAirFileManager/releases/tag/v0.3.0)
8284
- Supported English display. You can switch display languages from `Menu> Language`.
8385
- [0.2.1](https://github.com/FlashAirDevelopers/FlashAirFileManager/releases/tag/v0.2.1)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flashair-file-manager",
3-
"version": "0.3.0",
3+
"version": "0.3.1",
44
"description": "The application to browse and download files on FlashAir™ via the network.",
55
"homepage": "https://github.com/FlashAirDevelopers/FlashAirFileManager",
66
"main": "./src/main/main.js",

src/main/main.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ const changeLocale = newLocale => {
123123
log.error(error);
124124
}
125125
});
126-
const mainManue = getMainManue(newLocale);
126+
const mainManue = getMainManue(locale);
127127
const menu = Menu.buildFromTemplate(mainManue);
128128
Menu.setApplicationMenu(menu);
129129
if (mainWindow !== null) {
@@ -204,11 +204,14 @@ app.on('ready', () => {
204204
locale = data.locale;
205205
}
206206
}
207+
// check supported language
208+
if ((locale !== 'ja') && (locale !== 'en-US')) {
209+
locale = 'en-US';
210+
}
211+
createWindow();
207212
// Create menu
208213
changeLocale(locale);
209214
});
210-
211-
createWindow();
212215
});
213216

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

0 commit comments

Comments
 (0)