{"action":"created","comment":{"url":"https://api.github.com/repos/mapsme/omim/pulls/comments/84081805","pull_request_review_id":4881114,"id":84081805,"diff_hunk":"@@ -717,13 +717,15 @@ public static CharSequence formatRoutingTime(Context context, int seconds, @Dime\n   {\n     long minutes = TimeUnit.SECONDS.toMinutes(seconds) % 60;\n     long hours = TimeUnit.SECONDS.toHours(seconds);\n-\n-    return hours == 0 ? Utils.formatUnitsText(context, R.dimen.text_size_routing_number, unitsSize,\n-                                              String.valueOf(minutes), \"min\")\n-                      : TextUtils.concat(Utils.formatUnitsText(context, R.dimen.text_size_routing_number, unitsSize,\n-                                                               String.valueOf(hours), \"h \"),\n-                                         Utils.formatUnitsText(context, R.dimen.text_size_routing_number, unitsSize,\n-                                                               String.valueOf(minutes), \"min\"));\n+    final String min = context.getString(R.string.minute);\n+    final String hour = context.getString(R.string.hour);\n+    @DimenRes\n+    final int textSize = R.dimen.text_size_routing_number;\n+    return hours == 0 ? Utils.formatUnitsText(context, textSize, unitsSize, String.valueOf(minutes), min)","path":"android/src/com/mapswithme/maps/routing/RoutingController.java","position":15,"original_position":15,"commit_id":"9e59543cb92512490903e40c15757b3bff18bad7","original_commit_id":"9e59543cb92512490903e40c15757b3bff18bad7","user":{"login":"milchakov","id":2606569,"avatar_url":"https://avatars.githubusercontent.com/u/2606569?v=3","gravatar_id":"","url":"https://api.github.com/users/milchakov","html_url":"https://github.com/milchakov","followers_url":"https://api.github.com/users/milchakov/followers","following_url":"https://api.github.com/users/milchakov/following{/other_user}","gists_url":"https://api.github.com/users/milchakov/gists{/gist_id}","starred_url":"https://api.github.com/users/milchakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milchakov/subscriptions","organizations_url":"https://api.github.com/users/milchakov/orgs","repos_url":"https://api.github.com/users/milchakov/repos","events_url":"https://api.github.com/users/milchakov/events{/privacy}","received_events_url":"https://api.github.com/users/milchakov/received_events","type":"User","site_admin":false},"body":"выглядит монструозно, было бы здорово сделать что-то типо\r\n```\r\nif (hours == 0)\r\n  return ...\r\n\r\nreturn ...\r\n```\r\nИ вместо concat использовать StringBuilder.append\r\nЕсли для джавы такая конструкция - норма, то ок","created_at":"2016-10-19T14:24:01Z","updated_at":"2016-10-19T14:24:01Z","html_url":"https://github.com/mapsme/omim/pull/4527#discussion_r84081805","pull_request_url":"https://api.github.com/repos/mapsme/omim/pulls/4527","_links":{"self":{"href":"https://api.github.com/repos/mapsme/omim/pulls/comments/84081805"},"html":{"href":"https://github.com/mapsme/omim/pull/4527#discussion_r84081805"},"pull_request":{"href":"https://api.github.com/repos/mapsme/omim/pulls/4527"}}},"pull_request":{"url":"https://api.github.com/repos/mapsme/omim/pulls/4527","id":90017478,"html_url":"https://github.com/mapsme/omim/pull/4527","diff_url":"https://github.com/mapsme/omim/pull/4527.diff","patch_url":"https://github.com/mapsme/omim/pull/4527.patch","issue_url":"https://api.github.com/repos/mapsme/omim/issues/4527","number":4527,"state":"open","locked":false,"title":"[android] Localized time units in routing/uber panel","user":{"login":"alexzatsepin","id":8442156,"avatar_url":"https://avatars.githubusercontent.com/u/8442156?v=3","gravatar_id":"","url":"https://api.github.com/users/alexzatsepin","html_url":"https://github.com/alexzatsepin","followers_url":"https://api.github.com/users/alexzatsepin/followers","following_url":"https://api.github.com/users/alexzatsepin/following{/other_user}","gists_url":"https://api.github.com/users/alexzatsepin/gists{/gist_id}","starred_url":"https://api.github.com/users/alexzatsepin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexzatsepin/subscriptions","organizations_url":"https://api.github.com/users/alexzatsepin/orgs","repos_url":"https://api.github.com/users/alexzatsepin/repos","events_url":"https://api.github.com/users/alexzatsepin/events{/privacy}","received_events_url":"https://api.github.com/users/alexzatsepin/received_events","type":"User","site_admin":false},"body":"@milchakov @mpimenov @bykoianko ","created_at":"2016-10-19T14:11:39Z","updated_at":"2016-10-19T14:24:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"34fee53548fc50bc0e5bac902041f9f335aa5958","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mapsme/omim/pulls/4527/commits","review_comments_url":"https://api.github.com/repos/mapsme/omim/pulls/4527/comments","review_comment_url":"https://api.github.com/repos/mapsme/omim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapsme/omim/issues/4527/comments","statuses_url":"https://api.github.com/repos/mapsme/omim/statuses/9e59543cb92512490903e40c15757b3bff18bad7","head":{"label":"alexzatsepin:MAPSME-2694-localize-time-units","ref":"MAPSME-2694-localize-time-units","sha":"9e59543cb92512490903e40c15757b3bff18bad7","user":{"login":"alexzatsepin","id":8442156,"avatar_url":"https://avatars.githubusercontent.com/u/8442156?v=3","gravatar_id":"","url":"https://api.github.com/users/alexzatsepin","html_url":"https://github.com/alexzatsepin","followers_url":"https://api.github.com/users/alexzatsepin/followers","following_url":"https://api.github.com/users/alexzatsepin/following{/other_user}","gists_url":"https://api.github.com/users/alexzatsepin/gists{/gist_id}","starred_url":"https://api.github.com/users/alexzatsepin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexzatsepin/subscriptions","organizations_url":"https://api.github.com/users/alexzatsepin/orgs","repos_url":"https://api.github.com/users/alexzatsepin/repos","events_url":"https://api.github.com/users/alexzatsepin/events{/privacy}","received_events_url":"https://api.github.com/users/alexzatsepin/received_events","type":"User","site_admin":false},"repo":{"id":67988467,"name":"omim","full_name":"alexzatsepin/omim","owner":{"login":"alexzatsepin","id":8442156,"avatar_url":"https://avatars.githubusercontent.com/u/8442156?v=3","gravatar_id":"","url":"https://api.github.com/users/alexzatsepin","html_url":"https://github.com/alexzatsepin","followers_url":"https://api.github.com/users/alexzatsepin/followers","following_url":"https://api.github.com/users/alexzatsepin/following{/other_user}","gists_url":"https://api.github.com/users/alexzatsepin/gists{/gist_id}","starred_url":"https://api.github.com/users/alexzatsepin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexzatsepin/subscriptions","organizations_url":"https://api.github.com/users/alexzatsepin/orgs","repos_url":"https://api.github.com/users/alexzatsepin/repos","events_url":"https://api.github.com/users/alexzatsepin/events{/privacy}","received_events_url":"https://api.github.com/users/alexzatsepin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alexzatsepin/omim","description":"MAPS.ME - Offline OpenStreetMap maps for iOS/Android/Mac/Linux/Windows","fork":true,"url":"https://api.github.com/repos/alexzatsepin/omim","forks_url":"https://api.github.com/repos/alexzatsepin/omim/forks","keys_url":"https://api.github.com/repos/alexzatsepin/omim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexzatsepin/omim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexzatsepin/omim/teams","hooks_url":"https://api.github.com/repos/alexzatsepin/omim/hooks","issue_events_url":"https://api.github.com/repos/alexzatsepin/omim/issues/events{/number}","events_url":"https://api.github.com/repos/alexzatsepin/omim/events","assignees_url":"https://api.github.com/repos/alexzatsepin/omim/assignees{/user}","branches_url":"https://api.github.com/repos/alexzatsepin/omim/branches{/branch}","tags_url":"https://api.github.com/repos/alexzatsepin/omim/tags","blobs_url":"https://api.github.com/repos/alexzatsepin/omim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexzatsepin/omim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexzatsepin/omim/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexzatsepin/omim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexzatsepin/omim/statuses/{sha}","languages_url":"https://api.github.com/repos/alexzatsepin/omim/languages","stargazers_url":"https://api.github.com/repos/alexzatsepin/omim/stargazers","contributors_url":"https://api.github.com/repos/alexzatsepin/omim/contributors","subscribers_url":"https://api.github.com/repos/alexzatsepin/omim/subscribers","subscription_url":"https://api.github.com/repos/alexzatsepin/omim/subscription","commits_url":"https://api.github.com/repos/alexzatsepin/omim/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexzatsepin/omim/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexzatsepin/omim/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexzatsepin/omim/issues/comments{/number}","contents_url":"https://api.github.com/repos/alexzatsepin/omim/contents/{+path}","compare_url":"https://api.github.com/repos/alexzatsepin/omim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexzatsepin/omim/merges","archive_url":"https://api.github.com/repos/alexzatsepin/omim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexzatsepin/omim/downloads","issues_url":"https://api.github.com/repos/alexzatsepin/omim/issues{/number}","pulls_url":"https://api.github.com/repos/alexzatsepin/omim/pulls{/number}","milestones_url":"https://api.github.com/repos/alexzatsepin/omim/milestones{/number}","notifications_url":"https://api.github.com/repos/alexzatsepin/omim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexzatsepin/omim/labels{/name}","releases_url":"https://api.github.com/repos/alexzatsepin/omim/releases{/id}","deployments_url":"https://api.github.com/repos/alexzatsepin/omim/deployments","created_at":"2016-09-12T07:57:50Z","updated_at":"2016-09-12T07:59:26Z","pushed_at":"2016-10-19T14:10:52Z","git_url":"git://github.com/alexzatsepin/omim.git","ssh_url":"git@github.com:alexzatsepin/omim.git","clone_url":"https://github.com/alexzatsepin/omim.git","svn_url":"https://github.com/alexzatsepin/omim","homepage":null,"size":2762184,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mapsme:master","ref":"master","sha":"d27ed175d5e7e5f41c00111a5d7bb90f2c9d85e6","user":{"login":"mapsme","id":14185141,"avatar_url":"https://avatars.githubusercontent.com/u/14185141?v=3","gravatar_id":"","url":"https://api.github.com/users/mapsme","html_url":"https://github.com/mapsme","followers_url":"https://api.github.com/users/mapsme/followers","following_url":"https://api.github.com/users/mapsme/following{/other_user}","gists_url":"https://api.github.com/users/mapsme/gists{/gist_id}","starred_url":"https://api.github.com/users/mapsme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapsme/subscriptions","organizations_url":"https://api.github.com/users/mapsme/orgs","repos_url":"https://api.github.com/users/mapsme/repos","events_url":"https://api.github.com/users/mapsme/events{/privacy}","received_events_url":"https://api.github.com/users/mapsme/received_events","type":"Organization","site_admin":false},"repo":{"id":42798033,"name":"omim","full_name":"mapsme/omim","owner":{"login":"mapsme","id":14185141,"avatar_url":"https://avatars.githubusercontent.com/u/14185141?v=3","gravatar_id":"","url":"https://api.github.com/users/mapsme","html_url":"https://github.com/mapsme","followers_url":"https://api.github.com/users/mapsme/followers","following_url":"https://api.github.com/users/mapsme/following{/other_user}","gists_url":"https://api.github.com/users/mapsme/gists{/gist_id}","starred_url":"https://api.github.com/users/mapsme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapsme/subscriptions","organizations_url":"https://api.github.com/users/mapsme/orgs","repos_url":"https://api.github.com/users/mapsme/repos","events_url":"https://api.github.com/users/mapsme/events{/privacy}","received_events_url":"https://api.github.com/users/mapsme/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapsme/omim","description":"MAPS.ME - Offline OpenStreetMap maps for iOS/Android/Mac/Linux/Windows","fork":false,"url":"https://api.github.com/repos/mapsme/omim","forks_url":"https://api.github.com/repos/mapsme/omim/forks","keys_url":"https://api.github.com/repos/mapsme/omim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapsme/omim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapsme/omim/teams","hooks_url":"https://api.github.com/repos/mapsme/omim/hooks","issue_events_url":"https://api.github.com/repos/mapsme/omim/issues/events{/number}","events_url":"https://api.github.com/repos/mapsme/omim/events","assignees_url":"https://api.github.com/repos/mapsme/omim/assignees{/user}","branches_url":"https://api.github.com/repos/mapsme/omim/branches{/branch}","tags_url":"https://api.github.com/repos/mapsme/omim/tags","blobs_url":"https://api.github.com/repos/mapsme/omim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapsme/omim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapsme/omim/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapsme/omim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapsme/omim/statuses/{sha}","languages_url":"https://api.github.com/repos/mapsme/omim/languages","stargazers_url":"https://api.github.com/repos/mapsme/omim/stargazers","contributors_url":"https://api.github.com/repos/mapsme/omim/contributors","subscribers_url":"https://api.github.com/repos/mapsme/omim/subscribers","subscription_url":"https://api.github.com/repos/mapsme/omim/subscription","commits_url":"https://api.github.com/repos/mapsme/omim/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapsme/omim/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapsme/omim/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapsme/omim/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapsme/omim/contents/{+path}","compare_url":"https://api.github.com/repos/mapsme/omim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapsme/omim/merges","archive_url":"https://api.github.com/repos/mapsme/omim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapsme/omim/downloads","issues_url":"https://api.github.com/repos/mapsme/omim/issues{/number}","pulls_url":"https://api.github.com/repos/mapsme/omim/pulls{/number}","milestones_url":"https://api.github.com/repos/mapsme/omim/milestones{/number}","notifications_url":"https://api.github.com/repos/mapsme/omim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapsme/omim/labels{/name}","releases_url":"https://api.github.com/repos/mapsme/omim/releases{/id}","deployments_url":"https://api.github.com/repos/mapsme/omim/deployments","created_at":"2015-09-20T02:57:13Z","updated_at":"2016-10-19T08:11:58Z","pushed_at":"2016-10-19T14:17:47Z","git_url":"git://github.com/mapsme/omim.git","ssh_url":"git@github.com:mapsme/omim.git","clone_url":"https://github.com/mapsme/omim.git","svn_url":"https://github.com/mapsme/omim","homepage":null,"size":2848620,"stargazers_count":2008,"watchers_count":2008,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":377,"mirror_url":null,"open_issues_count":351,"forks":377,"open_issues":351,"watchers":2008,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapsme/omim/pulls/4527"},"html":{"href":"https://github.com/mapsme/omim/pull/4527"},"issue":{"href":"https://api.github.com/repos/mapsme/omim/issues/4527"},"comments":{"href":"https://api.github.com/repos/mapsme/omim/issues/4527/comments"},"review_comments":{"href":"https://api.github.com/repos/mapsme/omim/pulls/4527/comments"},"review_comment":{"href":"https://api.github.com/repos/mapsme/omim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapsme/omim/pulls/4527/commits"},"statuses":{"href":"https://api.github.com/repos/mapsme/omim/statuses/9e59543cb92512490903e40c15757b3bff18bad7"}}}}
{"actor":{"display_login":"milchakov"}}