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: add string interpolation support for locale service #1362

Merged
merged 3 commits into from Feb 20, 2024

Conversation

jikkai
Copy link
Member

@jikkai jikkai commented Feb 18, 2024

  • I am sure that the code is update-to-date with the dev branch.

Usage

const locales = {
  welcome: 'hello, {0}'
}

console.log(t('welcome', 'world')) // 'hello, world'

Copy link

github-actions bot commented Feb 18, 2024

View Deployment

📑 Examples 📚 Storybook
🔗 Preview link 🔗 Preview link

Copy link

codecov bot commented Feb 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a6e17ef) 31.48% compared to head (2772218) 31.55%.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1362      +/-   ##
==========================================
+ Coverage   31.48%   31.55%   +0.06%     
==========================================
  Files         858      858              
  Lines       48628    48636       +8     
  Branches    10050    10052       +2     
==========================================
+ Hits        15312    15347      +35     
+ Misses      33316    33289      -27     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@wzhudev wzhudev left a comment

Choose a reason for hiding this comment

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

Please use English to comment our code.

Overall, LGTM.

@jikkai
Copy link
Member Author

jikkai commented Feb 20, 2024

I added JSDoc to explain the new syntax of the t function.

@jikkai jikkai merged commit 8f338ba into dev Feb 20, 2024
7 checks passed
@jikkai jikkai deleted the feat/string-interpolation branch February 20, 2024 14:12
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.

None yet

2 participants