You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Extension not working in latest version due to regex error, which causes text to not be replaced with the strings from the locales json file as it normally should. - for example, $t("error.tryAgain") would normally change to $t(Try Again) but due to the error it's broken.
Extension Version
i18n Ally 2.11.0
Issue does not occur if you downgrade back to v2.10.0.
Framework/i18n package you are using
svelte-i18n
To Reproduce
Steps to reproduce the behavior:
Open any .svelte file which uses svelte-i18n
See error in console and popup toast notification in VS Code (error content and screenshot below)
Issue does not occur if you downgrade back to v2.10.0.
Device Infomation
OS: Windows
Version: 10
VS Code Version: 1.81.1
Extension Log
Go to View -> Output -> i18n Ally, and paste the content below. You should mask any sensitive information
🈶 Activated, v2.11.0
――――――
💼 Workspace root changed to "c:\my-project"
📦 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: Svelte, General
🧬 Enabled parsers: json, yaml, json5
📈 Telemetry id: 83787482-1d65-4933-ad32-e7e48720ed1d
🚀 Initializing loader "c:\my-project"
📂 Directory structure: file
🗃 Path Matcher Regex: /^(?<locale>[\w-_]+)\.(?<ext>json|ya?ml|json5)$/
📂 Loading locales under c:\my-project\src\locales
📑 Loading (en) en.json [1693354312990.5056]
📑 Loading (es) es.json [1686636576551.6206]
👀 Watching change on c:\my-project\src\locales
✅ Loading finished
――――――
🐛 ERROR: SyntaxError: Invalid regular expression: /(\$(_|t|format)|(get)\(s*(_|t|format)s*\))(s*['"`]([\w\d\. \-\[\]\/:]*?)['"`]/: Unterminated group
SyntaxError: Invalid regular expression: /(\$(_|t|format)|(get)\(s*(_|t|format)s*\))(s*['"`]([\w\d\. \-\[\]\/:]*?)['"`]/: Unterminated group
at new RegExp (<anonymous>)
at c:\Users\shane\.vscode\extensions\lokalise.i18n-ally-2.11.0\dist\extension.js:320348:24
at Array.map (<anonymous>)
at normalizeUsageMatchRegex (c:\Users\shane\.vscode\extensions\lokalise.i18n-ally-2.11.0\dist\extension.js:320344:16)
at Global.getUsageMatchRegex (c:\Users\shane\.vscode\extensions\lokalise.i18n-ally-2.11.0\dist\extension.js:311651:123)
at KeyDetector.getKeys (c:\Users\shane\.vscode\extensions\lokalise.i18n-ally-2.11.0\dist\extension.js:312078:109)
at KeyDetector.getUsages (c:\Users\shane\.vscode\extensions\lokalise.i18n-ally-2.11.0\dist\extension.js:312117:32)
at ReviewCommentProvider.provideCommentingRanges (c:\Users\shane\.vscode\extensions\lokalise.i18n-ally-2.11.0\dist\extension.js:315226:74)
at c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:102:98422
at c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:73:13539
at new Promise (<anonymous>)
at p (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:73:13510)
at f.$provideCommentingRanges (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:102:98371)
at t.N (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:114:7983)
at t.M (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:114:7749)
at t.H (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:114:6791)
at t.G (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:114:5906)
at r.value (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:114:4736)
at f.w (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:63:1902)
at f.fire (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:63:2119)
at y.fire (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:79:13931)
at r.value (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:130:30355)
at f.w (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:63:1902)
at f.fire (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:63:2119)
at y.fire (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:79:13931)
at MessagePortMain.<anonymous> (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:130:28635)
at MessagePortMain.emit (node:events:513:28)
at MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:367)
Screenshots
The text was updated successfully, but these errors were encountered:
Describe the bug
Extension not working in latest version due to regex error, which causes text to not be replaced with the strings from the locales json file as it normally should. - for example,
$t("error.tryAgain")
would normally change to$t(Try Again)
but due to the error it's broken.Extension Version
i18n Ally 2.11.0
Issue does not occur if you downgrade back to v2.10.0.
Framework/i18n package you are using
svelte-i18n
To Reproduce
Steps to reproduce the behavior:
.svelte
file which uses svelte-i18nDevice Infomation
Extension Log
Go to
View
->Output
->i18n Ally
, and paste the content below. You should mask any sensitive informationScreenshots
The text was updated successfully, but these errors were encountered: