{"action":"created","issue":{"url":"https://api.github.com/repos/fnando/i18n-js/issues/393","repository_url":"https://api.github.com/repos/fnando/i18n-js","labels_url":"https://api.github.com/repos/fnando/i18n-js/issues/393/labels{/name}","comments_url":"https://api.github.com/repos/fnando/i18n-js/issues/393/comments","events_url":"https://api.github.com/repos/fnando/i18n-js/issues/393/events","html_url":"https://github.com/fnando/i18n-js/pull/393","id":136717829,"number":393,"title":"Fix bug with pluralization or interpolation of 'null' message + tests","user":{"login":"MichaelHoste","id":529357,"avatar_url":"https://avatars.githubusercontent.com/u/529357?v=3","gravatar_id":"","url":"https://api.github.com/users/MichaelHoste","html_url":"https://github.com/MichaelHoste","followers_url":"https://api.github.com/users/MichaelHoste/followers","following_url":"https://api.github.com/users/MichaelHoste/following{/other_user}","gists_url":"https://api.github.com/users/MichaelHoste/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelHoste/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelHoste/subscriptions","organizations_url":"https://api.github.com/users/MichaelHoste/orgs","repos_url":"https://api.github.com/users/MichaelHoste/repos","events_url":"https://api.github.com/users/MichaelHoste/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelHoste/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-26T14:49:34Z","updated_at":"2016-04-14T08:52:21Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/fnando/i18n-js/pulls/393","html_url":"https://github.com/fnando/i18n-js/pull/393","diff_url":"https://github.com/fnando/i18n-js/pull/393.diff","patch_url":"https://github.com/fnando/i18n-js/pull/393.patch"},"body":"Hi there,\r\n\r\nThis is a small pull request about a bug we are facing right now.\r\nIf we use YAML with this kind of keys: \r\n\r\n```yml\r\nnl:\r\n  badges:\r\n    counting:\r\n      one: \r\n      other: \r\n      zero: \r\n```\r\n\r\nit's transformed to this in the .js file:\r\n\r\n```javascript\r\nbadges: {\r\n  counting: {\r\n    one: null,\r\n    other: null,\r\n    zero: null,\r\n  }\r\n}\r\n```\r\n\r\nAnd, if we use `I18n.t(\"badges.counting\", {count: 2})`, we have an JavaScript error `Cannot read property 'match' of undefined`.\r\n\r\nWe solved it by returning an empty string instead of triggering the error. Would it be an acceptable solution for you?"},"comment":{"url":"https://api.github.com/repos/fnando/i18n-js/issues/comments/209834788","html_url":"https://github.com/fnando/i18n-js/pull/393#issuecomment-209834788","issue_url":"https://api.github.com/repos/fnando/i18n-js/issues/393","id":209834788,"user":{"login":"PikachuEXE","id":1018543,"avatar_url":"https://avatars.githubusercontent.com/u/1018543?v=3","gravatar_id":"","url":"https://api.github.com/users/PikachuEXE","html_url":"https://github.com/PikachuEXE","followers_url":"https://api.github.com/users/PikachuEXE/followers","following_url":"https://api.github.com/users/PikachuEXE/following{/other_user}","gists_url":"https://api.github.com/users/PikachuEXE/gists{/gist_id}","starred_url":"https://api.github.com/users/PikachuEXE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PikachuEXE/subscriptions","organizations_url":"https://api.github.com/users/PikachuEXE/orgs","repos_url":"https://api.github.com/users/PikachuEXE/repos","events_url":"https://api.github.com/users/PikachuEXE/events{/privacy}","received_events_url":"https://api.github.com/users/PikachuEXE/received_events","type":"User","site_admin":false},"created_at":"2016-04-14T08:52:21Z","updated_at":"2016-04-14T08:52:21Z","body":"I am OK with returning an error message when null value is encountered"}}