Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrapper around NSLocalizedString causes script to say no strings are used #14

Open
TimAEllis opened this issue Nov 2, 2020 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@TimAEllis
Copy link

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:

public func localeString(_ string: String) -> String {
	return NSLocalizedString(string, comment: "")
}

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?

@dral3x
Copy link
Owner

dral3x commented May 10, 2021

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 🙂

@dral3x dral3x added the help wanted Extra attention is needed label May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants