-
-
Notifications
You must be signed in to change notification settings - Fork 221
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: Improved localization API #343
Conversation
✅ Deploy Preview for creative-fairy-df92c4 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #343 +/- ##
==========================================
+ Coverage 78.39% 78.69% +0.30%
==========================================
Files 102 106 +4
Lines 7128 7469 +341
Branches 622 663 +41
==========================================
+ Hits 5588 5878 +290
- Misses 1523 1572 +49
- Partials 17 19 +2 ☔ View full report in Codecov by Sentry. |
package.json
Outdated
@@ -1,7 +1,7 @@ | |||
{ | |||
"name": "wxt", | |||
"type": "module", | |||
"version": "0.14.1", | |||
"version": "0.14.2-alpha1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert before merging
@dvlden I've released pnpm i wxt@next |
Amazing! I will definitely test it tomorrow. It's late now and I'm headed to bed. Giving you my feedback tomorrow, thanks man! 🤙 |
Alright, I've integrated the alpha release into one of my extensions to try it out. Everything works great at runtime, but there's some DX improvements I'd like to make:
|
Sorry for slower response. I just grabbed a chance to test this. Notes (alpha):
# Not working
state:
- Normal
- Upscale
- Stretch
activity:
# ...
state:
active: On
inactive: Off // Shows autocompletion, but renders as empty string
i18n.t('activity_state_active')
I think I found it most annoying, not being able to click on the property key to edit the locale message. You said it doesn't let you do it for nested properties, but I can't do it with a non-nested property either. Not sure if I need an extension for that, but native |
Good feedback, missed all that. I'll try and get an improved version released next weekend |
3198234
to
c39087a
Compare
This PR is way out of date, closing in favor of #758. Will be copying over a lot of code from this PR instead of dealing with merge conflicts. |
This closes #327 . It adds a new module (that's auto-imported by default),
wxt/i18n
. To use the API:Typed placeholdersWill add this in a future PR, but the overidable types support defining types for the placeholders.browser.i18n.getMessage
i18n
variable