{"action":"opened","number":19,"pull_request":{"url":"https://api.github.com/repos/elixir-lang/gettext/pulls/19","id":35081039,"html_url":"https://github.com/elixir-lang/gettext/pull/19","diff_url":"https://github.com/elixir-lang/gettext/pull/19.diff","patch_url":"https://github.com/elixir-lang/gettext/pull/19.patch","issue_url":"https://api.github.com/repos/elixir-lang/gettext/issues/19","number":19,"state":"open","locked":false,"title":"`%Gettext.PO{}` struct","user":{"login":"whatyouhide","id":3890250,"avatar_url":"https://avatars.githubusercontent.com/u/3890250?v=3","gravatar_id":"","url":"https://api.github.com/users/whatyouhide","html_url":"https://github.com/whatyouhide","followers_url":"https://api.github.com/users/whatyouhide/followers","following_url":"https://api.github.com/users/whatyouhide/following{/other_user}","gists_url":"https://api.github.com/users/whatyouhide/gists{/gist_id}","starred_url":"https://api.github.com/users/whatyouhide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whatyouhide/subscriptions","organizations_url":"https://api.github.com/users/whatyouhide/orgs","repos_url":"https://api.github.com/users/whatyouhide/repos","events_url":"https://api.github.com/users/whatyouhide/events{/privacy}","received_events_url":"https://api.github.com/users/whatyouhide/received_events","type":"User","site_admin":false},"body":"Hey there @josevalim, I implemented the `%Gettext.PO{}` struct we talked about some time ago, can you take a quick look at this to see if you had something like it in mind?\r\n\r\nWhat I tried to do is separating responsibilities as much as possible: I think `Gettext.PO.Parser` shouldn't know about `%Gettext.PO{}`s, so I made `Gettext.PO.Parser.parse/1` return a tuple like `{:ok, headers, translations}` instead of `{:ok, translations}`. An instance of `%Gettext.PO{}` is built up in `Gettext.PO.parse_(string|file)` so that only `PO` knows about `%PO{}`. Wdyt?","created_at":"2015-05-10T11:07:34Z","updated_at":"2015-05-10T11:07:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/elixir-lang/gettext/pulls/19/commits","review_comments_url":"https://api.github.com/repos/elixir-lang/gettext/pulls/19/comments","review_comment_url":"https://api.github.com/repos/elixir-lang/gettext/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elixir-lang/gettext/issues/19/comments","statuses_url":"https://api.github.com/repos/elixir-lang/gettext/statuses/aacacfc6114c1e46157ee3142d43a4137d51edc3","head":{"label":"elixir-lang:po-struct","ref":"po-struct","sha":"aacacfc6114c1e46157ee3142d43a4137d51edc3","user":{"login":"elixir-lang","id":1481354,"avatar_url":"https://avatars.githubusercontent.com/u/1481354?v=3","gravatar_id":"","url":"https://api.github.com/users/elixir-lang","html_url":"https://github.com/elixir-lang","followers_url":"https://api.github.com/users/elixir-lang/followers","following_url":"https://api.github.com/users/elixir-lang/following{/other_user}","gists_url":"https://api.github.com/users/elixir-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elixir-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixir-lang/subscriptions","organizations_url":"https://api.github.com/users/elixir-lang/orgs","repos_url":"https://api.github.com/users/elixir-lang/repos","events_url":"https://api.github.com/users/elixir-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elixir-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":31918746,"name":"gettext","full_name":"elixir-lang/gettext","owner":{"login":"elixir-lang","id":1481354,"avatar_url":"https://avatars.githubusercontent.com/u/1481354?v=3","gravatar_id":"","url":"https://api.github.com/users/elixir-lang","html_url":"https://github.com/elixir-lang","followers_url":"https://api.github.com/users/elixir-lang/followers","following_url":"https://api.github.com/users/elixir-lang/following{/other_user}","gists_url":"https://api.github.com/users/elixir-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elixir-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixir-lang/subscriptions","organizations_url":"https://api.github.com/users/elixir-lang/orgs","repos_url":"https://api.github.com/users/elixir-lang/repos","events_url":"https://api.github.com/users/elixir-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elixir-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elixir-lang/gettext","description":"gettext-based implementation for Elixir","fork":false,"url":"https://api.github.com/repos/elixir-lang/gettext","forks_url":"https://api.github.com/repos/elixir-lang/gettext/forks","keys_url":"https://api.github.com/repos/elixir-lang/gettext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elixir-lang/gettext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elixir-lang/gettext/teams","hooks_url":"https://api.github.com/repos/elixir-lang/gettext/hooks","issue_events_url":"https://api.github.com/repos/elixir-lang/gettext/issues/events{/number}","events_url":"https://api.github.com/repos/elixir-lang/gettext/events","assignees_url":"https://api.github.com/repos/elixir-lang/gettext/assignees{/user}","branches_url":"https://api.github.com/repos/elixir-lang/gettext/branches{/branch}","tags_url":"https://api.github.com/repos/elixir-lang/gettext/tags","blobs_url":"https://api.github.com/repos/elixir-lang/gettext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elixir-lang/gettext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elixir-lang/gettext/git/refs{/sha}","trees_url":"https://api.github.com/repos/elixir-lang/gettext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elixir-lang/gettext/statuses/{sha}","languages_url":"https://api.github.com/repos/elixir-lang/gettext/languages","stargazers_url":"https://api.github.com/repos/elixir-lang/gettext/stargazers","contributors_url":"https://api.github.com/repos/elixir-lang/gettext/contributors","subscribers_url":"https://api.github.com/repos/elixir-lang/gettext/subscribers","subscription_url":"https://api.github.com/repos/elixir-lang/gettext/subscription","commits_url":"https://api.github.com/repos/elixir-lang/gettext/commits{/sha}","git_commits_url":"https://api.github.com/repos/elixir-lang/gettext/git/commits{/sha}","comments_url":"https://api.github.com/repos/elixir-lang/gettext/comments{/number}","issue_comment_url":"https://api.github.com/repos/elixir-lang/gettext/issues/comments{/number}","contents_url":"https://api.github.com/repos/elixir-lang/gettext/contents/{+path}","compare_url":"https://api.github.com/repos/elixir-lang/gettext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elixir-lang/gettext/merges","archive_url":"https://api.github.com/repos/elixir-lang/gettext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elixir-lang/gettext/downloads","issues_url":"https://api.github.com/repos/elixir-lang/gettext/issues{/number}","pulls_url":"https://api.github.com/repos/elixir-lang/gettext/pulls{/number}","milestones_url":"https://api.github.com/repos/elixir-lang/gettext/milestones{/number}","notifications_url":"https://api.github.com/repos/elixir-lang/gettext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elixir-lang/gettext/labels{/name}","releases_url":"https://api.github.com/repos/elixir-lang/gettext/releases{/id}","created_at":"2015-03-09T19:41:44Z","updated_at":"2015-05-09T12:52:54Z","pushed_at":"2015-05-10T11:01:58Z","git_url":"git://github.com/elixir-lang/gettext.git","ssh_url":"git@github.com:elixir-lang/gettext.git","clone_url":"https://github.com/elixir-lang/gettext.git","svn_url":"https://github.com/elixir-lang/gettext","homepage":null,"size":476,"stargazers_count":8,"watchers_count":8,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":8,"default_branch":"master"}},"base":{"label":"elixir-lang:master","ref":"master","sha":"ff11ffef76c8e6c186e55e00820f8929676070cf","user":{"login":"elixir-lang","id":1481354,"avatar_url":"https://avatars.githubusercontent.com/u/1481354?v=3","gravatar_id":"","url":"https://api.github.com/users/elixir-lang","html_url":"https://github.com/elixir-lang","followers_url":"https://api.github.com/users/elixir-lang/followers","following_url":"https://api.github.com/users/elixir-lang/following{/other_user}","gists_url":"https://api.github.com/users/elixir-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elixir-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixir-lang/subscriptions","organizations_url":"https://api.github.com/users/elixir-lang/orgs","repos_url":"https://api.github.com/users/elixir-lang/repos","events_url":"https://api.github.com/users/elixir-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elixir-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":31918746,"name":"gettext","full_name":"elixir-lang/gettext","owner":{"login":"elixir-lang","id":1481354,"avatar_url":"https://avatars.githubusercontent.com/u/1481354?v=3","gravatar_id":"","url":"https://api.github.com/users/elixir-lang","html_url":"https://github.com/elixir-lang","followers_url":"https://api.github.com/users/elixir-lang/followers","following_url":"https://api.github.com/users/elixir-lang/following{/other_user}","gists_url":"https://api.github.com/users/elixir-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elixir-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixir-lang/subscriptions","organizations_url":"https://api.github.com/users/elixir-lang/orgs","repos_url":"https://api.github.com/users/elixir-lang/repos","events_url":"https://api.github.com/users/elixir-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elixir-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elixir-lang/gettext","description":"gettext-based implementation for Elixir","fork":false,"url":"https://api.github.com/repos/elixir-lang/gettext","forks_url":"https://api.github.com/repos/elixir-lang/gettext/forks","keys_url":"https://api.github.com/repos/elixir-lang/gettext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elixir-lang/gettext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elixir-lang/gettext/teams","hooks_url":"https://api.github.com/repos/elixir-lang/gettext/hooks","issue_events_url":"https://api.github.com/repos/elixir-lang/gettext/issues/events{/number}","events_url":"https://api.github.com/repos/elixir-lang/gettext/events","assignees_url":"https://api.github.com/repos/elixir-lang/gettext/assignees{/user}","branches_url":"https://api.github.com/repos/elixir-lang/gettext/branches{/branch}","tags_url":"https://api.github.com/repos/elixir-lang/gettext/tags","blobs_url":"https://api.github.com/repos/elixir-lang/gettext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elixir-lang/gettext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elixir-lang/gettext/git/refs{/sha}","trees_url":"https://api.github.com/repos/elixir-lang/gettext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elixir-lang/gettext/statuses/{sha}","languages_url":"https://api.github.com/repos/elixir-lang/gettext/languages","stargazers_url":"https://api.github.com/repos/elixir-lang/gettext/stargazers","contributors_url":"https://api.github.com/repos/elixir-lang/gettext/contributors","subscribers_url":"https://api.github.com/repos/elixir-lang/gettext/subscribers","subscription_url":"https://api.github.com/repos/elixir-lang/gettext/subscription","commits_url":"https://api.github.com/repos/elixir-lang/gettext/commits{/sha}","git_commits_url":"https://api.github.com/repos/elixir-lang/gettext/git/commits{/sha}","comments_url":"https://api.github.com/repos/elixir-lang/gettext/comments{/number}","issue_comment_url":"https://api.github.com/repos/elixir-lang/gettext/issues/comments{/number}","contents_url":"https://api.github.com/repos/elixir-lang/gettext/contents/{+path}","compare_url":"https://api.github.com/repos/elixir-lang/gettext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elixir-lang/gettext/merges","archive_url":"https://api.github.com/repos/elixir-lang/gettext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elixir-lang/gettext/downloads","issues_url":"https://api.github.com/repos/elixir-lang/gettext/issues{/number}","pulls_url":"https://api.github.com/repos/elixir-lang/gettext/pulls{/number}","milestones_url":"https://api.github.com/repos/elixir-lang/gettext/milestones{/number}","notifications_url":"https://api.github.com/repos/elixir-lang/gettext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elixir-lang/gettext/labels{/name}","releases_url":"https://api.github.com/repos/elixir-lang/gettext/releases{/id}","created_at":"2015-03-09T19:41:44Z","updated_at":"2015-05-09T12:52:54Z","pushed_at":"2015-05-10T11:01:58Z","git_url":"git://github.com/elixir-lang/gettext.git","ssh_url":"git@github.com:elixir-lang/gettext.git","clone_url":"https://github.com/elixir-lang/gettext.git","svn_url":"https://github.com/elixir-lang/gettext","homepage":null,"size":476,"stargazers_count":8,"watchers_count":8,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elixir-lang/gettext/pulls/19"},"html":{"href":"https://github.com/elixir-lang/gettext/pull/19"},"issue":{"href":"https://api.github.com/repos/elixir-lang/gettext/issues/19"},"comments":{"href":"https://api.github.com/repos/elixir-lang/gettext/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/elixir-lang/gettext/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/elixir-lang/gettext/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elixir-lang/gettext/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/elixir-lang/gettext/statuses/aacacfc6114c1e46157ee3142d43a4137d51edc3"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":87,"deletions":21,"changed_files":5}}