Skip to content

ignoredByFile works only once per file, global ignore registers twiceΒ #1370

@ZainabAl-khabori

Description

@ZainabAl-khabori

Describe the bug
I've just installed the extension from VS Code's Marketplace and was testing it on a server.js file.
The detecting hard-coded strings feature detected 3 strings that should not be translated and ignored the one within a console.log() call, but that wasn't exactly an issue for me. The issue was when I tried to ignore the three "faulty" hard-coded strings detected: the ignore function only worked for the first string (after attempting it twice on the same string) and didn't do a thing to the other two, no matter how many times I tried.
It only worked after I manually added the strings to ignore in the settings.json file.
Another thing I've noticed while trying to figure this one out is that ignoring globally also requires two attempts per string to work, but this time it registers two at once for every ignored string.

Extension Version
i18n Ally (v2.13.1)

Framework/i18n package you are using
general

To Reproduce
Steps to reproduce the behavior:

  1. Input a hard-coded string
  2. Open the Quick Fix menu
  3. Select 'Ignore detection "..." for current file'
  4. You will see that it does not work from the first time
  5. Attemp again to ignore string successfully
  6. Add a new hard-coded string
  7. Attempt ignoring, once, ttwice, thrice, etc...
  8. You will ssee that it is not working at all
  9. Open the Quick Fix menu
  10. Choose the 'Ignore detection "..." globally' option
  11. You will see that the ignore does not work from the first time
  12. Attempt again for the isgnore to be successful
  13. Open the workspace's settings.json file
  14. You will see that for each globally ignored string, the registration happens twice

Device Information

  • OS: MacOS
  • Version: Sequoia 15.7.2
  • VS Code Version: 1.108.2 (Universal)

Extension Log
🈢 Activated, v2.13.1

――――――

πŸ’Ό Workspace root changed to "/Users/.../(root folder)"
🌞 Enabled
🧩 Enabled frameworks: General, Custom
🧬 Enabled parsers: json

πŸ“ˆ Telemetry id: 6e763663-ce01-47ac-bc80-8e2f7cc26d6c
πŸš€ Initializing loader "/Users/.../(root folder)"
πŸ“‚ Directory structure: file
πŸ—ƒ Path Matcher Regex: /^(?[\w-_]+).(?json)$/

πŸ“‚ Loading locales under /Users/.../(root folder)/Localization
πŸ“‘ Loading (en) en.json [1770129034020.9534]

πŸ‘€ Watching change on /Users/.../(root folder)/Localization
βœ… Loading finished

――――――

🧰 Config "i18n-ally.namespace" changed, reloading
πŸ” Reloading loader
🧩 Enabled frameworks: General, Custom
🧬 Enabled parsers: json

πŸš€ Initializing loader "/Users/.../(root folder)"
πŸ“‚ Directory structure: file
πŸ—ƒ Path Matcher Regex: /^(?[\w-_]+).(?json)$/

πŸ“‚ Loading locales under /Users/.../(root folder)/Localization
πŸ“‘ Loading (en) en.json [1770129034020.9534]

πŸ‘€ Watching change on /Users/.../(root folder)/Localization
βœ… Loading finished

――――――

πŸ“€ Bulk extracting
/Users/.../(root folder)/Utils/server.js
πŸ“€ Extracting [2] /Users/.../(root folder)/Utils/server.js
πŸ’Ύ Writing /Users/.../(root folder)/Localization/en.json
βœ… Loading finished

πŸ”„ File changed (change) en.json
πŸ”„ Perfroming a full reload

πŸ“‚ Loading locales under /Users/.../(root folder)/Localization
πŸ”„ File changed (change) en.json
πŸ”„ Perfroming a full reload

πŸ“‚ Loading locales under /Users/.../(root folder)/Localization
πŸ“‘ Loading (en) en.json [1770135372765.993]
πŸ“‘ Loading (en) en.json [1770135372765.993]
βœ… Loading finished

βœ… Loading finished

πŸ”„ File changed (change) en.json
πŸ”„ Perfroming a full reload

πŸ“‚ Loading locales under /Users/.../(root folder)/Localization
πŸ”„ File changed (change) en.json
πŸ”„ Perfroming a full reload

πŸ“‚ Loading locales under /Users/.../(root folder)/Localization
πŸ“‘ Loading (en) en.json [1770136988664.768]
πŸ“‘ Loading (en) en.json [1770136988664.768]
βœ… Loading finished

βœ… Loading finished

πŸ’Ύ Writing /Users/.../(root folder)/Localization/en.json
βœ… Loading finished

πŸ”„ File changed (change) en.json
πŸ”„ Perfroming a full reload

πŸ“‚ Loading locales under /Users/.../(root folder)/Localization
πŸ”„ File changed (change) en.json
πŸ”„ Perfroming a full reload

πŸ“‚ Loading locales under /Users/.../(root folder)/Localization
πŸ“‘ Loading (en) en.json [1770137491709.6777]
πŸ“‘ Loading (en) en.json [1770137491709.6777]
βœ… Loading finished

βœ… Loading finished

πŸ”„ File changed (change) en.json
πŸ”„ Perfroming a full reload

πŸ“‚ Loading locales under /Users/.../(root folder)/Users/.../(root folder)/Localization
πŸ”„ File changed (change) en.json
πŸ”„ Perfroming a full reload

πŸ“‚ Loading locales under /Users/.../(root folder)/Localization
πŸ“‘ Loading (en) en.json [1770137505954.99]
πŸ“‘ Loading (en) en.json [1770137505954.99]
βœ… Loading finished

βœ… Loading finished

🧰 Config "i18n-ally.ignoreFiles" changed, reloading
πŸ” Reloading loader
🧩 Enabled frameworks: General, Custom
🧬 Enabled parsers: json

πŸš€ Initializing loader "/Users/.../(root folder)"
πŸ“‚ Directory structure: file
πŸ—ƒ Path Matcher Regex: /^(?[\w-_]+).(?json)$/

πŸ“‚ Loading locales under /Users/.../(root folder)/Localization
πŸ“‘ Loading (en) en.json [1770137505954.99]

πŸ‘€ Watching change on /Users/.../(root folder)/Localization
βœ… Loading finished

――――――

🧰 Config "i18n-ally.ignoreFiles" changed, reloading
πŸ” Reloading loader
🧩 Enabled frameworks: General, Custom
🧬 Enabled parsers: json

πŸš€ Initializing loader "/Users/.../(root folder)"
πŸ“‚ Directory structure: file
πŸ—ƒ Path Matcher Regex: /^(?[\w-_]+).(?json)$/

πŸ“‚ Loading locales under /Users/.../(root folder)/Localization
πŸ“‘ Loading (en) en.json [1770137505954.99]

πŸ‘€ Watching change on /Users/.../(root folder)/Localization
βœ… Loading finished

――――――

🧰 Config "i18n-ally.enabledFrameworks" changed, reloading
πŸ” Reloading loader
🧩 Enabled frameworks: General
🧬 Enabled parsers: json

πŸš€ Initializing loader "/Users/.../(root folder)"
πŸ“‚ Directory structure: file
πŸ—ƒ Path Matcher Regex: /^(?[\w-_]+).(?json)$/

πŸ“‚ Loading locales under /Users/.../(root folder)/Localization
πŸ“‘ Loading (en) en.json [1770137505954.99]

πŸ‘€ Watching change on /Users/.../(root folder)/Localization
βœ… Loading finished

――――――

🧰 Config "i18n-ally.ignoreFiles" changed, reloading
πŸ” Reloading loader
🧩 Enabled frameworks: General
🧬 Enabled parsers: json

πŸš€ Initializing loader "/Users/.../(root folder)"
πŸ“‚ Directory structure: file
πŸ—ƒ Path Matcher Regex: /^(?[\w-_]+).(?json)$/

πŸ“‚ Loading locales under /Users/.../(root folder)/Localization
πŸ“‘ Loading (en) en.json [1770137505954.99]

πŸ‘€ Watching change on /Users/.../(root folder)/Localization
βœ… Loading finished

――――――

🧰 Config "i18n-ally.ignoreFiles" changed, reloading
πŸ” Reloading loader
🧩 Enabled frameworks: General
🧬 Enabled parsers: json

πŸš€ Initializing loader "/Users/.../(root folder)"
πŸ“‚ Directory structure: file
πŸ—ƒ Path Matcher Regex: /^(?[\w-_]+).(?json)$/

πŸ“‚ Loading locales under /Users/.../(root folder)/Localization
πŸ“‘ Loading (en) en.json [1770137505954.99]

πŸ‘€ Watching change on /Users/.../(root folder)/Localization
βœ… Loading finished

――――――

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