Bug with nested jsons
See original GitHub issueDescribe the bug
when you have the translations in nested json, and you want to translate from the code, and the key is for example "example.user"
instead of putting it as an object in the json, it puts it exactly the same as "example.user": ""
Extension Version
- i18n Ally 2.2.7
Framework/i18n package you are using
- react-i18next
To Reproduce
- create a json with nested translations
- put a translation in the code that should be nested ex: “example.user”
- put any translation and in the file you will find the key exactly as it is written instead of being in an ex:
"example": {"user": ""} "
Device Infomation
- OS: Ubuntu
- Version: 19.04
- VS Code Version: 1.46.1
Extension Log
Go to View
-> Output
-> i18n Ally
, and paste the content below. You should mask any sensitive information
🧰 Config "i18n-ally.enabledParsers" changed, reloading
🔁 Reloading loader
🧩 Enabled frameworks: i18next
🧬 Enabled parsers: json
🚀 Initializing loader "/home/lawrence/apps/frontend-react"
📂 Directory structure: dir
🗃 Custom Path Matcher: {locale}/translation.json
🗃 Path Matcher Regex: /^(?<locale>[\w-_]+)\/translation\.json$/
📂 Loading locales under /home/lawrence/apps/frontend-react/src/locales
📑 Loading (en) en/translation.json [1594085693895.4465]
📑 Loading (es) es/translation.json [1594086180291.0793]
👀 Watching change on /home/lawrence/apps/frontend-react/src/locales
✅ Loading finished
――――――
🔄 File changed (change) es/translation.json
📑 Loading (es) es/translation.json [1594086471940.9163]
Screenshots
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Bug with nested jsons · Issue #345 · lokalise/i18n-ally - GitHub
Describe the bug when you have the translations in nested json, and you want to translate from the code, and the key is...
Read more >Managing deeply nested JSON documents with JSON_SET ...
Description: Updating deeply nested JSON documents is cumbersome. The problem is that JSON_SET will not work on paths which have not been ...
Read more >Get Correctly Formatted Deep-Nested JSON Files At Scale ...
A good strategy to improve the query performance is the following: 1) Get all the columns you need avoiding nested queries and just...
Read more >json_to_recordset with nested json objects NULLs columns
In json_populate_record(set), ignore its value and deprecate using it. ... behavior should always be as below. * For nested json objects, we'll spit...
Read more >Thread: BUG #10728: json_to_recordset with nested json ...
I am guessing that the bug origin is in pg_parse_json in the way nested json is managed, it is the only code path...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I also faced this same issue today. But when I change the key style both in user and workspace settings in Vscode it was solved. Initially, I only changed this setting in user settings.
no 😒,I ended up stopping using the tool, and used traduora for the translations and it serves me for multiple projects