dral3x / StringsLint

📱Ensure your localized strings are complete and never unused 👍
MIT License
68 stars 10 forks source link

False positive - multi line strings #19

Closed jamiehunt closed 10 months ago

jamiehunt commented 3 years ago

Receiving false positive violations: Missing Violation: Localized string "my_string" is missing (missing)

For multi-lined strings, e.g.:

Localizable.strings

"my_string" = "Multi line strings are great...
This text is on line two.";
dral3x commented 3 years ago

Hi again @jamiehunt !

In my personal experience, multi-line localized strings are made as one-line with \n inside. I didn't know you could have them like in your example!

StringsLint parses files line by line, so having a multi-line string will simply break all parsers. Supporting them will require a big refactoring. Feel free to try that yourself and let me know if you need help deep diving into the code!