Skip to content

fix: Correct list's "find" and "get" blocks help. - #8041

Merged
NeilFraser merged 3 commits into
developfrom
fraser-listhelp
Apr 26, 2024
Merged

fix: Correct list's "find" and "get" blocks help.#8041
NeilFraser merged 3 commits into
developfrom
fraser-listhelp

Conversation

@NeilFraser

Copy link
Copy Markdown
Contributor

Both blocks were using the same help URL.

Two unrelated results of recompiling messages:

  • Allow unwanted 'qqq' messages to be reverted.
  • 'constants.json' is unchanged, but sorted.

Reported externally here: https://groups.google.com/g/blockly/c/jR7rmdplSwg

Both blocks were using the same help URL.
Two unrelated results of recompiling messages:
* Allow unwanted 'qqq' messages to be reverted.
* 'constants.json' is unchanged, but sorted.
@NeilFraser
NeilFraser requested a review from a team as a code ownerApril 16, 2024 21:32
@conventional-commit-lint-gcf

conventional-commit-lint-gcfBot commented Apr 16, 2024

Copy link
Copy Markdown

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

Comment threadmsg/json/synonyms.json Outdated
@@ -1 +1 @@
{"CONTROLS_FOREACH_INPUT_DO": "CONTROLS_REPEAT_INPUT_DO", "CONTROLS_FOR_INPUT_DO": "CONTROLS_REPEAT_INPUT_DO", "CONTROLS_IF_ELSEIF_TITLE_ELSEIF": "CONTROLS_IF_MSG_ELSEIF", "CONTROLS_IF_ELSE_TITLE_ELSE": "CONTROLS_IF_MSG_ELSE", "CONTROLS_IF_IF_TITLE_IF": "CONTROLS_IF_MSG_IF", "CONTROLS_IF_MSG_THEN": "CONTROLS_REPEAT_INPUT_DO", "CONTROLS_WHILEUNTIL_INPUT_DO": "CONTROLS_REPEAT_INPUT_DO", "LISTS_CREATE_WITH_ITEM_TITLE": "VARIABLES_DEFAULT_NAME", "LISTS_GET_INDEX_HELPURL": "LISTS_INDEX_OF_HELPURL", "LISTS_GET_INDEX_INPUT_IN_LIST": "LISTS_INLIST", "LISTS_GET_SUBLIST_INPUT_IN_LIST": "LISTS_INLIST", "LISTS_INDEX_OF_INPUT_IN_LIST": "LISTS_INLIST", "LISTS_SET_INDEX_INPUT_IN_LIST": "LISTS_INLIST", "MATH_CHANGE_TITLE_ITEM": "VARIABLES_DEFAULT_NAME", "PROCEDURES_DEFRETURN_COMMENT": "PROCEDURES_DEFNORETURN_COMMENT", "PROCEDURES_DEFRETURN_DO": "PROCEDURES_DEFNORETURN_DO", "PROCEDURES_DEFRETURN_PROCEDURE": "PROCEDURES_DEFNORETURN_PROCEDURE", "PROCEDURES_DEFRETURN_TITLE": "PROCEDURES_DEFNORETURN_TITLE", "TEXT_APPEND_VARIABLE": "VARIABLES_DEFAULT_NAME", "TEXT_CREATE_JOIN_ITEM_TITLE_ITEM": "VARIABLES_DEFAULT_NAME"} No newline at end of file
{"CONTROLS_FOREACH_INPUT_DO": "CONTROLS_REPEAT_INPUT_DO", "CONTROLS_FOR_INPUT_DO": "CONTROLS_REPEAT_INPUT_DO", "CONTROLS_IF_ELSEIF_TITLE_ELSEIF": "CONTROLS_IF_MSG_ELSEIF", "CONTROLS_IF_ELSE_TITLE_ELSE": "CONTROLS_IF_MSG_ELSE", "CONTROLS_IF_IF_TITLE_IF": "CONTROLS_IF_MSG_IF", "CONTROLS_IF_MSG_THEN": "CONTROLS_REPEAT_INPUT_DO", "CONTROLS_WHILEUNTIL_INPUT_DO": "CONTROLS_REPEAT_INPUT_DO", "LISTS_CREATE_WITH_ITEM_TITLE": "VARIABLES_DEFAULT_NAME", "LISTS_GET_INDEX_INPUT_IN_LIST": "LISTS_INLIST", "LISTS_GET_SUBLIST_INPUT_IN_LIST": "LISTS_INLIST", "LISTS_INDEX_OF_INPUT_IN_LIST": "LISTS_INLIST", "LISTS_SET_INDEX_INPUT_IN_LIST": "LISTS_INLIST", "MATH_CHANGE_TITLE_ITEM": "VARIABLES_DEFAULT_NAME", "PROCEDURES_DEFRETURN_COMMENT": "PROCEDURES_DEFNORETURN_COMMENT", "PROCEDURES_DEFRETURN_DO": "PROCEDURES_DEFNORETURN_DO", "PROCEDURES_DEFRETURN_PROCEDURE": "PROCEDURES_DEFNORETURN_PROCEDURE", "PROCEDURES_DEFRETURN_TITLE": "PROCEDURES_DEFNORETURN_TITLE", "TEXT_APPEND_VARIABLE": "VARIABLES_DEFAULT_NAME", "TEXT_CREATE_JOIN_ITEM_TITLE_ITEM": "VARIABLES_DEFAULT_NAME"} No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason this is formatted as one line?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's autogenerated by Python. I've adjusted the Python script to pretty-print.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, in retrospect, pretty-printing might not be a great idea. By having these two files as one single line, it used to be obvious that they were autogenerated (i.e. do not edit manually). Now they look editable. And JSON doesn't have a comment syntax, so we can't add a "do not edit" line.

Whatever. Either way is fine by me. Just pointing out that although this looks and reads better, someone will eventually get burned by it (like I would have been a half hour ago had this been prettier).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha I thought they were actually manually edited which is why I was confused by them being one liners, so fair enough :P Maybe adding a comment that they are autogenerated would be helpful in either case?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I said, JSON doesn't support comments. It's the biggest issue with the format. :(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I said, JSON doesn't support comments. It's the biggest issue with the format. :(

Ah my bad, missed that!

Pretty print, and easier sorting.

@cpcallencpcallen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I concur that it would be better not to pretty-print autogenerated JSON files.

Inspired by LambaMOO's string comments.
@NeilFraser

Copy link
Copy Markdown
ContributorAuthor

Added a 'comment' in the JSON.

Comment threadscripts/i18n/js_to_json.py
@NeilFraser
NeilFraser merged commit 5a5184a into developApr 26, 2024
@NeilFraser
NeilFraser deleted the fraser-listhelp branch April 26, 2024 18:23
@maribethbmaribethb mentioned this pull request Sep 8, 2025
1 task
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: fixFixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@NeilFraser@cpcallen@BeksOmega