Hi,
I'm using @blockly/continuous-toolbox.
When I try to localize category names in the toolbox by setting
I notice that in the ContinuousFlyout, the %{BKY_...} references are replaced correctly.
However, in the ContinuousToolbox, the string is shown literally as "%{BKY_CATEGORY_AAAA}" instead of being localized.
Is this expected behavior, or should ContinuousToolbox also process %{BKY_...} message references like the standard toolbox does?
Thanks!
Hi Aaron,
Thanks for your reply! Yes, my code is public. Here is the repository:
👉 https://github.com/surahotoke/scratch-regex-editor
The related code for language switching is in ui.js lines 28–51.
What I’m seeing is that the %{BKY_...} replacement works fine in the ContinuousFlyout, but in the ContinuousToolbox the category names still appear literally as %{BKY_CATEGORY_XXXX}.
Could you please take a look when you have a chance?
Thanks again for your help!
Best regards,
Takuto N (surahotoke)
Thank you so much!
I tried your suggestion with workspace.updateToolbox(toolbox); and now it works perfectly. 🎉
I really appreciate your help!
Best regards,
Takuto N (surahotoke)
Hi Aaron / Blockly team,
I ran into a new issue related to localization. I added BKY message references to block TOOLTIPs for Japanese.
In the ContinuousFlyout, %{BKY_...} is displayed literally and not replaced for some tooltips.
Interestingly, some blocks (like the (?<name>{}) block) display the localized text correctly.
Dragging a block from the flyout to the workspace shows the correct tooltip.
Mutator blocks seem unaffected.
From my research, this seems related to:
https://github.com/google/blockly/issues/1964
https://github.com/google/blockly/issues/1964#issuecomment-401861394
Following the first suggested workaround appears to potentially resolve the issue, but I’m puzzled why some tooltips are localized correctly while others are not.
Do you know of a better approach to ensure all block tooltips get updated when changing language?
Thanks for your help!
Best regards,
Takuto N (surahotoke)