-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 ide-extension for better i18n handling #1653
base: master
Are you sure you want to change the base?
Conversation
I think it's because we use pluralisation, and the IDE extension doesn't seem to support that?
I believe this is similar to what we already have: Line 31 in d496326
is there any advantage to using this IDE extension instead?
I'm open to improving translations by maybe including this into the CI pipeline, however I'm not sure why there are so many errors. What are these errors about? 10000 seems a bit overwhelming to get started on. |
Hey @mifi, thanks for reviewing the PR.
You are right, I opened a issue for that. The i18next plugin should parse that correctly and give that information to inlang. -> opral/monorepo#1069
The extract feature is comparable to the i18next-parser lib. Extracting with the
Next to extracting there are inline annotations, which show the translation of the reference language. That is extremely helpful when the keys and translations are not the same. Over time the reference translation will change. And I assume that also happened to -> 🤫 there are two devs working fulltime on the ide-extension, you should expect big updates in the next weeks. i18n handling in the ide is just a pain and we try to make the DX as good as possible. When you have opinions. Feel free to join discussions -> https://github.com/inlang/inlang/issues
At first, there are multiple error types in the standard lint rules. -> https://github.com/inlang/inlang/tree/main/source-code/plugins/standard-lint-rules/ Most likely there are some missing translations for some languages. To further investigate you can use the editor https://inlang.com/editor/github.com/NilsJacobsen/lossless-cut -> based on my fork. You can play around with lint rule and language filters to see where the errors are coming from. For example, there are 49 missing messages in German, which could lead to a negative experience for your user. In my eyes there is a big business opportunity to fix the errors. |
Not sure why
I think your inlang project sounds interesting, and it's cool that you guys are trying to improve the DX of i18n. |
@mifi the problem with the I know that you are using weblate and that is totally fine. They can be used concurrently: weblate for editor and inlang for CI and ide-extension (soon GitHub actions). We are currently working on making inlang bulletproof. We can leave this open and I'm gonna update you about big updates regarding the ide-extension.👍 |
I added the inlang IDE extension to lossless-cut. Helps with handling translation keys and translation linting.
What did I add?
inlang.config.js
to configure where language translations areHow to use it?
Extract Messages (translations)
Extract Messages (translations) via the Inlang: Extract Message code action.
Inline annotations
You can see translations directly in your code. No back-and-forth looking into the translation files themselves. (code example from lossless-cut)
Ootb CLI.