diff --git a/etemplate/inc/class.date_widget.inc.php b/etemplate/inc/class.date_widget.inc.php index 9f6cccbbcc..71a947faf0 100644 --- a/etemplate/inc/class.date_widget.inc.php +++ b/etemplate/inc/class.date_widget.inc.php @@ -181,8 +181,8 @@ static $chars_shortcut; if (is_null($chars_shortcut)) $chars_shortcut = (int)lang('3 number of chars for month-shortcut'); // < 0 to take the chars from the end - $value['M'] = lang(substr($month[$value['m']],0,3)); // check if we have a translation of the short-cut - if ($substr($value['M'],-1) == '*') // if not generate one by truncating the translation of the long name + $value['M'] = lang($m = substr($month[$value['m']],0,3)); // check if we have a translation of the short-cut + if ($value['M'] == $m || $substr($value['M'],-1) == '*') // if not generate one by truncating the translation of the long name { $value['M'] = $chars_shortcut > 0 ? $substr(lang($month[$value['m']]),0,$chars_shortcut) : $substr(lang($month[$value['m']]),$chars_shortcut); diff --git a/phpgwapi/inc/class.jscalendar.inc.php b/phpgwapi/inc/class.jscalendar.inc.php index 1f4ab99a35..0192826f1b 100644 --- a/phpgwapi/inc/class.jscalendar.inc.php +++ b/phpgwapi/inc/class.jscalendar.inc.php @@ -88,8 +88,8 @@ class jscalendar static $chars_shortcut; if (is_null($chars_shortcut)) $chars_shortcut = (int)lang('3 number of chars for month-shortcut'); // < 0 to take the chars from the end - $short = lang(adodb_date('M',$ts)); // check if we have a translation of the short-cut - if ($substr($short,-1) == '*') // if not generate one by truncating the translation of the long name + $short = lang($m = adodb_date('M',$ts)); // check if we have a translation of the short-cut + if ($short == $m || $substr($short,-1) == '*') // if not generate one by truncating the translation of the long name { $short = $chars_shortcut > 0 ? $substr(lang(adodb_date('F',$ts)),0,$chars_shortcut) : $substr(lang(adodb_date('F',$ts)),$chars_shortcut); diff --git a/phpgwapi/inc/jscalendar-setup.php b/phpgwapi/inc/jscalendar-setup.php index e6a71b00c5..2ff2dd484b 100644 --- a/phpgwapi/inc/jscalendar-setup.php +++ b/phpgwapi/inc/jscalendar-setup.php @@ -281,8 +281,8 @@ $monthnames = array('January','February','March','April','May','June','July','Au $chars_shortcut = (int)lang('3 number of chars for month-shortcut'); // < 0 to take the chars from the end foreach($monthnames as $n => $name) { - $short = lang(substr($name,0,3)); // test if our lang-file have a translation for the english short with 3 chars - if ($substr($short,-1) == '*') // else create one by truncating the full translation to x chars + $short = lang($m = substr($name,0,3)); // test if our lang-file have a translation for the english short with 3 chars + if ($short == $m || $substr($short,-1) == '*') // else create one by truncating the full translation to x chars { $short = $chars_shortcut > 0 ? $substr(lang($name),0,$chars_shortcut) : $substr(lang($name),$chars_shortcut); }