Skip to content

Conversation

@microbit-grace
Copy link

@microbit-grace microbit-grace commented Nov 4, 2024

  • Translate “Untitled” project names
  • Translate icon names
  • Translate Led icon picker aria labels

The top part of the this list of translation TODOs doc (private): https://paper.dropbox.com/doc/CreateAI-translation-thoroughness-review-ui.en.json--CZ97k~y_kLdxH~ffwjgPpsJEAQ-nRUKbyPBmyCsUY3L3YtNa

Filenames have not been translated as they're not as essential

@github-actions
Copy link

github-actions bot commented Nov 4, 2024

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

Comment on lines 119 to 124
// If project name is null, set project name as translated "untitled" name.
useEffect(() => {
if (projectName === null) {
setProjectName(defaultProjectName);
}
}, [defaultProjectName, intl, projectName, setProjectName]);
Copy link
Author

Choose a reason for hiding this comment

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

Not sure if this is the best way of doing it. The store can't access the translated untitled string

Choose a reason for hiding this comment

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

Hmm this has ended up a bit unpleasant. Is it feasible to pass it in? I guess initialisation might be awkward - store init would need to be triggered from in a React context and we don't have a notion of waiting for init right now?

Choose a reason for hiding this comment

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

Perhaps OK to use English "Untitled" or another placeholder and swap at the point of asking for a name for the project?

Copy link
Author

Choose a reason for hiding this comment

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

I think delaying the switch between using the translated untitled version makes sense 👍 I have made the change in this commit f90f00d and have had follow-up commits to clean up/fix/revert other bits

Choose a reason for hiding this comment

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

I'd still like to play with this some more and see if there's a simpler option - but if I don't get to it today we'll go ahead with this.

Choose a reason for hiding this comment

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

Had a play, can't see a reasonable-effort approach to improving this. Sorry for the pointless delay.

@microbit-grace microbit-grace requested a review from a team November 4, 2024 13:18
@microbit-matt-hillsdon
Copy link

Snuck in one more toLocaleLowerCase -> toLowerCase tweak.

@microbit-matt-hillsdon
Copy link

Will wait for build then merge.

@microbit-matt-hillsdon microbit-matt-hillsdon merged commit 565d914 into main Nov 7, 2024
1 check passed
@microbit-matt-hillsdon microbit-matt-hillsdon deleted the translation-tweaks branch November 7, 2024 09:48
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