-
Notifications
You must be signed in to change notification settings - Fork 345
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
Extracting text into i18n message into a namespace mistakenly create a property with the namespace name #920
Comments
@andrejoaquim-dc Thank you for the report! Would you be open to send a fix pull request for this? |
I think that this issue comes from the changes made in the getPathWithoutNamespace method It used to check only on the presence of the namespace as a prefix, but now checks on namespace + delimiter (which is I'm not familiar enough with this project, so I might be wrong on that :) |
@kibertoad Yes, I can try taking a look at it. @ocadoret thanks for flagging, I'll check if that's the case. Is there any test suite for this behaviour that I could check? |
Hey @Swiftwork! Would you mind helping me out a bit in understanding where this bug might come from? Thanks in advance! |
@andrejoaquim-dc unfortunately I don't have a deep insight into the project and it's been a while since I contributed that PR. I assume that it's probably just a statement somewhere that should have another check but I couldn't tell you where. Probably easiest is to add debug breakpoints and see why the namespace isn't removed. Might be that the extract text and inline resolve (the translation replacement) use the same function but need two different outputs. @ocadoret might be right in checking that. Unfortunately I don't have time to assist. Good luck hunting! |
Yes, I'm facing the same issue right now. There is someone current working on this? Maybe with the right instructions i could try open a PR. |
Hey @jeansantodb1, I still haven't find time to work on this, unfortunately :( |
…pace (#920) * Re-enable adding strings to the proper namespace * Re-enable navigation to strings in the proper namespace * Remove a new line --------- Co-authored-by: Alex Terehov <[email protected]>
A fix for the issue is released in v2.9.1 @andrejoaquim-dc @jeansantodb1 can you check whether it was fully solved? |
v2.9.1 is working for me, thanks a lot ! |
Yes! Thanks a lot! 💪 |
@terales I assume there was a reason I added those additional delimiters but if the code works without them and no other issues arise, great! Glad to see that some more work on this great plugin is being done. |
…pace (lokalise#920) * Re-enable adding strings to the proper namespace * Re-enable navigation to strings in the proper namespace * Remove a new line --------- Co-authored-by: Alex Terehov <[email protected]>
Describe the bug
Extracting text into i18n messages has a bug that creates an additional property to the JSON file equal to the namespace's name.
This bug is not present in version 2.8.1.
Extension Version
i18n-ally 2.9.0 for Visual Studio Code
Framework/i18n package you are using
react-i18next
To Reproduce
Steps to reproduce the behavior:
locales/en/indexPage.json
andlocales/en/aboutUsPage.json
aboutUsPage
namespace"aboutPage"
key.I've the following configuration:
Device Infomation
Extension Log
Go to
View
->Output
->i18n Ally
, and paste the content below. You should mask any sensitive informationOutput > `i18n Ally`
Screenshots
v2.9.0
Screen.Recording.2023-05-02.at.16.57.30.mov
v2.8.1 (where the issue's not happening)
Screen.Recording.2023-05-02.at.16.58.35.mov
The text was updated successfully, but these errors were encountered: