From ca31f654e7cbfdb6b1d01a7e1ff821b7a276fec2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 Mar 2019 23:42:22 +0100 Subject: [PATCH] Reduce text for graph title --- htdocs/core/boxes/box_graph_product_distribution.php | 10 +++------- htdocs/langs/en_US/boxes.lang | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/htdocs/core/boxes/box_graph_product_distribution.php b/htdocs/core/boxes/box_graph_product_distribution.php index d1c85cb2044..0fe5c66d532 100644 --- a/htdocs/core/boxes/box_graph_product_distribution.php +++ b/htdocs/core/boxes/box_graph_product_distribution.php @@ -128,10 +128,6 @@ class box_graph_product_distribution extends ModeleBoxes ); - $paramtitle=$langs->transnoentitiesnoconv("Products").'/'.$langs->transnoentitiesnoconv("Services"); - if (empty($conf->produit->enabled)) $paramtitle=$langs->transnoentitiesnoconv("Services"); - if (empty($conf->service->enabled)) $paramtitle=$langs->transnoentitiesnoconv("Products"); - $socid=empty($user->societe_id)?0:$user->societe_id; $userid=0; // No filter on user creation @@ -190,7 +186,7 @@ class box_graph_product_distribution extends ModeleBoxes $px1->SetCssPrefix("cssboxes"); //$px1->mode='depth'; $px1->SetType(array('pie')); - $px1->SetTitle($langs->trans("BoxProductDistributionFor", $paramtitle, $langs->transnoentitiesnoconv("Invoices"))); + $px1->SetTitle($langs->trans("ForObject", $langs->transnoentitiesnoconv("Invoices"))); $px1->combine = 0.05; $px1->draw($filenamenb, $fileurlnb); @@ -250,7 +246,7 @@ class box_graph_product_distribution extends ModeleBoxes $px2->SetCssPrefix("cssboxes"); //$px2->mode='depth'; $px2->SetType(array('pie')); - $px2->SetTitle($langs->trans("BoxProductDistributionFor", $paramtitle, $langs->transnoentitiesnoconv("Proposals"))); + $px2->SetTitle($langs->trans("ForObject", $langs->transnoentitiesnoconv("Proposals"))); $px2->combine = 0.05; $px2->draw($filenamenb, $fileurlnb); @@ -311,7 +307,7 @@ class box_graph_product_distribution extends ModeleBoxes $px3->SetCssPrefix("cssboxes"); //$px3->mode='depth'; $px3->SetType(array('pie')); - $px3->SetTitle($langs->trans("BoxProductDistributionFor", $paramtitle, $langs->transnoentitiesnoconv("Orders"))); + $px3->SetTitle($langs->trans("ForObject", $langs->transnoentitiesnoconv("Orders"))); $px3->combine = 0.05; $px3->draw($filenamenb, $fileurlnb); diff --git a/htdocs/langs/en_US/boxes.lang b/htdocs/langs/en_US/boxes.lang index 78b03ea8caf..2af485dac7f 100644 --- a/htdocs/langs/en_US/boxes.lang +++ b/htdocs/langs/en_US/boxes.lang @@ -72,7 +72,7 @@ BoxSuppliersOrdersPerMonth=Vendor Orders per month BoxProposalsPerMonth=Proposals per month NoTooLowStockProducts=No products are under the low stock limit BoxProductDistribution=Products/Services Distribution -BoxProductDistributionFor=%s by %s +ForObject=On %s BoxTitleLastModifiedSupplierBills=Vendor Invoices: last %s modified BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified