From b3235887d3efc77bf41aac684bef873fff12f797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Mon, 10 Sep 2012 23:50:46 +0200 Subject: [PATCH 1/2] Improved translations of menu edit --- htdocs/admin/menus/edit.php | 12 +++++++----- htdocs/langs/es_ES/admin.lang | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/htdocs/admin/menus/edit.php b/htdocs/admin/menus/edit.php index d0619ec80de..b94a6014068 100644 --- a/htdocs/admin/menus/edit.php +++ b/htdocs/admin/menus/edit.php @@ -377,17 +377,19 @@ elseif ($action == 'edit') print ''.$langs->trans('MenuModule').''.$menu->module.''.$langs->trans('DetailMenuModule').''; // Handler - print ''.$langs->trans('MenuHandler').''.$menu->menu_handler.''.$langs->trans('DetailMenuHandler').''; + if ($menu->menu_handler == 'all') $handler = $langs->trans('AllMenus'); + else $handler = $menu->menu_handler; + print ''.$langs->trans('MenuHandler').''.$handler.''.$langs->trans('DetailMenuHandler').''; // User print ''.$langs->trans('MenuForUsers').''.$langs->trans('DetailUser').''; // Type - print ''.$langs->trans('Type').''.$menu->type.''.$langs->trans('DetailType').''; + print ''.$langs->trans('Type').''.$langs->trans(ucfirst($menu->type)).''.$langs->trans('DetailType').''; // MenuId Parent print ''.$langs->trans('MenuIdParent').''; diff --git a/htdocs/langs/es_ES/admin.lang b/htdocs/langs/es_ES/admin.lang index 330efc3f346..0e15d03b8d8 100644 --- a/htdocs/langs/es_ES/admin.lang +++ b/htdocs/langs/es_ES/admin.lang @@ -1259,7 +1259,7 @@ DetailMainmenu=Grupo al cual pertenece (obsoleto) DetailUrl=URL de la página hacia la cual el menú apunta DetailLeftmenu=Condición de visualización o no (obsoleto) DetailEnabled=Condición de mostrar o no -DetailRight=Condición de visualización completa o cristálida +DetailRight=Condición de visualización completa o restringida DetailLangs=Archivo .lang para la traducción del título DetailUser=Interno / Externo / Todos Target=Objetivo From f2393f08bc5ad242ea7329742333b7eefbdcb2f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Tue, 11 Sep 2012 00:36:49 +0200 Subject: [PATCH 2/2] Translated paper formats and size units in PDF admin page --- htdocs/admin/pdf.php | 4 +++- htdocs/core/class/html.formadmin.class.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) 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++; }