{"action":"created","issue":{"url":"https://api.github.com/repos/nijel/weblate/issues/775","repository_url":"https://api.github.com/repos/nijel/weblate","labels_url":"https://api.github.com/repos/nijel/weblate/issues/775/labels{/name}","comments_url":"https://api.github.com/repos/nijel/weblate/issues/775/comments","events_url":"https://api.github.com/repos/nijel/weblate/issues/775/events","html_url":"https://github.com/nijel/weblate/issues/775","id":94249873,"number":775,"title":"JSON format breaks i18next files due to automatic restructuring","user":{"login":"wichert","id":199657,"avatar_url":"https://avatars.githubusercontent.com/u/199657?v=3","gravatar_id":"","url":"https://api.github.com/users/wichert","html_url":"https://github.com/wichert","followers_url":"https://api.github.com/users/wichert/followers","following_url":"https://api.github.com/users/wichert/following{/other_user}","gists_url":"https://api.github.com/users/wichert/gists{/gist_id}","starred_url":"https://api.github.com/users/wichert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wichert/subscriptions","organizations_url":"https://api.github.com/users/wichert/orgs","repos_url":"https://api.github.com/users/wichert/repos","events_url":"https://api.github.com/users/wichert/events{/privacy}","received_events_url":"https://api.github.com/users/wichert/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nijel/weblate/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/nijel/weblate/labels/translate-toolkit","name":"translate-toolkit","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-07-10T08:29:49Z","updated_at":"2016-05-09T13:27:06Z","closed_at":null,"body":"I just had an interesting experience: I configured [Weblate](http://weblate.org) to manage translations for an Aurelia project, which uses [i18next](http://i18next.com/) to handle translations. This worked wonderfully well, until I started testing with updated translations and found that half the translations had stopped working.\r\n\r\nThe problem turned out to be due to handling JSON structure: Weblate (via [Translate Toolkit](http://docs.translatehouse.org/projects/translate-toolkit/en/latest/index.html) I guess?) always uses a flat structure for the data. So where my translation.json used to look like this:\r\n\r\n```json\r\n{\r\n    \"navbar\": {\r\n        \"reward\": \"Rewards\",\r\n        \"about\": \"About\"\r\n    }\r\n}\r\n```\r\n\r\nit got transformed into this:\r\n\r\n```json\r\n{\r\n    \"navbar.reward\": \"Rewards\",\r\n    \"navbar.about\": \"About\"\r\n}\r\n```\r\n\r\nThis breaks the translation lookup.\r\n\r\n\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/24064326-json-format-breaks-i18next-files-due-to-automatic-restructuring?utm_campaign=plugin&utm_content=tracker%2F253393&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F253393&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/nijel/weblate/issues/comments/217863396","html_url":"https://github.com/nijel/weblate/issues/775#issuecomment-217863396","issue_url":"https://api.github.com/repos/nijel/weblate/issues/775","id":217863396,"user":{"login":"nijel","id":212189,"avatar_url":"https://avatars.githubusercontent.com/u/212189?v=3","gravatar_id":"","url":"https://api.github.com/users/nijel","html_url":"https://github.com/nijel","followers_url":"https://api.github.com/users/nijel/followers","following_url":"https://api.github.com/users/nijel/following{/other_user}","gists_url":"https://api.github.com/users/nijel/gists{/gist_id}","starred_url":"https://api.github.com/users/nijel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nijel/subscriptions","organizations_url":"https://api.github.com/users/nijel/orgs","repos_url":"https://api.github.com/users/nijel/repos","events_url":"https://api.github.com/users/nijel/events{/privacy}","received_events_url":"https://api.github.com/users/nijel/received_events","type":"User","site_admin":false},"created_at":"2016-05-09T13:27:06Z","updated_at":"2016-05-09T13:27:06Z","body":"Thanks, I've included the above script in examples."}}