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

Detect default locale with fallback IETF BCP 47 language tag #1263

Open
shaedrich opened this issue Jan 8, 2025 · 0 comments
Open

Detect default locale with fallback IETF BCP 47 language tag #1263

shaedrich opened this issue Jan 8, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@shaedrich
Copy link

shaedrich commented Jan 8, 2025

Describe the bug
When using IETF BCP 47 language tags instead of just ISO 639-1 language codes, the default language code translation file should be determined from the IETF BCP 47 language tag

Might be related to #1172 and/or #787

Extension Version
i18n Ally (v2.13.1)

Framework/i18n package you are using
vue-i18n

To Reproduce
Steps to reproduce the behavior:

  1. Have a file called en-GB.json instead of en.json
  2. Go to any file using translations
  3. Hover over the translation function
  4. See error

Device Infomation

  • OS: Ubuntu/Linux x64
  • Version: 24.04.1 LTS
  • VS Code Version: 1.96.2 (fabdb6a30b49f79a7aba0f2ad9df9b399473380f, 2024-12-19T10:22:47.216Z)

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

🈶 Activated, v2.13.1

――――――

💼 Workspace root changed to "***"
📦 Packages file "package.json" found
🕳 Packages file "pubspec.yaml" not exists
🕳 Packages file "composer.json" not exists
🕳 Packages file "Gemfile" not exists
🧰 Config "i18n-ally.localesPaths" changed, reloading
🔁 Reloading loader
📦 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: Vue, General, Vue SFC
🧬 Enabled parsers: json, yaml, json5

📈 Telemetry id: 2e41e13e-6de9-423c-bd3c-f483145704a4
🚀 Initializing loader "***"
📂 Directory structure: file
🗃 Path Matcher Regex: /^(?<locale>[\w-_]+)\.(?<ext>json|ya?ml|json5)$/

📂 Loading locales under ***/src/locales
	📑 Loading (de-DE) de-DE.json [1736334472496.4211]
	📑 Loading (en-GB) en-GB.json [1736334472497.4211]

👀 Watching change on ***/src/locales
✅ Loading finished


――――――

🧰 Config "i18n-ally.localesPaths" changed, reloading
🔁 Reloading loader
📦 Packages file "package.json" found
🕳 Packages file "pubspec.yaml" not exists
🕳 Packages file "composer.json" not exists
🕳 Packages file "Gemfile" not exists
🧩 Enabled frameworks: Vue, General, Vue SFC
🧬 Enabled parsers: json, yaml, json5

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

📂 Loading locales under ***/src/locales
	📑 Loading (de-DE) de-DE.json [1736334472496.4211]
	📑 Loading (en-GB) en-GB.json [1736334472497.4211]

👀 Watching change on ***/src/locales
✅ Loading finished


――――――

📑 Loading sfc ***/src/components/***.vue
📑 Loading sfc ***/src/components/***.vue
📑 Loading sfc ***/src/components/***.vue
📑 Loading sfc ***/src/components/***.vue

Screenshots
grafik

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