Skip to content
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

The extension is unable to ignore the index.js file in the locales folder despite configuration settings to ignore it. #1217

Open
tieniu1 opened this issue Oct 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@tieniu1
Copy link

tieniu1 commented Oct 11, 2024

Describe the bug
The extension is unable to ignore the index.js file in the locales folder despite configuration settings to ignore it.

Extension Version
i18n Ally (latest version)

Framework/i18n package you are using
vue-i18n

To Reproduce
Steps to reproduce the behavior:

  1. Set up a project with i18n
  2. Create an index.js file in the locales folder (e.g., src/i18n/lang/index.js)
  3. Configure VS Code settings to ignore this file:
    {
      "i18n-ally.localesPaths": [
        "src/i18n/lang",
      ],
      "i18n-ally.usage.scanningIgnore": [
        "src/i18n/lang/index.js",
      ],
      "i18n-ally.ignoreFiles": [
        ".i18nignore",
        "src/i18n/lang/index.js"
      ]
    }
  4. Also add the file path to .i18nignore:
    **/lang/index.js
    src/i18n/lang/index.js
    
  5. Reload VS Code window
  6. Observe that the index.js file is still being processed by i18n Ally

Device Information

  • OS: macOS
  • Version: 12.6
  • VS Code Version: latest

Extension Log
🧰 Config "i18n-ally.ignoreFiles" changed, reloading
🔁 Reloading loader
🧩 Enabled frameworks: Vue
🧬 Enabled parsers: js

🚀 Initializing loader "/Users/lin2022/Desktop/work/banaba_study_planner"
📂 Directory structure: file
🗃 Path Matcher Regex: /^(?[\w-_]+).(?m?js)$/

📂 Loading locales under /Users/lin2022/Desktop/work/banaba_study_planner/src/i18n/lang
📑 Loading (en) en.js [1728556068337.1614]
📑 Loading (es) es.js [1728556076369.6062]
📑 Loading (index) index.js [1728635931487.5708]
📑 Loading (zh-CN) zh-CN.js [1728635492242.2498]

👀 Watching change on /Users/lin2022/Desktop/work/banaba_study_planner/src/i18n/lang
✅ Loading finished

Screenshots
image

Additional Notes:

  • I've tried reloading the VS Code window and updating the extension to the latest version.
  • I've also attempted to create an .i18nrc file in the project root with ignore settings, but the issue persists.

Any assistance in resolving this issue would be greatly appreciated. Thank you for your time and effort.

@tieniu1 tieniu1 added the bug Something isn't working label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant