Revision: 15195
          http://bibdesk.svn.sourceforge.net/bibdesk/?rev=15195&view=rev
Author:   hofman
Date:     2009-04-26 09:46:04 +0000 (Sun, 26 Apr 2009)

Log Message:
-----------
use localized month names for macros again, but get them from NSDateFormatter 
on Leopard

Modified Paths:
--------------
    trunk/bibdesk/BDSKMacroResolver.m

Modified: trunk/bibdesk/BDSKMacroResolver.m
===================================================================
--- trunk/bibdesk/BDSKMacroResolver.m   2009-04-26 09:33:38 UTC (rev 15194)
+++ trunk/bibdesk/BDSKMacroResolver.m   2009-04-26 09:46:04 UTC (rev 15195)
@@ -327,7 +327,12 @@
 - (id)initWithOwner:(id<BDSKOwner>)anOwner{
     if (self = [super initWithOwner:nil]) {
         // store system-defined macros for the months.
-        NSDictionary *standardDefs = [NSDictionary 
dictionaryWithObjects:[NSArray arrayWithObjects:@"January", @"February", 
@"March", @"April", @"May", @"June", @"July", @"August", @"September", 
@"October", @"November", @"December", nil]
+        NSArray *monthNames = nil;
+        if ([NSDateFormatter 
instancesRespondToSelector:@selector(standaloneMonthSymbols)])
+            monthNames = [[[[NSDateFormatter alloc] init] autorelease] 
standaloneMonthSymbols];
+        else
+            monthNames = [[NSUserDefaults standardUserDefaults] 
arrayForKey:NSMonthNameArray];
+        NSDictionary *standardDefs = [NSDictionary 
dictionaryWithObjects:monthNames
                                                                  
forKeys:[NSArray arrayWithObjects:@"jan", @"feb", @"mar", @"apr", @"may", 
@"jun", @"jul", @"aug", @"sep", @"oct", @"nov", @"dec", nil]];
         standardMacroDefinitions = [[NSMutableDictionary alloc] 
initForCaseInsensitiveKeys];
         [standardMacroDefinitions addEntriesFromDictionary:standardDefs];


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Crystal Reports &#45; New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty&#45;free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to