localizedDescription not localized #61

caramdache opened this Issue Feb 13, 2014 · 2 comments


None yet

3 participants


Another localization issue... localizedDescription is not localized currently.

An easy solution is to define the ERR macro as follows, but this generate compiler warnings [-Wformat-security] as the compiler can no longer check whether all arguments have really been filed in:

#define ERR(_c,_f,...) [NSError errorWithDomain:DDMathParserErrorDomain code:(_c) userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:(NSLocalizedString(_f, nil)), ##__VA_ARGS__]}]

A better solution seems to be to create a function using NS_FORMAT_FUNCTION(f,a), as described in:


BTW let me know if you wish the French localization.


If you do the French localization I will do German. :)


Duplicate of #59. Thanks!

@davedelong davedelong closed this Feb 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment