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

Asthma: Spanish Translations #233

Merged
merged 3 commits into from
Apr 16, 2024
Merged

Asthma: Spanish Translations #233

merged 3 commits into from
Apr 16, 2024

Conversation

greinard
Copy link
Collaborator

Overview

This branch finishes adding Spanish language support to the Asthma components. All translations were created using ChatGPT. I also added a language toggle to each of the Asthma component stories for easier testing via the Storybook.

The provider report component remains English-only for the time being. We haven't decided yet whether that should support Spanish as well.

Security

REMINDER: All file contents are public.

  • I have ensured no secure credentials or sensitive information remain in code, metadata, comments, etc.
    • Please verify that you double checked that .storybook/preview.js does not contain your participant access key details.
    • There are no temporary testing changes committed such as API base URLs, access tokens, print/log statements, etc.
  • These changes do not introduce any security risks, or any such risks have been properly mitigated.

Describe briefly what security risks you considered, why they don't apply, or how they've been mitigated.

  • No security risks. The primary purpose of this PR is to fill in missing translations for previously existing display strings.

Checklist

Testing

Documentation

  • I have added relevant Storybook updates to this PR as well.

@ajmenca
Copy link
Collaborator

ajmenca commented Mar 28, 2024

I've only looked a little bit at some of storybook's underlying setup functionality - but the addition of that language toggle feels like something that we could configure to show up automagically somehow? Like some of the stuff you did with the dark mode/light mode toggle - this is a pattern we want to better establish for our Stories - but it would be nice if we could do it without having to copy/paste boilerplate.

@greinard
Copy link
Collaborator Author

Yeah, I agree, it would be nice to have a few of those common control types baked in. I'm not really sure how to do that. I suspect that it will involve the use of some third party storybook plugin(s) to make it happen, but it is something we can explore.

Also, even if we can do that, I'm not sure it will eliminate all the boilerplate, since you'll still need to define the appropriate fields on your args/props interfaces and specify the default values in the args config for each story, but at least we wouldn't need to re-define the argTypes over and over again if we can find a way to reuse those.

@greinard
Copy link
Collaborator Author

greinard commented Apr 15, 2024

Planning to merge this later today if there are no objections or requests for delay. Thanks!

Copy link
Contributor

@brandoncharnesky brandoncharnesky 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. MDH-ViewBuilder uses a global switch for language, it would be nice if that could be used in MDH-UI as well at some point.

Copy link
Collaborator

@reneefromhold reneefromhold left a comment

Choose a reason for hiding this comment

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

Echoing the desire for this to be at a higher level. lg otherwise

@greinard
Copy link
Collaborator Author

Special thanks to @brandoncharnesky for figuring out a global language picker setup. I have removed the boilerplate code from each of the stories.

@greinard greinard merged commit 28b6cef into main Apr 16, 2024
@greinard greinard deleted the AsthmaSpanishTranslations branch April 16, 2024 16:40
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.

4 participants