GitHub PullRequestEvent at 2014-04-03 19:32:11
Repository: dependent_restrict
Actor: fellix
Payload: {"action":"reopened","number":3,"pull_request":{"url":"https://api.github.com/repos/sealink/dependent_restrict/pulls/3","id":14305617,"html_url":"https://github.com/sealink/dependent_restrict/pull/3","diff_url":"https://github.com/sealink/dependent_restrict/pull/3.diff","patch_url":"https://github.com/sealink/dependent_restrict/pull/3.patch","issue_url":"https://api.github.com/repos/sealink/dependent_restrict/issues/3","number":3,"state":"open","title":"Added I18n support for exception messages","user":{"login":"fellix","id":29274,"avatar_url":"https://avatars.githubusercontent.com/u/29274?","gravatar_id":"a70aa5d32b9c30f1f9c94d0ae47093ac","url":"https://api.github.com/users/fellix","html_url":"https://github.com/fellix","followers_url":"https://api.github.com/users/fellix/followers","following_url":"https://api.github.com/users/fellix/following{/other_user}","gists_url":"https://api.github.com/users/fellix/gists{/gist_id}","starred_url":"https://api.github.com/users/fellix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fellix/subscriptions","organizations_url":"https://api.github.com/users/fellix/orgs","repos_url":"https://api.github.com/users/fellix/repos","events_url":"https://api.github.com/users/fellix/events{/privacy}","received_events_url":"https://api.github.com/users/fellix/received_events","type":"User","site_admin":false},"body":"I am not quit sure if this is something that you want on your project, but I am using it on a Rails 2 project, and i really needed those messages in pt-BR, so I just added I18n support to your project.\r\n\r\nIt's very simple to customize, there are 4 keys to be defined in order to translate:\r\n```dependent_restrict.basic_message.one``` -> message to be displayed when a single record breaks the validation, needs name variable to be defined, aka: ```Cannot delete record because dependent %{name} exists```\r\n```dependent_restrict.basic_message.others```-> message to be displayed when more than one record breaks the validation, have two variables, name and count, example: ```Cannot delete record because %{count} dependent %{name} exist```\r\n\r\nalso, for more detailed message\r\n```dependent_restrict.detailed_message.and_more```: and %{count} more\r\n```dependent_restrict.detailed_message.includes```: These include\r\n\r\nI also added a compatibility mode, if the Internationalization is not found, it will use the default messages that already is being used by the project.\r\n\r\nLet me know if you need something else in it.\r\n\r\nRegards","created_at":"2014-04-02T22:23:28Z","updated_at":"2014-04-03T19:32:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"51e860724962d96b8e2e1c0e326b9e3917cf0ba9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sealink/dependent_restrict/pulls/3/commits","review_comments_url":"https://api.github.com/repos/sealink/dependent_restrict/pulls/3/comments","review_comment_url":"https://api.github.com/repos/sealink/dependent_restrict/pulls/comments/{number}","comments_url":"https://api.github.com/repos/sealink/dependent_restrict/issues/3/comments","statuses_url":"https://api.github.com/repos/sealink/dependent_restrict/statuses/0f72df07e9cf63e6f7ba4c416a101a23fd143445","head":{"label":"fellix:i18n","ref":"i18n","sha":"0f72df07e9cf63e6f7ba4c416a101a23fd143445","user":{"login":"fellix","id":29274,"avatar_url":"https://avatars.githubusercontent.com/u/29274?","gravatar_id":"a70aa5d32b9c30f1f9c94d0ae47093ac","url":"https://api.github.com/users/fellix","html_url":"https://github.com/fellix","followers_url":"https://api.github.com/users/fellix/followers","following_url":"https://api.github.com/users/fellix/following{/other_user}","gists_url":"https://api.github.com/users/fellix/gists{/gist_id}","starred_url":"https://api.github.com/users/fellix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fellix/subscriptions","organizations_url":"https://api.github.com/users/fellix/orgs","repos_url":"https://api.github.com/users/fellix/repos","events_url":"https://api.github.com/users/fellix/events{/privacy}","received_events_url":"https://api.github.com/users/fellix/received_events","type":"User","site_admin":false},"repo":{"id":18381092,"name":"dependent_restrict","full_name":"fellix/dependent_restrict","owner":{"login":"fellix","id":29274,"avatar_url":"https://avatars.githubusercontent.com/u/29274?","gravatar_id":"a70aa5d32b9c30f1f9c94d0ae47093ac","url":"https://api.github.com/users/fellix","html_url":"https://github.com/fellix","followers_url":"https://api.github.com/users/fellix/followers","following_url":"https://api.github.com/users/fellix/following{/other_user}","gists_url":"https://api.github.com/users/fellix/gists{/gist_id}","starred_url":"https://api.github.com/users/fellix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fellix/subscriptions","organizations_url":"https://api.github.com/users/fellix/orgs","repos_url":"https://api.github.com/users/fellix/repos","events_url":"https://api.github.com/users/fellix/events{/privacy}","received_events_url":"https://api.github.com/users/fellix/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fellix/dependent_restrict","description":"Improves dependent restrict in ActiveRecord 4 and backports to AR 2/3","fork":true,"url":"https://api.github.com/repos/fellix/dependent_restrict","forks_url":"https://api.github.com/repos/fellix/dependent_restrict/forks","keys_url":"https://api.github.com/repos/fellix/dependent_restrict/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fellix/dependent_restrict/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fellix/dependent_restrict/teams","hooks_url":"https://api.github.com/repos/fellix/dependent_restrict/hooks","issue_events_url":"https://api.github.com/repos/fellix/dependent_restrict/issues/events{/number}","events_url":"https://api.github.com/repos/fellix/dependent_restrict/events","assignees_url":"https://api.github.com/repos/fellix/dependent_restrict/assignees{/user}","branches_url":"https://api.github.com/repos/fellix/dependent_restrict/branches{/branch}","tags_url":"https://api.github.com/repos/fellix/dependent_restrict/tags","blobs_url":"https://api.github.com/repos/fellix/dependent_restrict/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fellix/dependent_restrict/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fellix/dependent_restrict/git/refs{/sha}","trees_url":"https://api.github.com/repos/fellix/dependent_restrict/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fellix/dependent_restrict/statuses/{sha}","languages_url":"https://api.github.com/repos/fellix/dependent_restrict/languages","stargazers_url":"https://api.github.com/repos/fellix/dependent_restrict/stargazers","contributors_url":"https://api.github.com/repos/fellix/dependent_restrict/contributors","subscribers_url":"https://api.github.com/repos/fellix/dependent_restrict/subscribers","subscription_url":"https://api.github.com/repos/fellix/dependent_restrict/subscription","commits_url":"https://api.github.com/repos/fellix/dependent_restrict/commits{/sha}","git_commits_url":"https://api.github.com/repos/fellix/dependent_restrict/git/commits{/sha}","comments_url":"https://api.github.com/repos/fellix/dependent_restrict/comments{/number}","issue_comment_url":"https://api.github.com/repos/fellix/dependent_restrict/issues/comments/{number}","contents_url":"https://api.github.com/repos/fellix/dependent_restrict/contents/{+path}","compare_url":"https://api.github.com/repos/fellix/dependent_restrict/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fellix/dependent_restrict/merges","archive_url":"https://api.github.com/repos/fellix/dependent_restrict/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fellix/dependent_restrict/downloads","issues_url":"https://api.github.com/repos/fellix/dependent_restrict/issues{/number}","pulls_url":"https://api.github.com/repos/fellix/dependent_restrict/pulls{/number}","milestones_url":"https://api.github.com/repos/fellix/dependent_restrict/milestones{/number}","notifications_url":"https://api.github.com/repos/fellix/dependent_restrict/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fellix/dependent_restrict/labels{/name}","releases_url":"https://api.github.com/repos/fellix/dependent_restrict/releases{/id}","created_at":"2014-04-02T20:51:56Z","updated_at":"2014-04-03T19:32:10Z","pushed_at":"2014-04-03T19:32:00Z","git_url":"git://github.com/fellix/dependent_restrict.git","ssh_url":"git@github.com:fellix/dependent_restrict.git","clone_url":"https://github.com/fellix/dependent_restrict.git","svn_url":"https://github.com/fellix/dependent_restrict","homepage":"","size":125,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master","master_branch":"master"}},"base":{"label":"sealink:master","ref":"master","sha":"152f2318ff859428769243e1889b648132e4a0ab","user":{"login":"sealink","id":113649,"avatar_url":"https://avatars.githubusercontent.com/u/113649?","gravatar_id":"9a8191a9b1bc36da87cb0de40efce486","url":"https://api.github.com/users/sealink","html_url":"https://github.com/sealink","followers_url":"https://api.github.com/users/sealink/followers","following_url":"https://api.github.com/users/sealink/following{/other_user}","gists_url":"https://api.github.com/users/sealink/gists{/gist_id}","starred_url":"https://api.github.com/users/sealink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sealink/subscriptions","organizations_url":"https://api.github.com/users/sealink/orgs","repos_url":"https://api.github.com/users/sealink/repos","events_url":"https://api.github.com/users/sealink/events{/privacy}","received_events_url":"https://api.github.com/users/sealink/received_events","type":"User","site_admin":false},"repo":{"id":3964640,"name":"dependent_restrict","full_name":"sealink/dependent_restrict","owner":{"login":"sealink","id":113649,"avatar_url":"https://avatars.githubusercontent.com/u/113649?","gravatar_id":"9a8191a9b1bc36da87cb0de40efce486","url":"https://api.github.com/users/sealink","html_url":"https://github.com/sealink","followers_url":"https://api.github.com/users/sealink/followers","following_url":"https://api.github.com/users/sealink/following{/other_user}","gists_url":"https://api.github.com/users/sealink/gists{/gist_id}","starred_url":"https://api.github.com/users/sealink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sealink/subscriptions","organizations_url":"https://api.github.com/users/sealink/orgs","repos_url":"https://api.github.com/users/sealink/repos","events_url":"https://api.github.com/users/sealink/events{/privacy}","received_events_url":"https://api.github.com/users/sealink/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sealink/dependent_restrict","description":"Improves dependent restrict in ActiveRecord 4 and backports to AR 2/3","fork":false,"url":"https://api.github.com/repos/sealink/dependent_restrict","forks_url":"https://api.github.com/repos/sealink/dependent_restrict/forks","keys_url":"https://api.github.com/repos/sealink/dependent_restrict/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sealink/dependent_restrict/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sealink/dependent_restrict/teams","hooks_url":"https://api.github.com/repos/sealink/dependent_restrict/hooks","issue_events_url":"https://api.github.com/repos/sealink/dependent_restrict/issues/events{/number}","events_url":"https://api.github.com/repos/sealink/dependent_restrict/events","assignees_url":"https://api.github.com/repos/sealink/dependent_restrict/assignees{/user}","branches_url":"https://api.github.com/repos/sealink/dependent_restrict/branches{/branch}","tags_url":"https://api.github.com/repos/sealink/dependent_restrict/tags","blobs_url":"https://api.github.com/repos/sealink/dependent_restrict/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sealink/dependent_restrict/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sealink/dependent_restrict/git/refs{/sha}","trees_url":"https://api.github.com/repos/sealink/dependent_restrict/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sealink/dependent_restrict/statuses/{sha}","languages_url":"https://api.github.com/repos/sealink/dependent_restrict/languages","stargazers_url":"https://api.github.com/repos/sealink/dependent_restrict/stargazers","contributors_url":"https://api.github.com/repos/sealink/dependent_restrict/contributors","subscribers_url":"https://api.github.com/repos/sealink/dependent_restrict/subscribers","subscription_url":"https://api.github.com/repos/sealink/dependent_restrict/subscription","commits_url":"https://api.github.com/repos/sealink/dependent_restrict/commits{/sha}","git_commits_url":"https://api.github.com/repos/sealink/dependent_restrict/git/commits{/sha}","comments_url":"https://api.github.com/repos/sealink/dependent_restrict/comments{/number}","issue_comment_url":"https://api.github.com/repos/sealink/dependent_restrict/issues/comments/{number}","contents_url":"https://api.github.com/repos/sealink/dependent_restrict/contents/{+path}","compare_url":"https://api.github.com/repos/sealink/dependent_restrict/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sealink/dependent_restrict/merges","archive_url":"https://api.github.com/repos/sealink/dependent_restrict/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sealink/dependent_restrict/downloads","issues_url":"https://api.github.com/repos/sealink/dependent_restrict/issues{/number}","pulls_url":"https://api.github.com/repos/sealink/dependent_restrict/pulls{/number}","milestones_url":"https://api.github.com/repos/sealink/dependent_restrict/milestones{/number}","notifications_url":"https://api.github.com/repos/sealink/dependent_restrict/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sealink/dependent_restrict/labels{/name}","releases_url":"https://api.github.com/repos/sealink/dependent_restrict/releases{/id}","created_at":"2012-04-08T14:04:11Z","updated_at":"2013-11-27T07:21:32Z","pushed_at":"2013-11-27T07:21:32Z","git_url":"git://github.com/sealink/dependent_restrict.git","ssh_url":"git@github.com:sealink/dependent_restrict.git","clone_url":"https://github.com/sealink/dependent_restrict.git","svn_url":"https://github.com/sealink/dependent_restrict","homepage":"","size":200,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master","master_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sealink/dependent_restrict/pulls/3"},"html":{"href":"https://github.com/sealink/dependent_restrict/pull/3"},"issue":{"href":"https://api.github.com/repos/sealink/dependent_restrict/issues/3"},"comments":{"href":"https://api.github.com/repos/sealink/dependent_restrict/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/sealink/dependent_restrict/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/sealink/dependent_restrict/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/sealink/dependent_restrict/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/sealink/dependent_restrict/statuses/0f72df07e9cf63e6f7ba4c416a101a23fd143445"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":1,"review_comments":0,"commits":1,"additions":82,"deletions":5,"changed_files":2}}