Re: Core Data and Undo action names
Re: Core Data and Undo action names
- Subject: Re: Core Data and Undo action names
- From: mmalc crawford <email@hidden>
- Date: Sat, 10 Mar 2007 09:19:15 -0800
On Mar 10, 2007, at 7:57 AM, Kevin wrote:
- (void)setTitle:(NSString *)value
{
[self willChangeValueForKey: @"title"];
[self setPrimitiveValue:value forKey:@"title"];
[self didChangeValueForKey: @"title"];
[[[self managedObjectContext] undoManager] setActionName:@"Edit
Folder Title"];
}
After reading the documentation on Core Data and Localization, I
created a MyModel.strings file but it only appears to use the
localized names for error messages related to model validation.
MyModel.strings is not consulted for action Undo/Redo names. Is this
the expected behavior or am I missing something?
"You can localize most aspects of a managed object model, including
entity and property names and error messages" (<http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdUsingMOM.html#//apple_ref/doc/uid/TP40005190-DontLinkElementID_107
>). The undo action name is none of these -- in the above you're
just setting a string constant. You should use NSLocalizedString (or
one of its variants) just as you would any other string that needs to
be localized.
mmalc
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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