{"action":"closed","issue":{"url":"https://api.github.com/repos/fnando/i18n-js/issues/338","labels_url":"https://api.github.com/repos/fnando/i18n-js/issues/338/labels{/name}","comments_url":"https://api.github.com/repos/fnando/i18n-js/issues/338/comments","events_url":"https://api.github.com/repos/fnando/i18n-js/issues/338/events","html_url":"https://github.com/fnando/i18n-js/issues/338","id":90025957,"number":338,"title":"Fallbacks don't work when translations are set to nil","user":{"login":"michieldewit","id":5517741,"avatar_url":"https://avatars.githubusercontent.com/u/5517741?v=3","gravatar_id":"","url":"https://api.github.com/users/michieldewit","html_url":"https://github.com/michieldewit","followers_url":"https://api.github.com/users/michieldewit/followers","following_url":"https://api.github.com/users/michieldewit/following{/other_user}","gists_url":"https://api.github.com/users/michieldewit/gists{/gist_id}","starred_url":"https://api.github.com/users/michieldewit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michieldewit/subscriptions","organizations_url":"https://api.github.com/users/michieldewit/orgs","repos_url":"https://api.github.com/users/michieldewit/repos","events_url":"https://api.github.com/users/michieldewit/events{/privacy}","received_events_url":"https://api.github.com/users/michieldewit/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/fnando/i18n-js/labels/status/feedback%20required","name":"status/feedback required","color":"5319e7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-22T06:39:15Z","updated_at":"2015-06-22T14:38:43Z","closed_at":"2015-06-22T14:38:43Z","body":"I am using a tool to manage translations online (WebTranslateIt). This tool makes sure all language keys are available in all YML files. If no translation is available, it will output a `nil` value (`~` in YML). The new `I18n::JS::Utils MERGER` does not take these `nil` values into account and will not merge the appropriate fallback.\r\n\r\nExample:\r\n\r\n```\r\nen:\r\n  key:\r\n    value: \"My value\"\r\n```\r\n\r\nSpanish (`es`) is configured with `en` as fallback:\r\n\r\n```\r\nes:\r\n  key:\r\n    value: ~\r\n```\r\n\r\nThe resulting JavaScript should be something like:\r\n\r\n```\r\nI18n.translations[\"es\"] = {\r\n  \"key\": {\r\n    \"value\": \"My value\"\r\n  }\r\n}\r\n```\r\n\r\nbut instead is\r\n\r\n```\r\nI18n.translations[\"es\"] = {\r\n  \"key\": {\r\n    \"value\": null\r\n  }\r\n}\r\n```"}}