{"action":"opened","issue":{"url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/7646","repository_url":"https://api.github.com/repos/lionheart/openradar-mirror","labels_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/7646/labels{/name}","comments_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/7646/comments","events_url":"https://api.github.com/repos/lionheart/openradar-mirror/issues/7646/events","html_url":"https://github.com/lionheart/openradar-mirror/issues/7646","id":135494322,"number":7646,"title":"24770264: genstrings fails for Swift calls to NSLocalizedString with more than a key and a comment","user":{"login":"openradar-mirror","id":13605213,"avatar_url":"https://avatars.githubusercontent.com/u/13605213?v=3","gravatar_id":"","url":"https://api.github.com/users/openradar-mirror","html_url":"https://github.com/openradar-mirror","followers_url":"https://api.github.com/users/openradar-mirror/followers","following_url":"https://api.github.com/users/openradar-mirror/following{/other_user}","gists_url":"https://api.github.com/users/openradar-mirror/gists{/gist_id}","starred_url":"https://api.github.com/users/openradar-mirror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openradar-mirror/subscriptions","organizations_url":"https://api.github.com/users/openradar-mirror/orgs","repos_url":"https://api.github.com/users/openradar-mirror/repos","events_url":"https://api.github.com/users/openradar-mirror/events{/privacy}","received_events_url":"https://api.github.com/users/openradar-mirror/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lionheart/openradar-mirror/labels/classification:other%20bug","name":"classification:other bug","color":"e11d21"},{"url":"https://api.github.com/repos/lionheart/openradar-mirror/labels/reproducible:always","name":"reproducible:always","color":"5319e7"},{"url":"https://api.github.com/repos/lionheart/openradar-mirror/labels/status:open","name":"status:open","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/lionheart/openradar-mirror/milestones/1","html_url":"https://github.com/lionheart/openradar-mirror/milestones/Developer%20Tools","labels_url":"https://api.github.com/repos/lionheart/openradar-mirror/milestones/1/labels","id":1237415,"number":1,"title":"Developer Tools","description":null,"creator":{"login":"openradar-mirror","id":13605213,"avatar_url":"https://avatars.githubusercontent.com/u/13605213?v=3","gravatar_id":"","url":"https://api.github.com/users/openradar-mirror","html_url":"https://github.com/openradar-mirror","followers_url":"https://api.github.com/users/openradar-mirror/followers","following_url":"https://api.github.com/users/openradar-mirror/following{/other_user}","gists_url":"https://api.github.com/users/openradar-mirror/gists{/gist_id}","starred_url":"https://api.github.com/users/openradar-mirror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openradar-mirror/subscriptions","organizations_url":"https://api.github.com/users/openradar-mirror/orgs","repos_url":"https://api.github.com/users/openradar-mirror/repos","events_url":"https://api.github.com/users/openradar-mirror/events{/privacy}","received_events_url":"https://api.github.com/users/openradar-mirror/received_events","type":"User","site_admin":false},"open_issues":2019,"closed_issues":16,"state":"open","created_at":"2015-08-03T02:08:29Z","updated_at":"2016-02-22T18:01:34Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2016-02-22T18:01:33Z","updated_at":"2016-02-22T18:01:34Z","closed_at":null,"body":"#### Description\n\nSummary:\r\nThe genstrings utility searches source files for uses of NSLocalizedString(), extracting the key and other information out to a .strings file for localization and internationalization. genstrings can be run on Swift files in addition to Objective-C .h and .m files.\r\n\r\nHowever, invocations of NSLocalizedString() in Swift seem to only be supported by genstrings if they provide a key and a comment, but no other arguments. For example, NSLocalizedString() supports a `value:` argument in Swift; if this is given, an invocation of genstrings on that Swift file will fail, producing the error \"Argument is not a literal string.\"\r\n\r\nSteps to Reproduce:\r\n1. Download the attached Swift file\r\n2. Invoke genstrings on this file\r\n\r\nExpected Results:\r\ngenstrings runs without error. A file Localizable.strings is generated with two keys: \"foo\" and \"bar\".\r\n\r\nActual Results:\r\ngenstrings runs, but produces an error for the NSLocalizedString() invocation that provides a value. A file Localizable.strings is generated with only the key \"foo\".\r\n\r\nVersion:\r\nXcode 7.3 (7D141l) / OS X 10.11.3 (15D21)\r\n\r\nNotes:\r\nhttp://www.openradar.me/22133811 seems to indicate this has been a problem since at least Xcode 7.0. I tested with Xcode 7.2 and 7.3b3; both produced the same error.\r\n\r\nConfiguration:\r\nTested on a mid-2015 MacBook Pro with Retina with a standalone Swift file, but I believe this applies on any project with Swift code, regardless of platform or device.\n\n-\nProduct Version: Xcode 7.3 (7D141l) / OS X 10.11.3 (15D21)\nCreated: 2016-02-22T17:30:36.434050\nOriginated: 2016-02-22T09:29:00\nOpen Radar Link: http://www.openradar.me/24770264"}}