{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/intl/issues/8","labels_url":"https://api.github.com/repos/dart-lang/intl/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/intl/issues/8/comments","events_url":"https://api.github.com/repos/dart-lang/intl/issues/8/events","html_url":"https://github.com/dart-lang/intl/issues/8","id":79038060,"number":8,"title":"Intl.select code generation error","user":{"login":"slambour","id":3195042,"avatar_url":"https://avatars.githubusercontent.com/u/3195042?v=3","gravatar_id":"","url":"https://api.github.com/users/slambour","html_url":"https://github.com/slambour","followers_url":"https://api.github.com/users/slambour/followers","following_url":"https://api.github.com/users/slambour/following{/other_user}","gists_url":"https://api.github.com/users/slambour/gists{/gist_id}","starred_url":"https://api.github.com/users/slambour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slambour/subscriptions","organizations_url":"https://api.github.com/users/slambour/orgs","repos_url":"https://api.github.com/users/slambour/repos","events_url":"https://api.github.com/users/slambour/events{/privacy}","received_events_url":"https://api.github.com/users/slambour/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-21T15:11:35Z","updated_at":"2015-05-21T20:01:18Z","closed_at":null,"body":"This code \r\n\r\n    String languages(String locale) => Intl.select(locale, \r\n       {\r\n         \"fr\" : \"frensh\",\r\n         \"en\" : \"english\"\r\n        },\r\n        name: \"languages\", \r\n        args: [locale]);\r\n\r\nis generated by intl:generate_from_arb with in locale FR likes that :  \r\n\r\n    static languages(locale) => \"{locale, select, fr {Français } en {Anglais }}\";    \r\n\r\nWhen I use the default locale (en) it work well with this angulardart code\r\n\r\n        <select class=\"form-control\"  ng-model=\"localeSelected\">\r\n            <option ng-repeat=\"language in ownerProfile['languages']\" value=\"{{language}}\">{{intl.languages(language)}}</option>\r\n        </select>\r\n\r\nBut with the fr locale the value `{locale, select, fr {Français } en {Anglais }}` is instead of `Français`\r\n\r\nWhen I edit the generated intl_fr.dart generated file and replace \r\n\r\n      static languages(locale) => \"{locale, select, fr {Français } en {Anglais }}\";\r\n\r\nby \r\n\r\n    static languages(locale) => {\"fr\":\"Français\",\"en\":\"Anglais\"}[locale];\r\n\r\nall works fine \r\nI don't understand why the behaviour is different between the default locale code and a selected locale\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/dart-lang/intl/issues/comments/104404247","html_url":"https://github.com/dart-lang/intl/issues/8#issuecomment-104404247","issue_url":"https://api.github.com/repos/dart-lang/intl/issues/8","id":104404247,"user":{"login":"alan-knight","id":3476088,"avatar_url":"https://avatars.githubusercontent.com/u/3476088?v=3","gravatar_id":"","url":"https://api.github.com/users/alan-knight","html_url":"https://github.com/alan-knight","followers_url":"https://api.github.com/users/alan-knight/followers","following_url":"https://api.github.com/users/alan-knight/following{/other_user}","gists_url":"https://api.github.com/users/alan-knight/gists{/gist_id}","starred_url":"https://api.github.com/users/alan-knight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alan-knight/subscriptions","organizations_url":"https://api.github.com/users/alan-knight/orgs","repos_url":"https://api.github.com/users/alan-knight/repos","events_url":"https://api.github.com/users/alan-knight/events{/privacy}","received_events_url":"https://api.github.com/users/alan-knight/received_events","type":"User","site_admin":false},"created_at":"2015-05-21T20:01:17Z","updated_at":"2015-05-21T20:01:17Z","body":"The ARB parser doesn't like spaces between the identifier and the text, i.e. it expects \r\n\"en{Anglais}\" rather than \"en {Anglais}\". Google translate toolkit is putting in the spaces now, so the parser needs to accept that.\r\n\r\nGiven that change, or taking the spaces out, your example behaves as I expect, which is to say that it throws and says you have to have a case for \"other\". And if I add that, then it works."}}