-
Notifications
You must be signed in to change notification settings - Fork 4
Prepare for translation tweaks #462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Preview build will be at |
src/hooks/project-hooks.tsx
Outdated
| // If project name is null, set project name as translated "untitled" name. | ||
| useEffect(() => { | ||
| if (projectName === null) { | ||
| setProjectName(defaultProjectName); | ||
| } | ||
| }, [defaultProjectName, intl, projectName, setProjectName]); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
|
Snuck in one more toLocaleLowerCase -> toLowerCase tweak. |
|
Will wait for build then merge. |
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