-
Notifications
You must be signed in to change notification settings - Fork 347
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: Update next-intl
to support latest release
#1048
Conversation
…nslations` & `t.markup`)
Co-authored-by: Robin Louarn <[email protected]>
Edit: languageIds:
- javascript
- typescript
- javascriptreact
- typescriptreact
usageMatchRegex:
- "[^\\w\\d]t\\(['\"`]({key})['\"`]"
scopeRangeRegex: "getTranslations\\(\\s*\\[?\\s*['\"`](.*?)['\"`]"
monopoly: true |
next-intl
to support latest release candidatenext-intl
to support latest release
@terales Any chance this could be reviewed and possibly released? Thank you for your help! |
This one doesn't work for me. I wrote this one based on the changes in the PR. languageIds:
- javascript
- typescript
- javascriptreact
- typescriptreact
usageMatchRegex:
- "[^\\w\\d]t\\s*\\(\\s*['\"`]({key})['\"`]"
- "[^\\w\\d]t\\s*\\.rich\\s*\\(\\s*['\"`]({key})['\"`]"
- "[^\\w\\d]t\\s*\\.markup\\s*\\(\\s*['\"`]({key})['\"`]"
- "[^\\w\\d]t\\s*\\.raw\\s*\\(\\s*['\"`]({key})['\"`]"
scopeRangeRegex: "(?:useTranslations|getTranslations)\\(\\s*\\[?\\s*['\"`](.*?)['\"`]"
monopoly: true Key thing here is to group |
Alternative: VS Code extension Sherlock i18n does now also support
|
I was having issues when I used scopeRangeRegex: "(?:getTranslations|useTranslations)\\((?:\\s*['\"`]|{\\s*namespace:\\s*['\"`])(.*?)['\"`]" Now it matches this as long as you pass in It still does not match something like |
@kibertoad we need this :) |
UP! Looking forward to use this feature! |
@kibertoad Can you look into this? Support for getTranslations is very much needed. Thanks! |
Hey, I'm waiting for this support too! Thanks |
Seems that this extension is no longer maintained. Anyways, I forked the PR repo and build / installed the custom version myself! |
@antfu No longer works at lokalise, now part of Nuxt team it seems... Maybe you could add some people as maintainer, like @amannn Anthony, therefore some PR could be merged. For others, you might try https://next-intl-docs.vercel.app/docs/workflows/vscode-integration#sherlock ? |
@ScreamZ Hi, Felix from Sherlock team here, happy to help anyone onboard if there are any issues, just hmu 🤙 |
Just installed IT, works like a charm. Thank you Also could've been better if options were in |
@ScreamZ Feel free to open issues & PR's if anything is missing what you have loved in i18n-ally. A lot of decisions in Sherlock are based in "convention over configuration" so we handle a lot of things ootb with minimal upfront configuration. At the same time, we want to offer great flexibility where it makes sense. We still testing the amount of flexibility and are keen to invest resources into making Sherlock the best i18n extension in VS Code. @ScreamZ What do you refer to with "fink monorepo cloning"? 😅 |
In case you want to keep using this extension (i18n-ally), I just found a solution to make it work with The solution works with You can find the solution at Next.js Boilerplate and you just need to copy the file PS: @stijn-vk, I found a solution to make it work with |
@amannn you could add this to the doc, it works :) |
Out of curiosity, I did a security check for i18n-ally: and it seems at this point, you have to be VERY careful to use it. Caution There are several critical vulnerabilities (at this point 4) and lots of high ones (over 40), that said – please go for an alternative. 106 vulnerabilities (60 moderate, 42 high, 4 critical)npm audit report@antfu/utils <0.7.3 @babel/traverse <7.23.2 ansi-regex 3.0.0 || 4.0.0 - 4.1.0 || 5.0.0 axios <=0.27.2 browserify-sign 2.6.0 - 4.2.1 decode-uri-component <0.2.1 dot-prop <4.2.1 follow-redirects <=1.15.5 get-func-name <2.0.1 glob-parent <5.1.2 got <=11.8.3 http-cache-semantics <4.1.1 jsdom <=16.5.3 json-schema <0.4.0 json5 <1.0.2 || >=2.0.0 <2.2.2 loader-utils <=1.4.1 || 2.0.0 - 2.0.3 lodash.template * markdown-it <12.3.2 minimatch <3.0.5 nanoid 3.0.0 - 3.1.30 node-fetch <2.6.7 node-forge <=1.2.1 nth-check <2.0.1 postcss <=8.4.30 pug <=3.0.2 qs 6.5.0 - 6.5.2 request * semver <=5.7.1 || 6.0.0 - 6.3.0 || 7.0.0 - 7.5.1 semver-regex <=3.1.3 tar <6.2.1 terser >=5.0.0 <5.14.2 || <4.8.1 tough-cookie <4.1.3 trim-newlines <3.0.1 trim-off-newlines <1.0.3 106 vulnerabilities (60 moderate, 42 high, 4 critical) To address issues that do not require attention, run: To address all issues possible (including breaking changes), run: Some issues need review, and may require choosing |
thanks a lot! |
Adds support for:
getTranslations
t.markup
Thanks!