-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
Describe the bug
Some blocks, like the function block with or without outputs, are displayed differently in English and in French.
In French, there is an extra <!-- --> on the left of the block.
To Reproduce
Steps to reproduce the behavior:
- Open Blockly Code Editor demo, in English.
- Add a function block with an output and place it on the screen.
- In the top right corner, change the language to French
- Observe the left side of the block with an additional
<!-- -->
You can also use the two following links to open the shared demo illustrating the problem:
https://blockly-demo.appspot.com/static/demos/code/index.html?lang=fr#czndiz
https://blockly-demo.appspot.com/static/demos/code/index.html?lang=en#czndiz
Expected behavior
There is no <!-- --> text displayed when not needed
Screenshots
Desktop (please complete the following information):
- OS: Windows 10
- Google Chrome
- Version 92.0.4515.159 (Build officiel) (64 bits)
Stack Traces
No error in stack trace if I looked at the good place.
Additional context
I did a little bit of investigation since I observed the problem when localizing a downstream project that we are about to release our version 2, that is using Blockly version 6.20210701.0.
In French, there was an extra <!-- --> that weren't in my translated strings.
The original problematic French string was Blockly.Msg["PROCEDURES_DEFNORETURN_DO"] = "<!-- -->";
When searching in this repository's msg folder for <!-- -->, I didn't find any other language that was affected except French, where the following 7 strings have this value:
Blockly.Msg["LISTS_GET_INDEX_TAIL"]Blockly.Msg["LISTS_GET_SUBLIST_TAIL"]Blockly.Msg["MATH_ONLIST_HELPURL"]Blockly.Msg["ORDINAL_NUMBER_SUFFIX"]Blockly.Msg["PROCEDURES_DEFNORETURN_DO"]Blockly.Msg["TEXT_CHARAT_TAIL"]Blockly.Msg["TEXT_GET_SUBSTRING_TAIL"]
Other languages have some text in some of these 7 strings, and others leave it blank and have a comment saying it's untranslated (Blockly.Msg["TEXT_GET_SUBSTRING_TAIL"] = ""; // untranslated).
Looking at the git history, the <!-- --> were introduced in commit aed9ba1 (Rebuild (#4733)) on 2021-03-25 at 12:37 for the msg/js/fr.js file. For the msg/json/fr.json file, the commit introducing the changes was 21fd86a on 2021-02-15 at 08:40 (a translatewiki update).
Before the introduction of changes, there was either nothing, an empty string with the untranslated comment, or at one point "ORDINAL_NUMBER_SUFFIX": "<!-- ---->".
In the issues I looked for, I couldn't see anything related except the discussion about the ordinal number suffix.


