lokalise / i18n-ally

🌍 All in one i18n extension for VS Code
https://marketplace.visualstudio.com/items?itemName=lokalise.i18n-ally
MIT License
4k stars 321 forks source link

Text extractions menu is not working correctly #1112

Open MuhammadSawalhy opened 7 months ago

MuhammadSawalhy commented 7 months ago

Describe the bug I was happy using this extension which made my life easier regarding localization. One of the features that I most used is the text extraction feature. Now when I extract text from the code the menu is not rendered correctly, the behaviour is different when I type a key starting with Home and when not. See the screenshots below.

Content of the file ./messages/en.json: ```json { "NavBar": { "login": "Login", "get-started": "Get started", "contact-us": "Contact us", "pricing": "Pricing", "templates": "Templates", "nav-bar": "Navigation bar", "toggle-navbar": "Toggle navbar", "about-us": "About us" }, "Footer": { "sitemap": "Sitemap", "social-media": "Contact us on", "terms": "Terms", "privacy": "Privacy" }, "Home": { "Hero": { "try-it-now": "Try it now", "hero-image-alt": "Two screens of a mobile and laptop showing a website", "description": "Create a stunning website that reflects your expertise, tailored for professionals in every industry. Design, customize, and launch your own website in minutes – no technical hurdles, just professional results.", "title": "Create Your personal website in only 3 steps" }, "ThreeSteps": { "title": "3 Simple Steps", "select": "Select Template & Domain", "image-alt": "Step {number} illustration", "design": "Design", "publish": "Publish" }, "HowItWorks": { "image-alt": "How it Works", "how-it-works": "How it Works", "need-support": "Need Support?", "get-help": "Get help now from one of our team members!", "call-support": "Call Support", "one": { "title": "Enhance your online presence", "description": "Get online quickly with a bilingual website domain, hosting and professional email." }, "two": { "title": "Website essentials", "description": "Create and customize your website with our easy-to-use website builder and have all your career essential data nicely displayed." }, "three": { "title": "All data in one place", "description": "Have all your data gathered and displayed for your customers in one place." }, "four": { "title": "Professional credibility", "description": "Extend your trust and professional credibility showcasing your expertise, knowledge, academic background." } }, "PowerfulBenefits": { "description": "Unleash Your Website's Potential: Our Powerful Benefits", "your-vision-our-future": "Your Vision, Our Future.", "one": { "title": "Website Building Support", "description": "Expert support from start to finish. Build your website with confidence and ease." }, "two": { "title": "Social Media Integration", "description": "Integrate social media effortlessly. Amplify your reach and engage your audience." }, "three": { "title": "Bilingual Support", "description": "Break language barriers. Create a bilingual website for diverse audiences worldwide." }, "four": { "title": "Responsive Design", "description": "Optimized for all screens. Exceptional user experience, anytime, anywhere." }, "five": { "title": "Hosting Service", "description": "Consistent availability, fast performance. Hassle-free hosting for your website." }, "six": { "title": "Custom Domain", "description": "Stand out with a custom domain. Craft a professional online identity with ease." }, "seven": { "title": "SSL Security", "description": "Prioritize security with SSL. Build trust and safeguard sensitive information." }, "eight": { "title": "Customer Service", "description": "Personalized support for you. Dedicated to your satisfaction and website success." } } } } ```

Extension Version i18n Ally (v2.12.0)

Framework/i18n package you are using Next.js 14 / next-intl

To Reproduce Steps to reproduce the behavior:

  1. Select text and run the extraction command
  2. Start typing the key Home.
  3. See the error, the auto-completion menu is not working

Device Infomation

Extension Log Go to View -> Output -> i18n Ally, and paste the content below. You should mask any sensitive information

🈶 Activated, v2.12.0

――――――

💼 Workspace root changed to "/home/ms/myp/scicave/tekview-frontend"
📦 Packages file "package.json" found
🕳 Packages file "pubspec.yaml" not exists
🕳 Packages file "composer.json" not exists
🕳 Packages file "Gemfile" not exists
🌞 Enabled
🧩 Enabled frameworks: next-intl, General
🧬 Enabled parsers: json, yaml, json5

📈 Telemetry id: adad02ad-b347-49f1-a372-ca5fdb37cb4d
🚀 Initializing loader "/home/ms/myp/scicave/tekview-frontend"
📂 Directory structure: file
🗃 Path Matcher Regex: /^(?<locale>[\w-_]+)\.(?<ext>json|ya?ml|json5)$/

📂 Loading locales under /home/ms/myp/scicave/tekview-frontend/messages
    📑 Loading (ar) ar.json [1711058538335.7646]
    📑 Loading (en) en.json [1711075028428.0754]

👀 Watching change on /home/ms/myp/scicave/tekview-frontend/messages
✅ Loading finished

――――――

Screenshots

When typing any key not starting with Home.: image

When typing a key starting with Home.: image

lbebeck commented 7 months ago

Hey there,

I'm facing the same issue with the text extractions menu not working on VS Code Version 1.87.2 and Windows 10 using "i18n Ally (v2.12.0)."

The problem started right after updating to 1.87.2. I downgraded to 1.85, and the plugin worked again.

Seems like there might be a compatibility issue with the latest VS Code update. Hopefully, this information helps in troubleshooting the problem. Looking forward to a compatibility fix soon 👍