{"pull_request":{"title":"Add i18n support","user":{"login":"jeanpimentel","id":68348,"url":"https://api.github.com/users/jeanpimentel","avatar_url":"https://secure.gravatar.com/avatar/dd958da4c68b7d3227b3f1cd92a429a6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"dd958da4c68b7d3227b3f1cd92a429a6"},"created_at":"2011-12-27T02:45:55Z","merged_at":"2011-12-28T11:46:31Z","review_comments":0,"state":"closed","updated_at":"2011-12-28T11:46:32Z","id":631213,"patch_url":"https://github.com/Respect/Validation/pull/57.patch","closed_at":"2011-12-28T11:46:31Z","html_url":"https://github.com/Respect/Validation/pull/57","deletions":4,"mergeable":null,"base":{"ref":"develop","user":{"login":"Respect","id":354431,"url":"https://api.github.com/users/Respect","avatar_url":"https://secure.gravatar.com/avatar/922a95a9af41cc11da6430a82cd12fd9?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","gravatar_id":"922a95a9af41cc11da6430a82cd12fd9"},"sha":"468d9cc98ed53ed6b5d02c3f5ac54bb24e8571b7","repo":{"open_issues":11,"created_at":"2010-09-22T16:08:05Z","git_url":"git://github.com/Respect/Validation.git","watchers":271,"fork":false,"updated_at":"2011-12-28T11:46:31Z","id":931033,"language":"PHP","html_url":"https://github.com/Respect/Validation","name":"Validation","master_branch":"develop","description":"The most awesome validation engine ever created for PHP","url":"https://api.github.com/repos/Respect/Validation","pushed_at":"2011-12-28T11:46:31Z","forks":24,"ssh_url":"git@github.com:Respect/Validation.git","clone_url":"https://github.com/Respect/Validation.git","owner":{"login":"Respect","id":354431,"url":"https://api.github.com/users/Respect","avatar_url":"https://secure.gravatar.com/avatar/922a95a9af41cc11da6430a82cd12fd9?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","gravatar_id":"922a95a9af41cc11da6430a82cd12fd9"},"homepage":"","size":148,"private":false,"svn_url":"https://github.com/Respect/Validation"},"label":"Respect:develop"},"issue_url":"https://github.com/Respect/Validation/issues/57","body":"__Before:__\r\n\r\n```php\r\ntry {\r\n    v::int()->odd()->assert('jean pimentel');\r\n} catch (\\Respect\\Validation\\Exceptions\\ValidationException $e) {\r\n    echo $e->getFullMessage();\r\n}\r\n```\r\n\r\n```\r\n\\-These 2 rules must pass for \"jean pimentel\"\r\n  |-\"jean pimentel\" must be an integer number\r\n  \\-\"jean pimentel\" must be an odd number\r\n```\r\n\r\n__Now:__\r\n\r\n```php\r\n// my translator class only to test\r\nclass MyTranslate {\r\n     public function translate($text) {\r\n         if($text == '{{name}} must be an integer number')\r\n             return '{{name}} deve ser um número inteiro';\r\n         if($text == '{{name}} must be an odd number')\r\n             return '{{name}} deve ser um número ímpar';\r\n         if($text == 'These {{failed}} rules must pass for {{name}}')\r\n             return 'Essas {{failed}} regras devem ser seguidas para {{name}}';\r\n         return $text;\r\n     }\r\n}\r\n```\r\n\r\n```php\r\n// setting the translator callback\r\nv::$translator = array('MyTranslate', 'translate');\r\n\r\ntry {\r\n    v::int()->odd()->assert('jean pimentel');\r\n} catch (\\Respect\\Validation\\Exceptions\\ValidationException $e) {\r\n    echo $e->getFullMessage();\r\n}\r\n```\r\n\r\n```\r\n\\-Essas 2 regras devem ser seguidas para \"jean pimentel\"\r\n  |-\"jean pimentel\" deve ser um número inteiro\r\n  \\-\"jean pimentel\" deve ser um número ímpar\r\n```","number":57,"additions":12,"commits":1,"url":"https://api.github.com/repos/Respect/Validation/pulls/57","diff_url":"https://github.com/Respect/Validation/pull/57.diff","merged_by":{"login":"alganet","id":202642,"url":"https://api.github.com/users/alganet","avatar_url":"https://secure.gravatar.com/avatar/63c59020e0d7efaef816653c853ecc05?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"63c59020e0d7efaef816653c853ecc05"},"_links":{"review_comments":{"href":"https://api.github.com/repos/Respect/Validation/pulls/57/comments"},"html":{"href":"https://github.com/Respect/Validation/pull/57"},"self":{"href":"https://api.github.com/repos/Respect/Validation/pulls/57"},"comments":{"href":"https://api.github.com/repos/Respect/Validation/issues/57/comments"}},"comments":1,"head":{"ref":"i18n","user":{"login":"jeanpimentel","id":68348,"url":"https://api.github.com/users/jeanpimentel","avatar_url":"https://secure.gravatar.com/avatar/dd958da4c68b7d3227b3f1cd92a429a6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"dd958da4c68b7d3227b3f1cd92a429a6"},"sha":"2d13b09be8fc0d0411d0c625adcc483e72a682d8","repo":{"open_issues":0,"created_at":"2011-10-06T01:14:49Z","git_url":"git://github.com/jeanpimentel/Validation.git","watchers":1,"fork":true,"updated_at":"2011-12-27T02:43:34Z","id":2523366,"language":"PHP","html_url":"https://github.com/jeanpimentel/Validation","name":"Validation","master_branch":"develop","description":"The most awesome validation engine ever created for PHP","url":"https://api.github.com/repos/jeanpimentel/Validation","pushed_at":"2011-12-27T02:43:34Z","forks":0,"ssh_url":"git@github.com:jeanpimentel/Validation.git","clone_url":"https://github.com/jeanpimentel/Validation.git","owner":{"login":"jeanpimentel","id":68348,"url":"https://api.github.com/users/jeanpimentel","avatar_url":"https://secure.gravatar.com/avatar/dd958da4c68b7d3227b3f1cd92a429a6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"dd958da4c68b7d3227b3f1cd92a429a6"},"homepage":"","size":132,"private":false,"svn_url":"https://github.com/jeanpimentel/Validation"},"label":"jeanpimentel:i18n"},"merged":true,"changed_files":3},"number":57,"action":"closed"}