{"action":"created","comment":{"url":"https://api.github.com/repos/amatsuda/kaminari/pulls/comments/33734093","id":33734093,"diff_hunk":"@@ -1,7 +1,9 @@\n module Kaminari\n   module ActiveRecordRelationMethods\n-    def entry_name\n-      model_name.human.downcase\n+    def entry_name(options = {})\n+      count = options[:count] || 1\n+      default = count == 1 ? model_name.human : model_name.human.pluralize\n+      model_name.human(:count => count, :default => default)","path":"lib/kaminari/models/active_record_relation_methods.rb","position":8,"original_position":8,"commit_id":"ca4947a39ae86d0adcd6c21455a434293bb022df","original_commit_id":"905c117d6530fc393a43d9b2f32b6baf745acbf8","user":{"login":"yuki24","id":386234,"avatar_url":"https://avatars.githubusercontent.com/u/386234?v=3","gravatar_id":"","url":"https://api.github.com/users/yuki24","html_url":"https://github.com/yuki24","followers_url":"https://api.github.com/users/yuki24/followers","following_url":"https://api.github.com/users/yuki24/following{/other_user}","gists_url":"https://api.github.com/users/yuki24/gists{/gist_id}","starred_url":"https://api.github.com/users/yuki24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuki24/subscriptions","organizations_url":"https://api.github.com/users/yuki24/orgs","repos_url":"https://api.github.com/users/yuki24/repos","events_url":"https://api.github.com/users/yuki24/events{/privacy}","received_events_url":"https://api.github.com/users/yuki24/received_events","type":"User","site_admin":false},"body":"I think it is okay that `#entry_name` returns a plural form of a name.","created_at":"2015-07-01T23:02:31Z","updated_at":"2015-07-01T23:02:31Z","html_url":"https://github.com/amatsuda/kaminari/pull/694#discussion_r33734093","pull_request_url":"https://api.github.com/repos/amatsuda/kaminari/pulls/694","_links":{"self":{"href":"https://api.github.com/repos/amatsuda/kaminari/pulls/comments/33734093"},"html":{"href":"https://github.com/amatsuda/kaminari/pull/694#discussion_r33734093"},"pull_request":{"href":"https://api.github.com/repos/amatsuda/kaminari/pulls/694"}}},"pull_request":{"url":"https://api.github.com/repos/amatsuda/kaminari/pulls/694","id":35663922,"html_url":"https://github.com/amatsuda/kaminari/pull/694","diff_url":"https://github.com/amatsuda/kaminari/pull/694.diff","patch_url":"https://github.com/amatsuda/kaminari/pull/694.patch","issue_url":"https://api.github.com/repos/amatsuda/kaminari/issues/694","number":694,"state":"open","locked":false,"title":"Internationalization of entry name","user":{"login":"Linuus","id":379823,"avatar_url":"https://avatars.githubusercontent.com/u/379823?v=3","gravatar_id":"","url":"https://api.github.com/users/Linuus","html_url":"https://github.com/Linuus","followers_url":"https://api.github.com/users/Linuus/followers","following_url":"https://api.github.com/users/Linuus/following{/other_user}","gists_url":"https://api.github.com/users/Linuus/gists{/gist_id}","starred_url":"https://api.github.com/users/Linuus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Linuus/subscriptions","organizations_url":"https://api.github.com/users/Linuus/orgs","repos_url":"https://api.github.com/users/Linuus/repos","events_url":"https://api.github.com/users/Linuus/events{/privacy}","received_events_url":"https://api.github.com/users/Linuus/received_events","type":"User","site_admin":false},"body":"This PR is a more up to date version of https://github.com/amatsuda/kaminari/pull/309\r\nAlso, it adds support for internationalization of `entry_name` for ActiveRecord. I tried to implement it for DataMapper but failed, maybe someone else with more experience with DM can have a look?\r\n\r\nThis PR solves the issues I described in https://github.com/amatsuda/kaminari/pull/309 where only using `.pluralize` won't work for other languages than English. Instead we should make use of the I18n features.\r\n\r\nAny thoughts about this?\r\n\r\nFIxes #586 \r\n","created_at":"2015-05-18T19:10:42Z","updated_at":"2015-07-01T23:02:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e21e63273b366f59613d9cce750d64cde3bc3601","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/amatsuda/kaminari/pulls/694/commits","review_comments_url":"https://api.github.com/repos/amatsuda/kaminari/pulls/694/comments","review_comment_url":"https://api.github.com/repos/amatsuda/kaminari/pulls/comments{/number}","comments_url":"https://api.github.com/repos/amatsuda/kaminari/issues/694/comments","statuses_url":"https://api.github.com/repos/amatsuda/kaminari/statuses/ca4947a39ae86d0adcd6c21455a434293bb022df","head":{"label":"varvet:internationalization","ref":"internationalization","sha":"ca4947a39ae86d0adcd6c21455a434293bb022df","user":{"login":"varvet","id":3612746,"avatar_url":"https://avatars.githubusercontent.com/u/3612746?v=3","gravatar_id":"","url":"https://api.github.com/users/varvet","html_url":"https://github.com/varvet","followers_url":"https://api.github.com/users/varvet/followers","following_url":"https://api.github.com/users/varvet/following{/other_user}","gists_url":"https://api.github.com/users/varvet/gists{/gist_id}","starred_url":"https://api.github.com/users/varvet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varvet/subscriptions","organizations_url":"https://api.github.com/users/varvet/orgs","repos_url":"https://api.github.com/users/varvet/repos","events_url":"https://api.github.com/users/varvet/events{/privacy}","received_events_url":"https://api.github.com/users/varvet/received_events","type":"Organization","site_admin":false},"repo":{"id":24841013,"name":"kaminari","full_name":"varvet/kaminari","owner":{"login":"varvet","id":3612746,"avatar_url":"https://avatars.githubusercontent.com/u/3612746?v=3","gravatar_id":"","url":"https://api.github.com/users/varvet","html_url":"https://github.com/varvet","followers_url":"https://api.github.com/users/varvet/followers","following_url":"https://api.github.com/users/varvet/following{/other_user}","gists_url":"https://api.github.com/users/varvet/gists{/gist_id}","starred_url":"https://api.github.com/users/varvet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varvet/subscriptions","organizations_url":"https://api.github.com/users/varvet/orgs","repos_url":"https://api.github.com/users/varvet/repos","events_url":"https://api.github.com/users/varvet/events{/privacy}","received_events_url":"https://api.github.com/users/varvet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/varvet/kaminari","description":"A Scope & Engine based, clean, powerful, customizable and sophisticated paginator for Rails 3 and 4","fork":true,"url":"https://api.github.com/repos/varvet/kaminari","forks_url":"https://api.github.com/repos/varvet/kaminari/forks","keys_url":"https://api.github.com/repos/varvet/kaminari/keys{/key_id}","collaborators_url":"https://api.github.com/repos/varvet/kaminari/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/varvet/kaminari/teams","hooks_url":"https://api.github.com/repos/varvet/kaminari/hooks","issue_events_url":"https://api.github.com/repos/varvet/kaminari/issues/events{/number}","events_url":"https://api.github.com/repos/varvet/kaminari/events","assignees_url":"https://api.github.com/repos/varvet/kaminari/assignees{/user}","branches_url":"https://api.github.com/repos/varvet/kaminari/branches{/branch}","tags_url":"https://api.github.com/repos/varvet/kaminari/tags","blobs_url":"https://api.github.com/repos/varvet/kaminari/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/varvet/kaminari/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/varvet/kaminari/git/refs{/sha}","trees_url":"https://api.github.com/repos/varvet/kaminari/git/trees{/sha}","statuses_url":"https://api.github.com/repos/varvet/kaminari/statuses/{sha}","languages_url":"https://api.github.com/repos/varvet/kaminari/languages","stargazers_url":"https://api.github.com/repos/varvet/kaminari/stargazers","contributors_url":"https://api.github.com/repos/varvet/kaminari/contributors","subscribers_url":"https://api.github.com/repos/varvet/kaminari/subscribers","subscription_url":"https://api.github.com/repos/varvet/kaminari/subscription","commits_url":"https://api.github.com/repos/varvet/kaminari/commits{/sha}","git_commits_url":"https://api.github.com/repos/varvet/kaminari/git/commits{/sha}","comments_url":"https://api.github.com/repos/varvet/kaminari/comments{/number}","issue_comment_url":"https://api.github.com/repos/varvet/kaminari/issues/comments{/number}","contents_url":"https://api.github.com/repos/varvet/kaminari/contents/{+path}","compare_url":"https://api.github.com/repos/varvet/kaminari/compare/{base}...{head}","merges_url":"https://api.github.com/repos/varvet/kaminari/merges","archive_url":"https://api.github.com/repos/varvet/kaminari/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/varvet/kaminari/downloads","issues_url":"https://api.github.com/repos/varvet/kaminari/issues{/number}","pulls_url":"https://api.github.com/repos/varvet/kaminari/pulls{/number}","milestones_url":"https://api.github.com/repos/varvet/kaminari/milestones{/number}","notifications_url":"https://api.github.com/repos/varvet/kaminari/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/varvet/kaminari/labels{/name}","releases_url":"https://api.github.com/repos/varvet/kaminari/releases{/id}","created_at":"2014-10-06T10:01:08Z","updated_at":"2015-05-18T13:57:49Z","pushed_at":"2015-05-25T13:46:34Z","git_url":"git://github.com/varvet/kaminari.git","ssh_url":"git@github.com:varvet/kaminari.git","clone_url":"https://github.com/varvet/kaminari.git","svn_url":"https://github.com/varvet/kaminari","homepage":"https://github.com/amatsuda/kaminari/wiki","size":1128,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"amatsuda:master","ref":"master","sha":"0146adf8275354155e6046eed32dba7748c8b8b5","user":{"login":"amatsuda","id":11493,"avatar_url":"https://avatars.githubusercontent.com/u/11493?v=3","gravatar_id":"","url":"https://api.github.com/users/amatsuda","html_url":"https://github.com/amatsuda","followers_url":"https://api.github.com/users/amatsuda/followers","following_url":"https://api.github.com/users/amatsuda/following{/other_user}","gists_url":"https://api.github.com/users/amatsuda/gists{/gist_id}","starred_url":"https://api.github.com/users/amatsuda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amatsuda/subscriptions","organizations_url":"https://api.github.com/users/amatsuda/orgs","repos_url":"https://api.github.com/users/amatsuda/repos","events_url":"https://api.github.com/users/amatsuda/events{/privacy}","received_events_url":"https://api.github.com/users/amatsuda/received_events","type":"User","site_admin":false},"repo":{"id":1333863,"name":"kaminari","full_name":"amatsuda/kaminari","owner":{"login":"amatsuda","id":11493,"avatar_url":"https://avatars.githubusercontent.com/u/11493?v=3","gravatar_id":"","url":"https://api.github.com/users/amatsuda","html_url":"https://github.com/amatsuda","followers_url":"https://api.github.com/users/amatsuda/followers","following_url":"https://api.github.com/users/amatsuda/following{/other_user}","gists_url":"https://api.github.com/users/amatsuda/gists{/gist_id}","starred_url":"https://api.github.com/users/amatsuda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amatsuda/subscriptions","organizations_url":"https://api.github.com/users/amatsuda/orgs","repos_url":"https://api.github.com/users/amatsuda/repos","events_url":"https://api.github.com/users/amatsuda/events{/privacy}","received_events_url":"https://api.github.com/users/amatsuda/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/amatsuda/kaminari","description":"A Scope & Engine based, clean, powerful, customizable and sophisticated paginator for Rails 3 and 4","fork":false,"url":"https://api.github.com/repos/amatsuda/kaminari","forks_url":"https://api.github.com/repos/amatsuda/kaminari/forks","keys_url":"https://api.github.com/repos/amatsuda/kaminari/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amatsuda/kaminari/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amatsuda/kaminari/teams","hooks_url":"https://api.github.com/repos/amatsuda/kaminari/hooks","issue_events_url":"https://api.github.com/repos/amatsuda/kaminari/issues/events{/number}","events_url":"https://api.github.com/repos/amatsuda/kaminari/events","assignees_url":"https://api.github.com/repos/amatsuda/kaminari/assignees{/user}","branches_url":"https://api.github.com/repos/amatsuda/kaminari/branches{/branch}","tags_url":"https://api.github.com/repos/amatsuda/kaminari/tags","blobs_url":"https://api.github.com/repos/amatsuda/kaminari/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amatsuda/kaminari/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amatsuda/kaminari/git/refs{/sha}","trees_url":"https://api.github.com/repos/amatsuda/kaminari/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amatsuda/kaminari/statuses/{sha}","languages_url":"https://api.github.com/repos/amatsuda/kaminari/languages","stargazers_url":"https://api.github.com/repos/amatsuda/kaminari/stargazers","contributors_url":"https://api.github.com/repos/amatsuda/kaminari/contributors","subscribers_url":"https://api.github.com/repos/amatsuda/kaminari/subscribers","subscription_url":"https://api.github.com/repos/amatsuda/kaminari/subscription","commits_url":"https://api.github.com/repos/amatsuda/kaminari/commits{/sha}","git_commits_url":"https://api.github.com/repos/amatsuda/kaminari/git/commits{/sha}","comments_url":"https://api.github.com/repos/amatsuda/kaminari/comments{/number}","issue_comment_url":"https://api.github.com/repos/amatsuda/kaminari/issues/comments{/number}","contents_url":"https://api.github.com/repos/amatsuda/kaminari/contents/{+path}","compare_url":"https://api.github.com/repos/amatsuda/kaminari/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amatsuda/kaminari/merges","archive_url":"https://api.github.com/repos/amatsuda/kaminari/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amatsuda/kaminari/downloads","issues_url":"https://api.github.com/repos/amatsuda/kaminari/issues{/number}","pulls_url":"https://api.github.com/repos/amatsuda/kaminari/pulls{/number}","milestones_url":"https://api.github.com/repos/amatsuda/kaminari/milestones{/number}","notifications_url":"https://api.github.com/repos/amatsuda/kaminari/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amatsuda/kaminari/labels{/name}","releases_url":"https://api.github.com/repos/amatsuda/kaminari/releases{/id}","created_at":"2011-02-06T08:07:20Z","updated_at":"2015-07-01T18:02:19Z","pushed_at":"2015-06-25T13:14:09Z","git_url":"git://github.com/amatsuda/kaminari.git","ssh_url":"git@github.com:amatsuda/kaminari.git","clone_url":"https://github.com/amatsuda/kaminari.git","svn_url":"https://github.com/amatsuda/kaminari","homepage":"https://github.com/amatsuda/kaminari/wiki","size":3261,"stargazers_count":5054,"watchers_count":5054,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":681,"mirror_url":null,"open_issues_count":23,"forks":681,"open_issues":23,"watchers":5054,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/amatsuda/kaminari/pulls/694"},"html":{"href":"https://github.com/amatsuda/kaminari/pull/694"},"issue":{"href":"https://api.github.com/repos/amatsuda/kaminari/issues/694"},"comments":{"href":"https://api.github.com/repos/amatsuda/kaminari/issues/694/comments"},"review_comments":{"href":"https://api.github.com/repos/amatsuda/kaminari/pulls/694/comments"},"review_comment":{"href":"https://api.github.com/repos/amatsuda/kaminari/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/amatsuda/kaminari/pulls/694/commits"},"statuses":{"href":"https://api.github.com/repos/amatsuda/kaminari/statuses/ca4947a39ae86d0adcd6c21455a434293bb022df"}}}}