Skip to content

ember-intl integration #2878

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

Open
wants to merge 77 commits into
base: main
Choose a base branch
from
Open

Conversation

zamoore
Copy link
Contributor

@zamoore zamoore commented May 14, 2025

📌 Summary

If merged, this PR enables ember-intl for the components package and translates some of the bare strings. It also sets up linting rules preventing the usage of bare strings.

Details

  • Adds ember-intl dependency to both the showcase and components workspaces.
  • Translated all text nodes in the components dir in a single en-us.yaml file
  • Translated any of the following attributes or HTML properties found in components
    • 'aria-label'
    • 'aria-description'
    • 'title'
    • 'placeholder'
    • 'alt'
    • '@text'
  • Added linting rule to components no-bare-strings which prevents untranslated text nodes

Jira ticket: HDS-4856


👀 Component checklist

💬 Please consider using conventional comments when reviewing this PR.

Copy link

vercel bot commented May 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
hds-showcase ✅ Ready (Inspect) Visit Preview Jun 20, 2025 7:36pm
hds-website ✅ Ready (Inspect) Visit Preview Jun 20, 2025 7:36pm

didoo
didoo previously approved these changes Jun 19, 2025
Copy link
Contributor

@didoo didoo left a comment

Choose a reason for hiding this comment

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

For me is a go! 👍
I've left only a few questions/thoughts (nothing major or blocker). If you decide to act on them let me know so I can re-approve.

Lovely PR, very well done! 🙌

dchyun
dchyun previously approved these changes Jun 19, 2025
Copy link
Contributor

@dchyun dchyun left a comment

Choose a reason for hiding this comment

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

This looks great! Très bien! 🇫🇷 Only have a few non-blocking comments

didoo
didoo previously approved these changes Jun 19, 2025
Copy link
Contributor

@didoo didoo left a comment

Choose a reason for hiding this comment

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

re-approving

@aklkv
Copy link
Collaborator

aklkv commented Jun 19, 2025

Given that it's pretty hard to follow is going on here and most importantly why we need this I would like to request to have RFC before this goes out

@zamoore
Copy link
Contributor Author

zamoore commented Jun 20, 2025

Given that it's pretty hard to follow is going on here and most importantly why we need this I would like to request to have RFC before this goes out

Hey @aklkv . We need this as there is a broader organizational goal to internationalize our applications. Notably for french language requirements as we conduct business in Quebec. Are there some specific questions I can answer for you to help you figure out what's going on?

{{/if}}
</SG.Item>
<SG.Item as |SGI|>
<SGI.Label>Using the <code>hds-intl</code> service"</SGI.Label>
Copy link
Contributor

Choose a reason for hiding this comment

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

[Issue] Looks like both service examples are not having their translations applied when using the dropdown. It looks like the translation paths are correct in the controller so not sure what the issue is.
Screenshot 2025-06-20 at 4 00 09 PM

</Hds::ApplicationState>
</SG.Item>
<SG.Item as |SGI|>
<SGI.Label>Using the <code>ember-intl</code> <code>t</code> helper"</SGI.Label>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<SGI.Label>Using the <code>ember-intl</code> <code>t</code> helper"</SGI.Label>
<SGI.Label>Using the <code>ember-intl</code> <code>t</code> helper</SGI.Label>

[Nit] Trailing quotation mark. Note: this is on all the labels here.

Copy link
Collaborator

@aklkv aklkv left a comment

Choose a reason for hiding this comment

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

@zamoore I am blocking for now, I will reach out with my questions/concerns to @alex-ju on Monday as I believe this is not correct forum to having this discussions

@alex-ju
Copy link
Member

alex-ju commented Jun 23, 2025

@zamoore I am blocking for now, I will reach out with my questions/concerns to @alex-ju on Monday as I believe this is not correct forum to having this discussions

@aklkv since this is an open-source project and we're working in the open, this repository is actually the best forum to raise any questions or concerns. that way, the full context is visible to @hashicorp/hds-engineering, and others who may have similar questions can benefit from the discussion. looking forward to continuing the conversation here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants