From 51fc2a0369314405c278cff445450fc3e6a67b57 Mon Sep 17 00:00:00 2001 From: Pablo Cerda Date: Sat, 19 Jan 2013 01:32:59 +0100 Subject: resolve a problem processing abbreviated month formats translation in date_api module. Signed-off-by: Pablo Cerda --- www/sites/all/modules/contrib/date/date_api/date_api.module | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/www/sites/all/modules/contrib/date/date_api/date_api.module b/www/sites/all/modules/contrib/date/date_api/date_api.module index d85a8a5..c22fcde 100644 --- a/www/sites/all/modules/contrib/date/date_api/date_api.module +++ b/www/sites/all/modules/contrib/date/date_api/date_api.module @@ -1099,12 +1099,7 @@ function date_month_names($required = FALSE) { function date_month_names_abbr($required = FALSE, $length = 3) { $month_names = array(); foreach (date_month_names_untranslated() as $key => $month) { - if ($length == 3) { - $month_names[$key] = t(substr($month, 0, $length), array()); - } - else { - $month_names[$key] = t(substr($month, 0, $length), array(), array('context' => 'month_abbr')); - } + $month_names[$key] = t(substr($month, 0, $length), array(), array('context' => 'Abbreviation month name')); } $none = array('' => ''); return !$required ? $none + $month_names : $month_names; @@ -1630,7 +1625,7 @@ function date_format_date($date, $type = 'medium', $format = '', $langcode = NUL $datestring .= t($date->format('F'), array(), array('context' => 'Long month name', 'langcode' => $langcode)); break; case 'M': - $datestring .= t($date->format('M'), array(), array('langcode' => $langcode)); + $datestring .= t($date->format('M'), array(), array('context' => 'Abbreviation month name', 'langcode' => $langcode)); break; case 'A': case 'a': -- 1.7.10.4