{"action":"created","issue":{"url":"https://api.github.com/repos/mobiata/twine/issues/102","labels_url":"https://api.github.com/repos/mobiata/twine/issues/102/labels{/name}","comments_url":"https://api.github.com/repos/mobiata/twine/issues/102/comments","events_url":"https://api.github.com/repos/mobiata/twine/issues/102/events","html_url":"https://github.com/mobiata/twine/issues/102","id":116027282,"number":102,"title":"References do not work when generating an iOS strings file","user":{"login":"abbottmg","id":7342467,"avatar_url":"https://avatars.githubusercontent.com/u/7342467?v=3","gravatar_id":"","url":"https://api.github.com/users/abbottmg","html_url":"https://github.com/abbottmg","followers_url":"https://api.github.com/users/abbottmg/followers","following_url":"https://api.github.com/users/abbottmg/following{/other_user}","gists_url":"https://api.github.com/users/abbottmg/gists{/gist_id}","starred_url":"https://api.github.com/users/abbottmg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abbottmg/subscriptions","organizations_url":"https://api.github.com/users/abbottmg/orgs","repos_url":"https://api.github.com/users/abbottmg/repos","events_url":"https://api.github.com/users/abbottmg/events{/privacy}","received_events_url":"https://api.github.com/users/abbottmg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-10T05:00:40Z","updated_at":"2015-11-10T09:24:01Z","closed_at":null,"body":"I have the following localizationStrings.txt:\r\n````\r\n[[General]]\r\n\t[password]\r\n\t\ten = Password\r\n\t\tes = Contraseña\r\n\t\ttags = ios\r\n\r\n[[TWSLoginViewController]]\r\n\t[LoginVC.password]\r\n\t\tref = password\r\n\t\tcomment = Password\r\n\t\ttags = ios\r\n\t[LoginVC.newToApp]\r\n\t\ten = I'm new to App\r\n\t\tes = Soy nuevo en App\r\n\t\tcomment = I'm new to App\r\n\t\ttags = ios\r\n````\r\n\r\nWhen I call `twine generate-all-string-files Resources/localizationStrings.txt Resources/Locales --lang en,es` I get the following Localizable.strings in each of my locales, with the language specific tweaks:\r\n\r\n````\r\n/**\r\n * Apple Strings File\r\n * Generated by Twine 0.7.0\r\n * Language: en\r\n */\r\n\r\n/********** General **********/\r\n\r\n\"password\" = \"Password\";\r\n\r\n/********** TWSLoginViewController **********/\r\n\r\n\r\n/* I'm new to App */\r\n\"LoginVC.newToApp\" = \"I'm new toApp\";\r\n\r\n````\r\nNote that there are two empty lines before the lines for `newToApp`.\r\n\r\nI've tried running this with no lines having tags; I've invoked generate-all-string-files with the -u option (both with and without a tags line in the affected fields). If I add an `en = Password` line to `loginVC.password`, it correctly uses that string with the default_lang functionality. I've validated the .txt file with the provided command. I'm not really sure why the original password row would successfully print but the row referencing it wouldn't.\r\n\r\nI've given the relevant files a once-over, but my ruby is a bit rusty. My best guesses are that there's something weird with the format_row (or format_key, format_value) entries for the apple formatter OR `translated_string_for_lang` is returning non-nil empty strings of some kind in its first line, so the reference is never looked up. That seems implausible though, as you'd think `key_value_pattern` would print \"\" = \"\"; instead of an empty line.\r\n\r\nI installed twine from gem tonight. `ruby -v` returns `ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin15]`.\r\n"},"comment":{"url":"https://api.github.com/repos/mobiata/twine/issues/comments/155366739","html_url":"https://github.com/mobiata/twine/issues/102#issuecomment-155366739","issue_url":"https://api.github.com/repos/mobiata/twine/issues/102","id":155366739,"user":{"login":"abbottmg","id":7342467,"avatar_url":"https://avatars.githubusercontent.com/u/7342467?v=3","gravatar_id":"","url":"https://api.github.com/users/abbottmg","html_url":"https://github.com/abbottmg","followers_url":"https://api.github.com/users/abbottmg/followers","following_url":"https://api.github.com/users/abbottmg/following{/other_user}","gists_url":"https://api.github.com/users/abbottmg/gists{/gist_id}","starred_url":"https://api.github.com/users/abbottmg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abbottmg/subscriptions","organizations_url":"https://api.github.com/users/abbottmg/orgs","repos_url":"https://api.github.com/users/abbottmg/repos","events_url":"https://api.github.com/users/abbottmg/events{/privacy}","received_events_url":"https://api.github.com/users/abbottmg/received_events","type":"User","site_admin":false},"created_at":"2015-11-10T09:24:01Z","updated_at":"2015-11-10T09:24:01Z","body":"Thank you for looking into this! I'll send the actual text file along tomorrow morning, but the text in that block is a full reproducing example on my machine. I just ran `pbcopy < localizedStrings.txt`. I am running the released gem. Trying the source version is on my to-do list for tomorrow, but I wasn't sure if there were any differences, or if gem stayed up to date with the master of this repo."}}