---
 gtk/gtkcalendar.c |   80 ++++++++----------------------------------------------
 1 file changed, 12 insertions(+), 68 deletions(-)

Index: gtk/gtkcalendar.c
===================================================================
--- gtk/gtkcalendar.c.orig
+++ gtk/gtkcalendar.c
@@ -368,8 +368,14 @@ static void calendar_invalidate_arrow   
 
 static void calendar_compute_days      (GtkCalendar *calendar);
      
-static char    *default_abbreviated_dayname[7];
-static char    *default_monthname[12];
+static const char default_abbreviated_dayname[][7] = {
+  N_("Sun"), N_("Mon"), N_("Tue"), N_("Wed"), N_("Thu"), N_("Fri"), N_("Sat")
+};
+static const char default_monthname[][12] = {
+  N_("January"), N_("February"), N_("March"), N_("April"),
+  N_("May"), N_("June"), N_("July"), N_("August"),
+  N_("September"), N_("October"), N_("November"), N_("December")
+};
 
 G_DEFINE_TYPE (GtkCalendar, gtk_calendar, GTK_TYPE_WIDGET)
 
@@ -561,12 +567,6 @@ gtk_calendar_init (GtkCalendar *calendar
   time_t secs;
   struct tm *tm;
   gint i;
-  char buffer[255];
-#ifdef G_OS_WIN32
-  wchar_t wbuffer[100];
-#else
-  time_t tmp_time;
-#endif
   GtkCalendarPrivate *priv;
   gchar *year_before;
 #ifdef HAVE__NL_TIME_FIRST_WEEKDAY
@@ -584,62 +584,6 @@ gtk_calendar_init (GtkCalendar *calendar
 
   GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_FOCUS);
   
-  if (!default_abbreviated_dayname[0])
-    for (i=0; i<7; i++)
-      {
-#ifndef G_OS_WIN32
-	tmp_time= (i+3)*86400;
-	strftime ( buffer, sizeof (buffer), "%a", gmtime (&tmp_time));
-	default_abbreviated_dayname[i] = g_locale_to_utf8 (buffer, -1, NULL, NULL, NULL);
-#else
-	if (G_WIN32_HAVE_WIDECHAR_API ())
-	  {
-	    if (!GetLocaleInfoW (GetThreadLocale (), LOCALE_SABBREVDAYNAME1 + (i+6)%7,
-				 wbuffer, G_N_ELEMENTS (wbuffer)))
-	      default_abbreviated_dayname[i] = g_strdup_printf ("(%d)", i);
-	    else
-	      default_abbreviated_dayname[i] = g_utf16_to_utf8 (wbuffer, -1, NULL, NULL, NULL);
-	  }
-	else
-	  {
-	    if (!GetLocaleInfoA (GetThreadLocale (),
-				 (LOCALE_SABBREVDAYNAME1 + (i+6)%7) | LOCALE_USE_CP_ACP,
-				 buffer, G_N_ELEMENTS (buffer)))
-	      default_abbreviated_dayname[i] = g_strdup_printf ("(%d)", i);
-	    else
-	      default_abbreviated_dayname[i] = g_locale_to_utf8 (buffer, -1, NULL, NULL, NULL);
-	  }
-#endif
-      }
-  
-  if (!default_monthname[0])
-    for (i=0; i<12; i++)
-      {
-#ifndef G_OS_WIN32
-	tmp_time=i*2764800;
-	strftime ( buffer, sizeof (buffer), "%B", gmtime (&tmp_time));
-	default_monthname[i] = g_locale_to_utf8 (buffer, -1, NULL, NULL, NULL);
-#else
-	if (G_WIN32_HAVE_WIDECHAR_API ())
-	  {
-	    if (!GetLocaleInfoW (GetThreadLocale (), LOCALE_SMONTHNAME1 + i,
-				 wbuffer, G_N_ELEMENTS (wbuffer)))
-	      default_monthname[i] = g_strdup_printf ("(%d)", i);
-	    else
-	      default_monthname[i] = g_utf16_to_utf8 (wbuffer, -1, NULL, NULL, NULL);
-	  }
-	else
-	  {
-	    if (!GetLocaleInfoA (GetThreadLocale (),
-				 (LOCALE_SMONTHNAME1 + i) | LOCALE_USE_CP_ACP,
-				 buffer, G_N_ELEMENTS (buffer)))
-	      default_monthname[i] = g_strdup_printf ("(%d)", i);
-	    else
-	      default_monthname[i] = g_locale_to_utf8 (buffer, -1, NULL, NULL, NULL);
-	  }
-#endif
-      }
-  
   /* Set defaults */
   secs = time (NULL);
   tm = localtime (&secs);
@@ -1591,7 +1535,7 @@ gtk_calendar_size_request (GtkWidget	  *
       priv->max_month_width = 0;
       for (i = 0; i < 12; i++)
 	{
-	  pango_layout_set_text (layout, default_monthname[i], -1);
+	  pango_layout_set_text (layout, _(default_monthname[i]), -1);
 	  pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
 	  priv->max_month_width = MAX (priv->max_month_width,
 					       logical_rect.width + 8);
@@ -1654,7 +1598,7 @@ gtk_calendar_size_request (GtkWidget	  *
   if (calendar->display_flags & GTK_CALENDAR_SHOW_DAY_NAMES)
     for (i = 0; i < 7; i++)
       {
-	pango_layout_set_text (layout, default_abbreviated_dayname[i], -1);
+	pango_layout_set_text (layout, _(default_abbreviated_dayname[i]), -1);
 	pango_layout_line_get_pixel_extents (pango_layout_get_lines (layout)->data, NULL, &logical_rect);
 
 	priv->min_day_width = MAX (priv->min_day_width, logical_rect.width);
@@ -1915,7 +1859,7 @@ calendar_paint_header (GtkCalendar *cale
   pango_cairo_show_layout (cr, layout);
   
   /* Draw month */
-  g_snprintf (buffer, sizeof (buffer), "%s", default_monthname[calendar->month]);
+  g_snprintf (buffer, sizeof (buffer), "%s", _(default_monthname[calendar->month]));
   pango_layout_set_text (layout, buffer, -1);
   pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
 
@@ -2002,7 +1946,7 @@ calendar_paint_day_names (GtkCalendar *c
       else
 	day = i;
       day = (day + priv->week_start) % 7;
-      g_snprintf (buffer, sizeof (buffer), "%s", default_abbreviated_dayname[day]);
+      g_snprintf (buffer, sizeof (buffer), "%s", _(default_abbreviated_dayname[day]));
 
       pango_layout_set_text (layout, buffer, -1);
       pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
