question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Folders matching with react-18next does not work anymore

See original GitHub issue

Describe the bug Hello,

Since 2.1.6 every translations using the character ‘:’ for folders are nowhere to be found in the extension but the tree is correctly generated.

In the screenshot below you can see ‘pages:tasks:creationMessage’ not being recognized in vsCode but it exist in the tree.

Is it a bug or is it my configuration the problem?

Thanks a lot 😉

Extension Version 2.2.7

Framework/i18n package you are using react, i18next

To Reproduce Here is the config

  "i18n-ally.pathMatcher": "{locale}/{namespaces}.{ext}",
  "i18n-ally.namespace": true,
  "i18n-ally.displayLanguage": "fr-FR",
  "i18n-ally.sortKeys": true,
  "i18n-ally.enabledParsers": ["json"],
  "i18n-ally.keystyle": "nested",
  "i18n-ally.enabledFrameworks": ["react", "i18next"],
  "i18n-ally.extract.targetPickingStrategy": "most-similar",

Device Infomation

  • OS: Mac OS
  • Version: Catalina
  • VS Code Version: 1.46.1

Screenshots

i18n-ally infos: Capture d’écran 2020-06-29 à 11 19 41

Here the folder structure: Capture d’écran 2020-06-29 à 14 00 19

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Frumbacommented, Jul 15, 2020

Thanks a lot for solving my problem 😉

I’m having a new error though:

Capture d’écran 2020-07-15 à 09 12 58

Here is my config:

  "i18n-ally.pathMatcher": "{locale}/{namespaces}.{ext}",
  "i18n-ally.namespace": true,
  "i18n-ally.displayLanguage": "fr-FR",
  "i18n-ally.sortKeys": true,
  "i18n-ally.enabledFrameworks": ["react", "i18next"],
1reaction
Frumbacommented, Jul 13, 2020

Yes exactly with i18next they use : for folders and . for inside json access 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Folders matching with react-18next does not work anymore
Hello,. Since 2.1.6 every translations using the character ':' for folders are nowhere to be found in the extension but the tree is...
Read more >
Why is react i18next not working ? no errors - Stack Overflow
So I think when you are saying in loadPath that load files from ./translations/{{lng}}/common.json , the request actually gets resolved to ...
Read more >
React localization with i18next - LogRocket Blog
Once that is done, open the project folder with a code editor. Inside the project directory, run npm install to generate a node_modules ......
Read more >
A Guide to React Localization with i18next | Phrase
React-i18next is a powerful set of components, hooks, and plugins that sit on top of i18next. Learn how to use it to internationalize...
Read more >
All side optimized Next.js translations (a next-i18next guide)
Optimize your Next.js app to best work with translations on server side and on client side with next-i18next.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found