Skip to content

Cannot detect file changes while using devcontainer #1343

@AkiraVoid

Description

@AkiraVoid

Describe the bug
While using this extension in a devcontainer environment, the changes (creation/deletion/renaming/content change, etc.) under the source folder will not be detected automatically. Users will have to reload the vscode window to get this extension functions properly, for example, after they added a new key or changed the content of a key.

Extension Version
2.13.1

Framework/i18n package you are using

  • i18next
  • react-i18next

To Reproduce
Steps to reproduce the behavior:

  1. Create a project with a devcontainer profile
  2. Open this project in devcontainer
  3. Add i18n ally settings, locale files, reload the window and make sure the i18n ally functions properly
  4. Make any change in locale files, like adding a new key and translation in the file
  5. Go back and see that the change has not been applied properly

Device Infomation

  • OS: Windows 11 Pro
  • Version: 26100.4946
  • VS Code Version: 1.103.2

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

🈶 Activated, v2.13.1

――――――

💼 Workspace root changed to "/workspaces/Atlas"
🌞 Enabled
🧩 Enabled frameworks: React, React I18next, i18next
🧬 Enabled parsers: json, yaml, json5

📈 Telemetry id: 0361f420-0642-4661-8298-d1a01a53af0e
🚀 Initializing loader "/workspaces/Atlas"
📂 Directory structure: dir
🗃 Custom Path Matcher: {locale}/{namespaces}.json
🗃 Path Matcher Regex: /^(?<locale>[\w-_]+)\/(?<namespace>.+)\.json$/

📂 Loading locales under /workspaces/Atlas/public/locales
	📑 Loading (en) en/common.json [1757152569192.8767]
	📑 Loading (zh-Hans) zh-Hans/common.json [1757154215422.229]
	📑 Loading (zh-Hans) zh-Hans/pages/homepage.json [1757153459286.168]
	📑 Loading (en) en/pages/homepage.json [1757152748217.0325]

👀 Watching change on /workspaces/Atlas/public/locales
✅ Loading finished


――――――

🔄 Update usage cache of /workspaces/Atlas/src/pages/HomePage.tsx

Screenshots

Image

Note that the common.json in the output was renamed to glossary.json without any changes in content, and the i18n ally cannot detect this change, so the key gloassary:atlas was reported as not found.

As a comparison, after I renamed the glossary.json back to common.json, the extension can recognize the key common:atlas:

Image

And after I reloaded the VSCode window, the extension can recognize the key glossary:atlas as aslo:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions