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

chrome-ext implementation does not allow for auto-complete #1259

Open
jpc-ae opened this issue Jan 7, 2025 · 0 comments
Open

chrome-ext implementation does not allow for auto-complete #1259

jpc-ae opened this issue Jan 7, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@jpc-ae
Copy link

jpc-ae commented Jan 7, 2025

Describe the bug
When using the following settings:

{
  "i18n-ally.enabledFrameworks": [
    "chrome-ext"
  ],
  "i18n-ally.localesPaths": "_locales",
  "i18n-ally.dirStructure": "dir",
  "i18n-ally.keystyle": "nested",
  "i18n-ally.ignoreFiles": [
    "*/starter.json",
    "*/store_page.txt"
  ],
  "i18n-ally.regex.usageMatchAppend": [
    "[^\\w\\d]i18n\\(\\s*['\"`]({key})['\"`]"
  ]
}

i18n-ally is able to find and match strings no problem as seen below:
image

The problem is auto-complete doesn't seem to be working. I just get a message that the key doesn't exist until I type out the full key and it finds a match:
image

It's the same whether I use my custom function or the default chrome.i18n.getMessage({key}[, ...substitutions]):
image

Everything else is working fine, but I'm really missing autocomplete which I know would normally work if I create a custom framework without the .message refactor (except .message will be appended which I don't want), so it seems that's what's tripping it up.

Extension Version
i18n Ally VS Code extension v2.13.1
image

Framework/i18n package you are using
chrome-ext

To Reproduce
Steps to reproduce the behavior:

  1. Type chrome.i18n.getMessage('
  2. Start typing the name of an existing message
  3. See that no suggestions are provided

Device Infomation

  • OS: Windows 11 Home
  • Version: 24H2
  • VS Code Version: 1.96.2

Extension Log

🈶 Activated, v2.13.1

――――――
...
――――――

🧩 Enabled frameworks: Chrome Extension
🧬 Enabled parsers: json, yaml, json5

🚀 Initializing loader "c:\..."
📂 Directory structure: dir
🗃 Path Matcher Regex: /^(?<locale>[\w-_]+)(?:.*\/|^).*\.(?<ext>json|ya?ml|json5)$/

📂 Loading locales under c:\...\_locales
	📑 Loading (en) en/messages.json [1736262669052.11]

👀 Watching change on c:\...\_locales
✅ Loading finished


――――――

🔄 Update usage cache of c:\...\popup\main.js

Screenshots
See above

@jpc-ae jpc-ae added the bug Something isn't working label Jan 7, 2025
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