Make user-visible strings localizable #59

Closed
JanX2 opened this Issue Feb 12, 2014 · 3 comments

2 participants

@JanX2

I can work on this, but I would like to establish the best way to do this first.

AFAIK, this would mostly be limited to patching the ERR() macro so that the NSLocalizedDescriptionKey of the error actually contains a localized string (via NSLocalizedString()). Additionally, the non-ERR() uses of [NSError errorWithDomain:…] would need to be similarly augmented.

We would also have to expose the strings to enable genstrings to find them. So an alternative to the above would be to wrap all naked string literals in uses of ERR() with NSLocalizedString().

Anything I have overlooked?

@davedelong
Owner

I'm not sure I want to do this. Ideally adopters of DDMathParser would provide their own context-relevant strings based on the code of the error.

Perhaps the real issue here is that the ERR macro shouldn't be putting the string in as the localizedDescription.

@davedelong davedelong added the Low label Jul 12, 2014
@JanX2

That’s a good idea. Thanks Dave!

@davedelong davedelong closed this Sep 6, 2014
@davedelong
Owner

Fixed on the 1.1 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment