lokalise / i18n-ally

🌍 All in one i18n extension for VS Code
https://marketplace.visualstudio.com/items?itemName=lokalise.i18n-ally
MIT License
4.05k stars 326 forks source link

i18next plural v4 not handled properly. key considered missing #1002

Open newza-fullmetal opened 1 year ago

newza-fullmetal commented 1 year ago

Describe the bug If using i18next v4 plural format, i18nAlly consider a plural key missing (i18n-ally-key-missing) when called with count like reported a few years ago in #677. It should have been resolved but it appears not.

I have tried to force the framework but nothing changed.

Extension Version v2.11.1

Framework/i18n package you are using

  "i18next": "^23.4.4",
  "i18next-browser-languagedetector": "^7.1.0",
  "i18next-http-backend": "^1.4.1",
   "react-i18next": "^13.1.2"

To Reproduce Steps to reproduce the behavior:

  1. Add keys in plural form : image
  2. use it with count image

By local config for i18n-ally

{
    "i18n-ally.keystyle": "nested",
    "i18n-ally.localesPaths": "public/locales/",
    "i18n-ally.pathMatcher": "{locale}/translation.json",
    "i18n-ally.enabledFrameworks": ["i18next", "react-i18next"],
    "i18n-ally.fullReloadOnChanged": true
}

Device Infomation

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

🈶 Activated, v2.11.1

――――――

💼 Workspace root changed to "/Users/********/Desktop/********/********/********/"
📦 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: React I18next, General
🧬 Enabled parsers: json, yaml, json5

📈 Telemetry id: 1989b382-c71c-4554-94ea-c7785d428a38
🚀 Initializing loader "/Users/********/Desktop/********/********/********/"
📂 Directory structure: dir
🗃 Custom Path Matcher: {locale}/translation.json
🗃 Path Matcher Regex: /^(?<locale>[\w-_]+)\/translation\.json$/

📂 Loading locales under /Users/********/Desktop/********/********/********/public/locales
    📑 Loading (en) en/translation.json [1693484650185.8223]
    📑 Loading (fr) fr/translation.json [1693399184396.127]
    📑 Loading (fr-CA) fr-CA/translation.json [1693399184395.9465]

👀 Watching change on/Users/********/Desktop/********/********/********/public/locales
✅ Loading finished

Screenshots

keithrfung commented 8 months ago

Still confirming this is an issue in 2024

youssdevx commented 5 months ago

The issue is still not fixed

favna commented 1 month ago

Will this ever be addressed @nickustinov @kibertoad @terales

tkbeal commented 1 month ago

Can confirm still an issue