where to set the translation of "not found" in 'look up in pairs' block and 'get value for key'?
I can not found it in 'messages_zh_CN.json'.
Do you mean Weblate or GitHub? I can't find them in both.
I mean in my own clone / offline version.
There you go. Have fun.
maybe i did not explain myself good.
I know where is this file, but in this file, no entry for translation of 'not found', maybe in other file, but I don't know which one.
Hmm...that is the only JSON file that has all Mainland Chinese translations. I cannot find something for that in the file, not even in the original App Inventor.
German:
French:
and one more
'add item to list' block looks good in drawer, but after drag out, it because English again...
Why?
It seems that the "not found" block is being added to the drawer without any translation. I found the code here:
Thank you @yusufcihan.
So if I change the 'not found ' here to Chinese, it will always show Chinese even if I change the UI to English later.
Yeah, because the string is constant.
However, you should be able to reference Blockly translations in most places with using %{BKY_...}
strings. I'm not sure if that works for App Inventor too (as they use a different version of Blockly - and I don't know if that works for drawers), but I will explain anyway, so you can test if it works.
Can you try adding a new translation key like,
Blockly.Msg["LANG_DICTIONARIES_NOT_FOUND"] = "not found";
And changing the XML from:
<title name="TEXT">not found</title>
to:
<title name="TEXT">%{BKY_LANG_DICTIONARIES_NOT_FOUND}</title>
OK i will try tomorrow. Thanks.
thanks @yusufcihan.
It's working, just change to like this:
...<title name="TEXT">' + Blockly.Msg.NOTFOUND + '</title>...
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.