Open TimAEllis opened 3 years ago
Hi @TimAEllis ! Sorry for taking so long to respond, I missed Github's notification 😢
I have the feeling the tool is missing some customization to allow the detection of custom swift code like your function localeString(_:)
.
You can give it a try, working on SwiftParserConfiguration
and SwiftParser
classes.
Tests will help you along the way 🙂
@TimAEllis what about something like this https://github.com/dral3x/StringsLint/compare/custom-swift-localize-function#diff-41a7cd1296e1aee684346e698c787b394a9b7374c6a31e6225c46ad32e7dff95R186
NSLocalizedString
seems a little cumbersome for me to use since I don't include a comment with my strings. So I have a wrapper function, like so:However, this script then claims that all my localized strings are unused when clearer they are. Is there any way we can provide it with a string to look for, in addition to the pre-existing
NSLocalizedString
?