-
Notifications
You must be signed in to change notification settings - Fork 127
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
Embed default translations #2786
Conversation
🦋 Changeset detectedLatest commit: 8b5ec71 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Size Change: +27.9 kB (+4.34%) Total Size: 670 kB
ℹ️ View Unchanged
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2786 +/- ##
==========================================
+ Coverage 87.54% 87.89% +0.35%
==========================================
Files 217 218 +1
Lines 12696 12725 +29
Branches 1723 1727 +4
==========================================
+ Hits 11115 11185 +70
+ Misses 1528 1488 -40
+ Partials 53 52 -1
|
881e75f
to
bb67cec
Compare
9b6b3ef
to
6354e86
Compare
6354e86
to
b327347
Compare
2da7283
to
6eb63f8
Compare
55f881c
to
91494a0
Compare
Addresses DSYS-850.
Purpose
Historically, the design system has concerned itself with the layout and styling of content, not the content itself. Developers were expected to provide the content as props.
This makes sense for highly dynamic and contextual content such as headings, body copy, navigation links and so on. However, there are a handful of labels that don’t change regardless of the context, such as the close button label in a modal or the input labels in the date input.
Approach and changes
useI18n
hook receives the component props and translations. If a custom translation isn't provided via the props, it returns default translations for the first supported locale, falling back toen-US
if no supported locale was found.ImageInput, and Toggletip components. Other components will follow in the future.Definition of done