question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Empty English strings localized into "<!-- -->" in French

See original GitHub issue

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:

  1. Open Blockly Code Editor demo, in English.
  2. Add a function block with an output and place it on the screen.
  3. In the top right corner, change the language to French
  4. 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

image image

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:

  1. Blockly.Msg["LISTS_GET_INDEX_TAIL"]
  2. Blockly.Msg["LISTS_GET_SUBLIST_TAIL"]
  3. Blockly.Msg["MATH_ONLIST_HELPURL"]
  4. Blockly.Msg["ORDINAL_NUMBER_SUFFIX"]
  5. Blockly.Msg["PROCEDURES_DEFNORETURN_DO"]
  6. Blockly.Msg["TEXT_CHARAT_TAIL"]
  7. Blockly.Msg["TEXT_GET_SUBSTRING_TAIL"]

image

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:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
NeilFrasercommented, Aug 23, 2021

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.

0reactions
BeksOmegacommented, Aug 23, 2021

Although, it looks like we forgot to announce the July 2021 release on that newsgroup. Will bring this up with the team on Monday.

That’s my bad. I missed that the internal release docs say we’re supposed to bcc the announce group 😕

Read more comments on GitHub >

github_iconTop Results From Across the Web

iOS localization not working for French Canada - Stack Overflow
I have an iOS Application which was built in Xcode and uses Localization.string files with NSLocalStrings to handle localisation and ...
Read more >
No localization from Main.Storyboard (English)
But, all texts to be translated automatically by the Storyboard are still displayed in French. All of them (View Title, Button, Label, etc)....
Read more >
String Localization - objc.io
Localizing apps into multiple languages comes with a variety of different tasks. Since this issue is all about strings, we're going to take ......
Read more >
Change the Language of Your Search Interface
The Coveo JavaScript Search Framework allows you to change the language of the strings in your search interface. This is otherwise known as...
Read more >
UI Localization into Romance Languages | Art One Translations
UI Localization into Romance languages. Common characteristics to consider for localization to French, Spanish, Portuguese | Art One ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found