mixly / Mixly_Arduino

A visual programming editor based on blockly for Arduino、Microbit、MicroPython、Python
http://mixly.org/
Apache License 2.0
244 stars 106 forks source link

Why Russian translation crash startup Mixly? #15

Closed Enio449 closed 5 years ago

Enio449 commented 5 years ago

Hi!

I'm make Russian translate. And add: blockly\msg\js\company\ru.js blockly\msg\js\company\language\ru.js

modify in blockly\apps\mixly\code.js: Code.LANGUAGE_NAME = { 'zh-hans': '简体中文', 'zh-hant': '繁體中文', 'en': 'English', 'ru': 'Русский',

};

Code.getLang = function() { var lang = Code.getStringParamFromUrl('lang', ''); if (Code.LANGUAGE_NAME[lang] === undefined) { // Default to ru. lang = 'ru'; } return lang; };

Modify setting\config.properties: language=ru

Modify setting\config_bak.properties: language=ru

After modifications don't startup Mixly. Why? Help me.

hznupeter commented 5 years ago

Can u give me your ru.js file , i will make it work

Enio449 commented 5 years ago

it's my ru.js file from blockly\msg\js\company\ ru.zip

hznupeter commented 5 years ago

Thank you , is it based on our newest version?

Enio449 commented 5 years ago

I have version 0.998

hznupeter commented 5 years ago

i've check your ru.js file, it is not the newest version . So the Mixly can't the software cant start .

Enio449 commented 5 years ago

Where give me newesr version ru.js? My ru.js I'm make from en.js translating.

hznupeter commented 5 years ago

because we change a lot after 0.998.

Enio449 commented 5 years ago

That is, if I install version 1.0 of the beta, will there be no more error?

hznupeter commented 5 years ago

Beta😂,maybe small error.

Enio449 commented 5 years ago

Hi, friend! I'm winner problem) Add ru.properties In Mixly.jar - don't crush app on startup. But new 2 problems: 1) Russian text from ru.properties not correct (page coding UTF-8) "Новый" => "abra-cadabra" 2) On startup app modify setting\config.properties: language=ru to en

Enio449 commented 5 years ago

All right! My decision:

1) Use UTF-8 codes instead text 2) modify setting\config.properties: autoSetLanguage=false

hznupeter commented 5 years ago

Ok. We will fix it in next version.

Enio449 commented 5 years ago

Thank You!

Enio449 commented 5 years ago

Do You need files Russian localization for add to project?

hznupeter commented 5 years ago

I have add the right ru.js in the repo, we are so glad to hear you help us to translate. https://github.com/mixly/Mixly_Arduino/blob/master/mixly_arduino/blockly/msg/js/ru.js in the file ,almost english now. if you want to debug Mixly, you can open the html files location:mixly_arduino/blockly/apps/mixly/XXXX.html if you want to use the latest Mixly, you can download from http://116.62.49.166 , and then download the latest repo from github, overwrite files in mixly.zip

Enio449 commented 5 years ago

Thank You!