Makeblock-official / mBlock

base on scratch offline v2.0 by MIT, Learn more from Makeblock official website
http://www.makeblock.com
GNU General Public License v2.0
320 stars 228 forks source link

locale is not fetched #47

Closed koenr closed 7 years ago

koenr commented 7 years ago

First of all: thanks a lot for this Linux port! First tests look great!

When starting mblock, it always starts in Chinese. The app.getLocale() function is used, so I expect the language to be pulled from the OS (my locale is nl). I tried changing the path in linux-unpacked/resources/web/js/libs/translator.js and I tried changing the default locale there, but it doesn't change the behaviour. It seems to me the path to the locales in that file is wrong (localePath = __dirname + '/../../../i18n/locales) - there is no i18n folder. I'm not familiar with Electron, so I might have it completely wrong.

paulcoiffier commented 7 years ago

Open "app/translator.js". On line 74 you have the language hardcoded (porbably for development) this.setLanguage("zh_CN"); Delete this line and replace by another if you want

tomash970 commented 7 years ago

Hi. Tested with one mbot and one computer for now. It works great. Program asked for restart and after that serial port conected to the mbot. Codded just a leds for now. We have non profit association and 10 ubuntu powered computors for kids to learn coding. Thank you for your effort it means a lot to us. I have same issue like koenr, but I can not find "app/translator.js". There is one file named translator.js but it has only 34 lines.

paulcoiffier commented 7 years ago

Update your repo, I had clone the git repo yesterday so "pull" your git repo

koenr commented 7 years ago

May be you only looked at the compiled code. It is in the source code. Compiling recipe and discussion on http://forum.makeblock.com/t/running-mblock-in-linux/6216/10?u=koenr

bigeyex commented 7 years ago

fixed in the recent release.

koenr commented 7 years ago

Thanks! Great to see this project moving on!