{"action":"closed","number":24,"pull_request":{"url":"https://api.github.com/repos/gdg-sp/html5studygroup/pulls/24","id":42544805,"html_url":"https://github.com/gdg-sp/html5studygroup/pull/24","diff_url":"https://github.com/gdg-sp/html5studygroup/pull/24.diff","patch_url":"https://github.com/gdg-sp/html5studygroup/pull/24.patch","issue_url":"https://api.github.com/repos/gdg-sp/html5studygroup/issues/24","number":24,"state":"closed","locked":false,"title":"Tarefa i18n - internacionalização","user":{"login":"rafaellucio","id":2213926,"avatar_url":"https://avatars.githubusercontent.com/u/2213926?v=3","gravatar_id":"","url":"https://api.github.com/users/rafaellucio","html_url":"https://github.com/rafaellucio","followers_url":"https://api.github.com/users/rafaellucio/followers","following_url":"https://api.github.com/users/rafaellucio/following{/other_user}","gists_url":"https://api.github.com/users/rafaellucio/gists{/gist_id}","starred_url":"https://api.github.com/users/rafaellucio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafaellucio/subscriptions","organizations_url":"https://api.github.com/users/rafaellucio/orgs","repos_url":"https://api.github.com/users/rafaellucio/repos","events_url":"https://api.github.com/users/rafaellucio/events{/privacy}","received_events_url":"https://api.github.com/users/rafaellucio/received_events","type":"User","site_admin":false},"body":"### i18n com angular-translate\r\n\r\n[angular-translate](http://angular-translate.github.io/)\r\n\r\nFeita internacionalização utilizando um modulo Angularjs chamado `angular-translate`, é um módulo muito fácil de usar quando se trata de i18n ou l10n, incluindo lazzy loading e prolarization.\r\n\r\n#### Funciona de forma bem simples\r\n\r\nÉ preciso inserir o modulo `angular-translate` como dependência e criar uma configuração para o módulo, essa `config` é feita no formato `'chave'`: `'valor'`, onde podemos referenciar a `chave` em nosso `html` e o `angular-translate` se encarrega de retornar o valor.\r\n\r\nUm exemplo prático incluso na documentação:\r\n\r\n```js\r\nvar app = angular.module('nomedomodulo', ['pascalprecht.translate']);\r\n\r\napp.config(function ($translateProvider) {\r\n  $translateProvider.translations('en', {\r\n    TITLE: 'Hello',\r\n    FOO: 'This is a paragraph.'\r\n  });\r\n  $translateProvider.translations('de', {\r\n    TITLE: 'Hallo',\r\n    FOO: 'Dies ist ein Paragraph.'\r\n  });\r\n  $translateProvider.preferredLanguage('en');\r\n});\r\n```\r\n\r\nNosso HTML\r\n\r\n```html\r\n<h2>{{'TITLE' | translate}}</h2>\r\n<p>{{'FOO' | translate}}</p>\r\n```\r\n\r\nou\r\n\r\n```html\r\n<h2 translate=\"TITLE\"></h2>\r\n<p translate=\"FOO\"></p>\r\n```","created_at":"2015-08-16T22:30:51Z","updated_at":"2015-08-20T20:00:36Z","closed_at":"2015-08-20T20:00:36Z","merged_at":"2015-08-20T20:00:36Z","merge_commit_sha":"1ba0bbf7017aeb96352bf21e6e8360ce6a7e1ee9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gdg-sp/html5studygroup/pulls/24/commits","review_comments_url":"https://api.github.com/repos/gdg-sp/html5studygroup/pulls/24/comments","review_comment_url":"https://api.github.com/repos/gdg-sp/html5studygroup/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gdg-sp/html5studygroup/issues/24/comments","statuses_url":"https://api.github.com/repos/gdg-sp/html5studygroup/statuses/a8f91c6b59946f666bca301fcd09ced747343c48","head":{"label":"rafaellucio:i18n","ref":"i18n","sha":"a8f91c6b59946f666bca301fcd09ced747343c48","user":{"login":"rafaellucio","id":2213926,"avatar_url":"https://avatars.githubusercontent.com/u/2213926?v=3","gravatar_id":"","url":"https://api.github.com/users/rafaellucio","html_url":"https://github.com/rafaellucio","followers_url":"https://api.github.com/users/rafaellucio/followers","following_url":"https://api.github.com/users/rafaellucio/following{/other_user}","gists_url":"https://api.github.com/users/rafaellucio/gists{/gist_id}","starred_url":"https://api.github.com/users/rafaellucio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafaellucio/subscriptions","organizations_url":"https://api.github.com/users/rafaellucio/orgs","repos_url":"https://api.github.com/users/rafaellucio/repos","events_url":"https://api.github.com/users/rafaellucio/events{/privacy}","received_events_url":"https://api.github.com/users/rafaellucio/received_events","type":"User","site_admin":false},"repo":{"id":37659566,"name":"html5studygroup","full_name":"rafaellucio/html5studygroup","owner":{"login":"rafaellucio","id":2213926,"avatar_url":"https://avatars.githubusercontent.com/u/2213926?v=3","gravatar_id":"","url":"https://api.github.com/users/rafaellucio","html_url":"https://github.com/rafaellucio","followers_url":"https://api.github.com/users/rafaellucio/followers","following_url":"https://api.github.com/users/rafaellucio/following{/other_user}","gists_url":"https://api.github.com/users/rafaellucio/gists{/gist_id}","starred_url":"https://api.github.com/users/rafaellucio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafaellucio/subscriptions","organizations_url":"https://api.github.com/users/rafaellucio/orgs","repos_url":"https://api.github.com/users/rafaellucio/repos","events_url":"https://api.github.com/users/rafaellucio/events{/privacy}","received_events_url":"https://api.github.com/users/rafaellucio/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rafaellucio/html5studygroup","description":"","fork":true,"url":"https://api.github.com/repos/rafaellucio/html5studygroup","forks_url":"https://api.github.com/repos/rafaellucio/html5studygroup/forks","keys_url":"https://api.github.com/repos/rafaellucio/html5studygroup/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rafaellucio/html5studygroup/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rafaellucio/html5studygroup/teams","hooks_url":"https://api.github.com/repos/rafaellucio/html5studygroup/hooks","issue_events_url":"https://api.github.com/repos/rafaellucio/html5studygroup/issues/events{/number}","events_url":"https://api.github.com/repos/rafaellucio/html5studygroup/events","assignees_url":"https://api.github.com/repos/rafaellucio/html5studygroup/assignees{/user}","branches_url":"https://api.github.com/repos/rafaellucio/html5studygroup/branches{/branch}","tags_url":"https://api.github.com/repos/rafaellucio/html5studygroup/tags","blobs_url":"https://api.github.com/repos/rafaellucio/html5studygroup/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rafaellucio/html5studygroup/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rafaellucio/html5studygroup/git/refs{/sha}","trees_url":"https://api.github.com/repos/rafaellucio/html5studygroup/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rafaellucio/html5studygroup/statuses/{sha}","languages_url":"https://api.github.com/repos/rafaellucio/html5studygroup/languages","stargazers_url":"https://api.github.com/repos/rafaellucio/html5studygroup/stargazers","contributors_url":"https://api.github.com/repos/rafaellucio/html5studygroup/contributors","subscribers_url":"https://api.github.com/repos/rafaellucio/html5studygroup/subscribers","subscription_url":"https://api.github.com/repos/rafaellucio/html5studygroup/subscription","commits_url":"https://api.github.com/repos/rafaellucio/html5studygroup/commits{/sha}","git_commits_url":"https://api.github.com/repos/rafaellucio/html5studygroup/git/commits{/sha}","comments_url":"https://api.github.com/repos/rafaellucio/html5studygroup/comments{/number}","issue_comment_url":"https://api.github.com/repos/rafaellucio/html5studygroup/issues/comments{/number}","contents_url":"https://api.github.com/repos/rafaellucio/html5studygroup/contents/{+path}","compare_url":"https://api.github.com/repos/rafaellucio/html5studygroup/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rafaellucio/html5studygroup/merges","archive_url":"https://api.github.com/repos/rafaellucio/html5studygroup/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rafaellucio/html5studygroup/downloads","issues_url":"https://api.github.com/repos/rafaellucio/html5studygroup/issues{/number}","pulls_url":"https://api.github.com/repos/rafaellucio/html5studygroup/pulls{/number}","milestones_url":"https://api.github.com/repos/rafaellucio/html5studygroup/milestones{/number}","notifications_url":"https://api.github.com/repos/rafaellucio/html5studygroup/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rafaellucio/html5studygroup/labels{/name}","releases_url":"https://api.github.com/repos/rafaellucio/html5studygroup/releases{/id}","created_at":"2015-06-18T12:57:25Z","updated_at":"2015-07-09T19:49:10Z","pushed_at":"2015-08-17T00:12:25Z","git_url":"git://github.com/rafaellucio/html5studygroup.git","ssh_url":"git@github.com:rafaellucio/html5studygroup.git","clone_url":"https://github.com/rafaellucio/html5studygroup.git","svn_url":"https://github.com/rafaellucio/html5studygroup","homepage":null,"size":2058,"stargazers_count":0,"watchers_count":0,"language":"CSS","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":"gdg-sp:master","ref":"master","sha":"fec2cd4cdbff8836632c9b902e8a3aa30f38f949","user":{"login":"gdg-sp","id":4615640,"avatar_url":"https://avatars.githubusercontent.com/u/4615640?v=3","gravatar_id":"","url":"https://api.github.com/users/gdg-sp","html_url":"https://github.com/gdg-sp","followers_url":"https://api.github.com/users/gdg-sp/followers","following_url":"https://api.github.com/users/gdg-sp/following{/other_user}","gists_url":"https://api.github.com/users/gdg-sp/gists{/gist_id}","starred_url":"https://api.github.com/users/gdg-sp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdg-sp/subscriptions","organizations_url":"https://api.github.com/users/gdg-sp/orgs","repos_url":"https://api.github.com/users/gdg-sp/repos","events_url":"https://api.github.com/users/gdg-sp/events{/privacy}","received_events_url":"https://api.github.com/users/gdg-sp/received_events","type":"Organization","site_admin":false},"repo":{"id":37616230,"name":"html5studygroup","full_name":"gdg-sp/html5studygroup","owner":{"login":"gdg-sp","id":4615640,"avatar_url":"https://avatars.githubusercontent.com/u/4615640?v=3","gravatar_id":"","url":"https://api.github.com/users/gdg-sp","html_url":"https://github.com/gdg-sp","followers_url":"https://api.github.com/users/gdg-sp/followers","following_url":"https://api.github.com/users/gdg-sp/following{/other_user}","gists_url":"https://api.github.com/users/gdg-sp/gists{/gist_id}","starred_url":"https://api.github.com/users/gdg-sp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdg-sp/subscriptions","organizations_url":"https://api.github.com/users/gdg-sp/orgs","repos_url":"https://api.github.com/users/gdg-sp/repos","events_url":"https://api.github.com/users/gdg-sp/events{/privacy}","received_events_url":"https://api.github.com/users/gdg-sp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gdg-sp/html5studygroup","description":"","fork":false,"url":"https://api.github.com/repos/gdg-sp/html5studygroup","forks_url":"https://api.github.com/repos/gdg-sp/html5studygroup/forks","keys_url":"https://api.github.com/repos/gdg-sp/html5studygroup/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gdg-sp/html5studygroup/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gdg-sp/html5studygroup/teams","hooks_url":"https://api.github.com/repos/gdg-sp/html5studygroup/hooks","issue_events_url":"https://api.github.com/repos/gdg-sp/html5studygroup/issues/events{/number}","events_url":"https://api.github.com/repos/gdg-sp/html5studygroup/events","assignees_url":"https://api.github.com/repos/gdg-sp/html5studygroup/assignees{/user}","branches_url":"https://api.github.com/repos/gdg-sp/html5studygroup/branches{/branch}","tags_url":"https://api.github.com/repos/gdg-sp/html5studygroup/tags","blobs_url":"https://api.github.com/repos/gdg-sp/html5studygroup/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gdg-sp/html5studygroup/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gdg-sp/html5studygroup/git/refs{/sha}","trees_url":"https://api.github.com/repos/gdg-sp/html5studygroup/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gdg-sp/html5studygroup/statuses/{sha}","languages_url":"https://api.github.com/repos/gdg-sp/html5studygroup/languages","stargazers_url":"https://api.github.com/repos/gdg-sp/html5studygroup/stargazers","contributors_url":"https://api.github.com/repos/gdg-sp/html5studygroup/contributors","subscribers_url":"https://api.github.com/repos/gdg-sp/html5studygroup/subscribers","subscription_url":"https://api.github.com/repos/gdg-sp/html5studygroup/subscription","commits_url":"https://api.github.com/repos/gdg-sp/html5studygroup/commits{/sha}","git_commits_url":"https://api.github.com/repos/gdg-sp/html5studygroup/git/commits{/sha}","comments_url":"https://api.github.com/repos/gdg-sp/html5studygroup/comments{/number}","issue_comment_url":"https://api.github.com/repos/gdg-sp/html5studygroup/issues/comments{/number}","contents_url":"https://api.github.com/repos/gdg-sp/html5studygroup/contents/{+path}","compare_url":"https://api.github.com/repos/gdg-sp/html5studygroup/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gdg-sp/html5studygroup/merges","archive_url":"https://api.github.com/repos/gdg-sp/html5studygroup/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gdg-sp/html5studygroup/downloads","issues_url":"https://api.github.com/repos/gdg-sp/html5studygroup/issues{/number}","pulls_url":"https://api.github.com/repos/gdg-sp/html5studygroup/pulls{/number}","milestones_url":"https://api.github.com/repos/gdg-sp/html5studygroup/milestones{/number}","notifications_url":"https://api.github.com/repos/gdg-sp/html5studygroup/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gdg-sp/html5studygroup/labels{/name}","releases_url":"https://api.github.com/repos/gdg-sp/html5studygroup/releases{/id}","created_at":"2015-06-17T19:28:34Z","updated_at":"2015-08-12T19:00:24Z","pushed_at":"2015-08-20T20:00:36Z","git_url":"git://github.com/gdg-sp/html5studygroup.git","ssh_url":"git@github.com:gdg-sp/html5studygroup.git","clone_url":"https://github.com/gdg-sp/html5studygroup.git","svn_url":"https://github.com/gdg-sp/html5studygroup","homepage":null,"size":2234,"stargazers_count":18,"watchers_count":18,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":36,"mirror_url":null,"open_issues_count":3,"forks":36,"open_issues":3,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gdg-sp/html5studygroup/pulls/24"},"html":{"href":"https://github.com/gdg-sp/html5studygroup/pull/24"},"issue":{"href":"https://api.github.com/repos/gdg-sp/html5studygroup/issues/24"},"comments":{"href":"https://api.github.com/repos/gdg-sp/html5studygroup/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/gdg-sp/html5studygroup/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/gdg-sp/html5studygroup/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gdg-sp/html5studygroup/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/gdg-sp/html5studygroup/statuses/a8f91c6b59946f666bca301fcd09ced747343c48"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"beneditobatista","id":5203831,"avatar_url":"https://avatars.githubusercontent.com/u/5203831?v=3","gravatar_id":"","url":"https://api.github.com/users/beneditobatista","html_url":"https://github.com/beneditobatista","followers_url":"https://api.github.com/users/beneditobatista/followers","following_url":"https://api.github.com/users/beneditobatista/following{/other_user}","gists_url":"https://api.github.com/users/beneditobatista/gists{/gist_id}","starred_url":"https://api.github.com/users/beneditobatista/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beneditobatista/subscriptions","organizations_url":"https://api.github.com/users/beneditobatista/orgs","repos_url":"https://api.github.com/users/beneditobatista/repos","events_url":"https://api.github.com/users/beneditobatista/events{/privacy}","received_events_url":"https://api.github.com/users/beneditobatista/received_events","type":"User","site_admin":false},"comments":2,"review_comments":0,"commits":5,"additions":153,"deletions":108,"changed_files":8}}