Skip to content

Does not support special characters in translation keys #1344

@marcoms

Description

@marcoms

Describe the bug

I use special characters to indicate that a message requires an argument. E.g. [n]total which takes the n argument. But i18n-ally raises an error that the key doesn't exist when using non-alpha characters.

// en: i18n key "[n]total" does not exist
t('[n]total', { n: customers.length })
{
	"[n]total": "{n} Total"
}

Extension Version 2.13.1

Framework/i18n package you are using

next-intl

Device Infomation

  • Version: 2.13.1
  • VS Code Version: 1.102.2

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

💼 Workspace root changed to "/Users/marcoms/dev/abc"
📦 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: next-intl, General
🧬 Enabled parsers: json, yaml, json5

📈 Telemetry id: 5815d4af-2b4f-4e71-ba1a-3e77afef28b1
🚀 Initializing loader "/Users/marcoms/dev/jobsense"
📂 Directory structure: file
🗃 Path Matcher Regex: /^(?<locale>[\w-_]+)\.(?<ext>json|ya?ml|json5)$/

📂 Loading locales under /Users/marcoms/dev/jobsense/src/i18n/messages
	📑 Loading (en) en.json [1757241977312.656]
	📑 Loading (pt-BR) pt-BR.json [1757241987290.8447]

👀 Watching change on /Users/marcoms/dev/jobsense/src/i18n/messages
✅ Loading finished

Screenshots

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