special care for may (same key for long & short name)
authorClaus Gittinger <cg@exept.de>
Mon, 15 Mar 2004 17:45:03 +0100
changeset 8196 3b3407d69207
parent 8195 8d5251b21ce0
child 8197 4fccb2671b9d
special care for may (same key for long & short name)
Date.st
--- a/Date.st	Mon Mar 15 17:39:09 2004 +0100
+++ b/Date.st	Mon Mar 15 17:45:03 2004 +0100
@@ -95,46 +95,46 @@
     ShortFormats := Dictionary new.
 
     enDayNames := #('monday'
-                  'tuesday'
-                  'wednesday'
-                  'thursday'
-                  'friday'
-                  'saturday'
-                  'sunday').
+                    'tuesday'
+                    'wednesday'
+                    'thursday'
+                    'friday'
+                    'saturday'
+                    'sunday').
 
     enDayAbbrevs := #('mon' 
-                    'tue' 
-                    'wed'
-                    'thu' 
-                    'fri' 
-                    'sat' 
-                    'sun').
+                      'tue' 
+                      'wed'
+                      'thu' 
+                      'fri' 
+                      'sat' 
+                      'sun').
 
     enMonthNames := #('january'
-                    'february'
-                    'march'
-                    'april'
-                    'may'
-                    'june'
-                    'july'
-                    'august'
-                    'september'
-                    'october'
-                    'november'
-                    'december').
+                      'february'
+                      'march'
+                      'april'
+                      'may'
+                      'june'
+                      'july'
+                      'august'
+                      'september'
+                      'october'
+                      'november'
+                      'december').
 
     enMonthAbbrevs := #('jan'
-                      'feb'
-                      'mar'
-                      'apr'
-                      'may'
-                      'jun'
-                      'jul'
-                      'aug'
-                      'sep'
-                      'oct'
-                      'nov'
-                      'dec').
+                        'feb'
+                        'mar'
+                        'apr'
+                        'may'
+                        'jun'
+                        'jul'
+                        'aug'
+                        'sep'
+                        'oct'
+                        'nov'
+                        'dec').
 
     DayNames at:#'en' put:enDayNames.
     DayAbbrevs at:#'en' put:enDayAbbrevs.
@@ -156,21 +156,23 @@
     "read the language specific names."
 
     |resources lang 
-     enDayNames enDayAbbrevs enMonthNames enMonthAbbrevs
-     enDefaultFormat enLongFormat enShortFormat|
-
-    enDayNames := DayNames at:#'en'.
-    enDayAbbrevs := DayAbbrevs at:#'en'.
-    enMonthNames := MonthNames at:#'en'.
-    enMonthAbbrevs := MonthAbbrevs at:#'en'.
-
-    enDefaultFormat := DefaultFormats at:#'en'.
-    enShortFormat := ShortFormats at:#'en'.
-    enLongFormat := LongFormats at:#'en'.
+     enDayNames enDayAbbrevs enMonthNames enMonthAbbrevs monthAbbrevKeys
+     enDefaultFormat enLongFormat enShortFormat may|
 
     lang := Smalltalk language asSymbol.
     lang ~~ #'en' ifTrue:[
         ResourcePack notNil ifTrue:[
+            enDayNames := DayNames at:#'en'.
+            enDayAbbrevs := DayAbbrevs at:#'en'.
+            enMonthNames := MonthNames at:#'en'.
+            enMonthAbbrevs := MonthAbbrevs at:#'en'.
+            monthAbbrevKeys := enMonthAbbrevs copy.
+            monthAbbrevKeys at:5 put:'MAY_ABBREV'.
+
+            enDefaultFormat := DefaultFormats at:#'en'.
+            enShortFormat := ShortFormats at:#'en'.
+            enLongFormat := LongFormats at:#'en'.
+
             resources := ResourcePack forPackage:(self package).
 
             DefaultFormats at:lang put:(resources at:'DATEFORMAT' default:enDefaultFormat).
@@ -180,7 +182,13 @@
             DayNames at:lang put:(resources array:enDayNames).
             DayAbbrevs at:lang put:(resources array:enDayAbbrevs).
             MonthNames at:lang put:(resources array:enMonthNames).
-            MonthAbbrevs at:lang put:(resources array:enMonthAbbrevs).
+            MonthAbbrevs at:lang put:(resources array:monthAbbrevKeys).
+            "/ may needs special care (same key for long and short name)
+            may := resources at:'MAY_ABBREV' ifAbsent:nil.
+            may isNil ifTrue:[
+                may := resources at:'may'.
+            ].
+            (MonthAbbrevs at:lang) at:5 put:may.
         ].
     ].
 
@@ -2430,7 +2438,7 @@
 !Date class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Date.st,v 1.88 2004-03-12 18:01:59 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Date.st,v 1.89 2004-03-15 16:45:03 cg Exp $'
 ! !
 
 Date initialize!