diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index e1174df4f2b..501e7d6968e 100755 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -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; diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php index e91c47fbb10..f3af3b8a010 100644 --- a/htdocs/core/class/html.formadmin.class.php +++ b/htdocs/core/class/html.formadmin.class.php @@ -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++; }