mobiata/twine — pull request #3 by kent013 (2012-03-01 13:38:39+00:00)
Title: Bug: evaluation order of StringsRow.matches_tags?

Hi,

I could not parse simple strings.txt like,
```
[[General]]
[yes]
en = Yes
es = Sí
fr = Oui
ja = はい
[no]
en = No
fr = Non
ja = いいえ
```

with command `twine generate-string-file strings.txt Localization.strings --lang en`
This is because `StringsRow.matches_tags?` implementation
```
def matches_tags?(tags)
if @tags == nil || @tags.length == 0
# This row has no tags. Never match
return false
elsif tags == nil || tags.length == 0
# The user did not specify any tags. Everything passes.
return true
else
_snip_
end
```
StringsRow does not contain any tags so `@tags` is always nil, so that this method always return false.
And I swapped order of evaluation.