-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blocks do not always translate #19
Comments
I've got a hacky way I think I can fix this in my own fork of node-blockly. I'm not sure how what the correct way to fix this is yet. |
I know about this problem and think the problem is inside Blockly. Some blocks translates back correctly some not. They fixed some blocks – in earlier versions of Blockly no one blocks translated back. |
Ah yea... At first I thought it was only drop downs but now I see its all pretty random. I'll take a look at blockly at some point and see if I can do a PR there. For the time being I'm working around this in my application by creating a
Then to use Blockly I do:
Then whenever I change languages I call This seems to work fine as a work around for now. |
Turns out my work around wasn't quite enough... This line causes problems.. Since I'm not sure if my current solution is good enough for a PR, but I changed browser.js to this
Then, to change the language I do this
With this solution, |
But this solution is nice because I can change the language without doing the weird cache invalidation in my own code. If I made a PR using this pattern and cleaned it up some keeping |
You can reproduce this in your live demo, http://mo4islona.github.io/blockly/
First, load the page and change the language to french. Open the the Loops flyout to see that the while block has been translated to french. Then close the flyout and translate back to english. Check the Loops flyout again and still see french in the While block.
It seems like these blocks are getting stuck on whatever language they are set to when you first look at them.
The text was updated successfully, but these errors were encountered: