fixed missing translation of monthnames after removing the asterisk prefix for untranslated phrases

This commit is contained in:
Ralf Becker 2007-05-22 18:02:41 +00:00
parent 1830f0fb1f
commit c2bb34cd4e
3 changed files with 6 additions and 6 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);
}