Empty English strings localized into "<!-- -->" in French
See original GitHub issueDescribe 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 aed9ba13a92a59d2083eef1a20c7227ef2231d34 (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 21fd86a71a476f4b633f5bb12d891a7d59a2498b 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.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
New releases are announced here: https://groups.google.com/g/blockly-announce
Although, it looks like we forgot to announce the July 2021 release on that newsgroup. Will bring this up with the team on Monday.
In the mean time, you can hack your local copy by just editing msg/js/fr.js and setting the seven offending messages to “”. You can ignore the JSON files, they are part of the upstream build process.
That’s my bad. I missed that the internal release docs say we’re supposed to bcc the announce group 😕