Predicate syntax and localisation
Predicate syntax and localisation
- Subject: Predicate syntax and localisation
- From: Laurent Cerveau <email@hidden>
- Date: Sun, 06 Oct 2013 23:45:33 +0200
Hi
I am using NSPredicateEditor to display some predicates and after a few fights all is now fine. A feature I find particularly convenient is the use of a formatting dictionary to display user friendly sentences to a user.
In another part of my application, I show some data computed based on the edited predicate and I would like to show the predicate that originates this result but in a "human friendly way". So I thought I would reuse this dictionary/strings file.
So basically I would like to have code like
NSLocalizedString(predicate.predicateFormat, nil);
However predicateFormat does not seem to return "proper localizable predicate". That is for example
loc name BEGINSWITH "MM"
and not
loc name begins with "MM"
Or
volumeType == 27
while I have
volumeType is 27
in the strings file.
Is there a way to convert between the 2 (or do I miss a point?)
thanks
laurent
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden