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

Keys with plurals not found with new i18next v4 JSON format #677

Closed
ahoisl opened this issue Oct 13, 2021 · 4 comments · Fixed by #871
Closed

Keys with plurals not found with new i18next v4 JSON format #677

ahoisl opened this issue Oct 13, 2021 · 4 comments · Fixed by #871
Labels
bug Something isn't working

Comments

@ahoisl
Copy link

ahoisl commented Oct 13, 2021

Describe the bug
Keys with plurals show up as non-existent when using the new i18next v4 JSON format introduced with i18next v21, see:
https://www.i18next.com/misc/migration-guide
https://www.i18next.com/misc/json-format

Extension Version
i18n Ally v2.8.1

Framework/i18n package you are using
i18next v21.2.4
react-i18next v11.12.0

To Reproduce
Steps to reproduce the behavior:

  1. Use i18next >= v21 with JSON format v4
    Plural keys must then use suffixes "one", "other", ...
  2. Use a key with plurals and pass count parameter as option
  3. See that the key is not automatically shown the translation; when hovering the key, the popup shows a message i18n key "my key" does not exist

Device Infomation

  • OS: Windows 10
  • Version: 21H1
  • VS Code Version: 1.61.0

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

🈶 Activated, v2.8.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
🌞 Enabled
🧩 Enabled frameworks: React, General
🧬 Enabled parsers: json, yaml, json5

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

📂 Loading locales under ...
	📑 Loading ....json [1634105397153.191]
	📑 Loading ...json [1633599168201.008]
	📑 Loading ....json [1634105537745.4314]
	📑 Loading ....json [1633599168201.008]

👀 Watching change on ....
✅ Loading finished

@ahoisl ahoisl added the bug Something isn't working label Oct 13, 2021
@stale
Copy link

stale bot commented Dec 12, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 12, 2021
@ahoisl
Copy link
Author

ahoisl commented Dec 12, 2021

Can anybody else reproduce this behavior?

@schnuderl
Copy link

having the same, when having a key of
image

in the preview its not replaced
image

@newza-fullmetal
Copy link

I think it should be re-opened, it is still an issue with i18next v23.4.4 and react-i18next v13.1.2 and latest version of i18n-ally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
3 participants