Skip to content
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

feat(Multiple Languages): Convert EditComponentPrompt input to TranslatableInput #1585

Conversation

hirokiterashima
Copy link
Member

@hirokiterashima hirokiterashima commented Jan 24, 2024

Notes

  • Don't worry about styles in this PR

Changes

  • Pass in ComponentContent object to EditComponentPrompt instead of just the prompt string. This lets us convert the input to TranslatableInput.
  • Convert EditComponentPrompt's input to TranslatableInput

Test in AT

These should apply to all components, but you can just test with handful of components to save time (since they all use the same code in EditComponentPrompt):

  • In default language, editing prompt should save as before
  • Switching to a supported language using the language chooser (top-right corner of AT)...
    • shows the correct prompt text in the specified language, if it has been translated before
    • shows empty box, if it has not been translated before
    • shows the placeholder and label appear correctly
    • making changes to the prompt does nothing at the moment (saving will be implemented in the future)

@hirokiterashima hirokiterashima self-assigned this Jan 24, 2024
@hirokiterashima hirokiterashima marked this pull request as ready for review January 24, 2024 00:50
Copy link
Member

@geoffreykwan geoffreykwan left a comment

Choose a reason for hiding this comment

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

Looks good.

@hirokiterashima hirokiterashima merged commit 4202c0a into issue-1513-multiple-languages-per-unit Jan 24, 2024
@hirokiterashima hirokiterashima deleted the multiple-languages-convert-prompt-to-translatable-input branch January 24, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants