• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Predicate syntax and localisation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Predicate syntax and localisation
      • From: Keary Suska <email@hidden>
  • Prev by Date: Re: High-quality offscreen rendering of text?
  • Next by Date: UIActivityViewController not displaying third party apps
  • Previous by thread: Re: High-quality offscreen rendering of text?
  • Next by thread: Re: Predicate syntax and localisation
  • Index(es):
    • Date
    • Thread