{"action":"created","issue":{"url":"https://api.github.com/repos/lingui/js-lingui/issues/212","repository_url":"https://api.github.com/repos/lingui/js-lingui","labels_url":"https://api.github.com/repos/lingui/js-lingui/issues/212/labels{/name}","comments_url":"https://api.github.com/repos/lingui/js-lingui/issues/212/comments","events_url":"https://api.github.com/repos/lingui/js-lingui/issues/212/events","html_url":"https://github.com/lingui/js-lingui/issues/212","id":317582274,"node_id":"MDU6SXNzdWUzMTc1ODIyNzQ=","number":212,"title":"New features from version 2.x.x not working as expected","user":{"login":"sladek-jan","id":4992232,"node_id":"MDQ6VXNlcjQ5OTIyMzI=","avatar_url":"https://avatars2.githubusercontent.com/u/4992232?v=4","gravatar_id":"","url":"https://api.github.com/users/sladek-jan","html_url":"https://github.com/sladek-jan","followers_url":"https://api.github.com/users/sladek-jan/followers","following_url":"https://api.github.com/users/sladek-jan/following{/other_user}","gists_url":"https://api.github.com/users/sladek-jan/gists{/gist_id}","starred_url":"https://api.github.com/users/sladek-jan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sladek-jan/subscriptions","organizations_url":"https://api.github.com/users/sladek-jan/orgs","repos_url":"https://api.github.com/users/sladek-jan/repos","events_url":"https://api.github.com/users/sladek-jan/events{/privacy}","received_events_url":"https://api.github.com/users/sladek-jan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-04-25T11:12:09Z","updated_at":"2018-06-25T12:35:54Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nIn an attempt to add metadata (\"context\" for linguists) to translations, I used this [new feature](https://lingui.github.io/js-lingui/releases/migration-2.html#new-features) as follows:\r\n`` i18n('Word // some context here')`Word` ``\r\n\r\nThe docs say `Generated message is used as a default one`. If I understand it correctly, in this case a key `Word // some context here` should be created in the catalog, with a default English translation `Word` (as long as sourceLang=\"en\").\r\n\r\nThis is not what happens. The entry created in the catalog for `en` is:\r\n``` \r\n\"Word // some context here\": {\r\n    \"translation\": \"Word // some context here\",\r\n    \"origin\": [\r\n     ...\r\n    ]\r\n  },\r\n```\r\n\r\nThis is logical, because of [this](https://github.com/lingui/js-lingui/pull/147/commits/d6be6be41c06e3be565a091bb818a000a4e08439) commit which copies translation IDs over as default translations into source locale. **But isn't this in conflict with what the docs say?**\r\n\r\nI am currently using version 2.0.1 until [another](https://github.com/lingui/js-lingui/issues/171) issue is resolved.\r\nThank you for the great lib btw."},"comment":{"url":"https://api.github.com/repos/lingui/js-lingui/issues/comments/399936468","html_url":"https://github.com/lingui/js-lingui/issues/212#issuecomment-399936468","issue_url":"https://api.github.com/repos/lingui/js-lingui/issues/212","id":399936468,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTkzNjQ2OA==","user":{"login":"tricoder42","id":827862,"node_id":"MDQ6VXNlcjgyNzg2Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/827862?v=4","gravatar_id":"","url":"https://api.github.com/users/tricoder42","html_url":"https://github.com/tricoder42","followers_url":"https://api.github.com/users/tricoder42/followers","following_url":"https://api.github.com/users/tricoder42/following{/other_user}","gists_url":"https://api.github.com/users/tricoder42/gists{/gist_id}","starred_url":"https://api.github.com/users/tricoder42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tricoder42/subscriptions","organizations_url":"https://api.github.com/users/tricoder42/orgs","repos_url":"https://api.github.com/users/tricoder42/repos","events_url":"https://api.github.com/users/tricoder42/events{/privacy}","received_events_url":"https://api.github.com/users/tricoder42/received_events","type":"User","site_admin":false},"created_at":"2018-06-25T12:35:54Z","updated_at":"2018-06-25T12:35:54Z","author_association":"MEMBER","body":"Adding context directly to code might be even better. We just have to  remember to remove it from production bundle as context is just for documentation purposes (for translators).\r\n\r\nI'll think about it, what solution is easier."}}
{"actor":{"display_login":"tricoder42"}}