Skip to content

Conversation

@microbit-grace
Copy link

@microbit-grace microbit-grace commented Jan 3, 2025

  • Adds translation files for CreateAI.
  • Sync language from tool to embedded MakeCode. Currently, changing MakeCode language does not work.
  • Updates extension version to also support translations. (First translation sync pxt-microbit-ml#31)
  • Adds a link to ask for more support in translation in Language dialog. (https://github.com/microbit-foundation/ml-trainer-microbit/pull/16 (private))
  • Script for adding machine-learning-strings.json to ui.en.json for MakeCode default code view.
  • Handle different translations and text length for default code view blocks.

@github-actions
Copy link

github-actions bot commented Jan 3, 2025

Preview build will be at
https://review-createai.microbit.org/translations/

@microbit-grace microbit-grace changed the title [WIP - DO NOT MERGE] Translations First translation sync Jan 6, 2025
@microbit-grace microbit-grace marked this pull request as ready for review January 6, 2025 13:45
@microbit-grace microbit-grace requested a review from a team January 6, 2025 13:45
@microbit-grace microbit-grace removed the request for review from a team January 6, 2025 14:03
More thought needed as to how to get language from embedded MakeCode to tool. Changing language works locally, but not in a deployed version. MakeCode reloads the iframe and lang param used to embed MakeCode is used to determine the language instead of using what the user selected.
lang/ui.en.json Outdated
Comment on lines 1063 to 1064
"defaultMessage": "MakeCode block: on ML {actionName} start, show icon {iconName}",
"description": "Makecode default block alt text"
Copy link
Author

@microbit-grace microbit-grace Jan 7, 2025

Choose a reason for hiding this comment

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

Currently I only use the translated "MakeCode block" portion of this string to compose the alt text (See CodeViewDefaultBlock.tsx line 56-65). Shall I manually trim the defaultMessages of all the "makecode-block-default-alt" in ui.xx.json so that only MakeCode block is being translated?

Choose a reason for hiding this comment

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

Let's just have the prefix as a string.
So change to ID makecode-block-alt-prefix
text is just "MakeCode block:"
description is "Makecode block alt text prefix"

Then update the code to use that more straightforwardly.

Choose a reason for hiding this comment

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

Code change looks good, thanks. Will try in a mo then merge.

Choose a reason for hiding this comment

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

We can use a46efe6 to reinstate these in Crowdin.

@microbit-matt-hillsdon microbit-matt-hillsdon merged commit d8952da into main Jan 7, 2025
1 check passed
@microbit-matt-hillsdon microbit-matt-hillsdon deleted the translations branch January 7, 2025 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants