{"action":"closed","issue":{"url":"https://api.github.com/repos/segabor/closure-templates/issues/6","repository_url":"https://api.github.com/repos/segabor/closure-templates","labels_url":"https://api.github.com/repos/segabor/closure-templates/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/segabor/closure-templates/issues/6/comments","events_url":"https://api.github.com/repos/segabor/closure-templates/issues/6/events","html_url":"https://github.com/segabor/closure-templates/issues/6","id":391372120,"node_id":"MDU6SXNzdWUzOTEzNzIxMjA=","number":6,"title":"Broken translation of if-else if-else expression","user":{"login":"segabor","id":23614,"node_id":"MDQ6VXNlcjIzNjE0","avatar_url":"https://avatars0.githubusercontent.com/u/23614?v=4","gravatar_id":"","url":"https://api.github.com/users/segabor","html_url":"https://github.com/segabor","followers_url":"https://api.github.com/users/segabor/followers","following_url":"https://api.github.com/users/segabor/following{/other_user}","gists_url":"https://api.github.com/users/segabor/gists{/gist_id}","starred_url":"https://api.github.com/users/segabor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segabor/subscriptions","organizations_url":"https://api.github.com/users/segabor/orgs","repos_url":"https://api.github.com/users/segabor/repos","events_url":"https://api.github.com/users/segabor/events{/privacy}","received_events_url":"https://api.github.com/users/segabor/received_events","type":"User","site_admin":false},"labels":[{"id":776534183,"node_id":"MDU6TGFiZWw3NzY1MzQxODM=","url":"https://api.github.com/repos/segabor/closure-templates/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-15T12:01:29Z","updated_at":"2018-12-15T12:08:30Z","closed_at":"2018-12-15T12:08:30Z","author_association":"OWNER","body":"The following soy expression\r\n```soy\r\n  {if round($pi, 2) == 3.14}\r\n    {msg desc=\"Example: 3.1416 is a good approximation of pi.\"}\r\n      {$pi} is a good approximation of pi.\r\n    {/msg}\r\n  {elseif round($pi) == 3}\r\n    {msg desc=\"Example: 3.1 is a bad approximation of pi.\"}\r\n      {$pi} is a bad approximation of pi.\r\n    {/msg}\r\n  {else}\r\n    {msg desc=\"Example: 5 is nowhere near the value of pi.\"}\r\n      {$pi} is nowhere near the value of pi.\r\n    {/msg}\r\n  {/if}\r\n```\r\nis compiled to\r\n```swift\r\n    if round(data[\"pi\"]) == 3.14 {\r\n        output.append(translator_impl.render(translator_impl.prepare(6820146346443344314, \"{PI} is a good approximation of pi.\", [\"PI\"]), [\"PI\": soy.escapeHtml(data[\"pi\"]).description]))\r\n    }\r\n    } else if round(data[\"pi\"]) == 3 {\r\n        output.append(translator_impl.render(translator_impl.prepare(6820284805811944992, \"{PI} is a bad approximation of pi.\", [\"PI\"]), [\"PI\": soy.escapeHtml(data[\"pi\"]).description]))\r\n    }\r\n    } else {\r\n        output.append(translator_impl.render(translator_impl.prepare(889614911019327165, \"{PI} is nowhere near the value of pi.\", [\"PI\"]), [\"PI\": soy.escapeHtml(data[\"pi\"]).description]))\r\n    }\r\n```\r\nwhere `if` and `else if` branches has an extra closing bracelet."}}
{"actor":{"display_login":"segabor"}}