Translated paper formats and size units in PDF admin page
This commit is contained in:
parent
b3235887d3
commit
f2393f08bc
@ -269,7 +269,9 @@ else // Show
|
||||
if ($resql)
|
||||
{
|
||||
$obj=$db->fetch_object($resql);
|
||||
$pdfformatlabel=$obj->label.' - '.round($obj->width).'x'.round($obj->height).' '.$obj->unit;
|
||||
$paperKey = $langs->trans('PaperFormat'.$obj->code);
|
||||
$unitKey = $langs->trans('SizeUnit'.$obj->unit);
|
||||
$pdfformatlabel = ($paperKey == 'PaperFormat'.$obj->code ? $obj->label : $paperKey).' - '.round($obj->width).'x'.round($obj->height).' '.($unitKey == 'SizeUnit'.$obj->unit ? $obj->unit : $unitKey);
|
||||
}
|
||||
}
|
||||
print $pdfformatlabel;
|
||||
|
||||
@ -339,7 +339,9 @@ class FormAdmin
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj=$this->db->fetch_object($resql);
|
||||
$paperformat[$obj->code]= $langs->trans('PaperFormat'.strtoupper($obj->code)).' - '.round($obj->width).'x'.round($obj->height).' '.$obj->unit;
|
||||
$unitKey = $langs->trans('SizeUnit'.$obj->unit);
|
||||
|
||||
$paperformat[$obj->code]= $langs->trans('PaperFormat'.strtoupper($obj->code)).' - '.round($obj->width).'x'.round($obj->height).' '.($unitKey == 'SizeUnit'.$obj->unit ? $obj->unit : $unitKey);
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user