From 6da2582c99db63b88be5a85d41a23ccdf0ad7f7e Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 14 Oct 2021 06:51:05 -0500 Subject: [PATCH] Portfolio: Add category title translated when you edit/create a post - refs BT#19052 --- main/inc/lib/PortfolioController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main/inc/lib/PortfolioController.php b/main/inc/lib/PortfolioController.php index 514645255c..48539f7670 100644 --- a/main/inc/lib/PortfolioController.php +++ b/main/inc/lib/PortfolioController.php @@ -482,11 +482,11 @@ class PortfolioController $categoriesSelect->addOption(get_lang('SelectACategory'), 0); $parentCategories = $this->getCategoriesForIndex(null, 0); foreach ($parentCategories as $parentCategory) { - $categoriesSelect->addOption($parentCategory->getTitle(), $parentCategory->getId()); + $categoriesSelect->addOption($this->translateDisplayName($parentCategory->getTitle()), $parentCategory->getId()); $subCategories = $this->getCategoriesForIndex(null, $parentCategory->getId()); if (count($subCategories) > 0) { foreach ($subCategories as $subCategory) { - $categoriesSelect->addOption(' — '.$subCategory->getTitle(), $subCategory->getId()); + $categoriesSelect->addOption(' — '.$this->translateDisplayName($subCategory->getTitle()), $subCategory->getId()); } } } @@ -693,11 +693,11 @@ class PortfolioController $categoriesSelect->addOption(get_lang('SelectACategory'), 0); $parentCategories = $this->getCategoriesForIndex(null, 0); foreach ($parentCategories as $parentCategory) { - $categoriesSelect->addOption($parentCategory->getTitle(), $parentCategory->getId()); + $categoriesSelect->addOption($this->translateDisplayName($parentCategory->getTitle()), $parentCategory->getId()); $subCategories = $this->getCategoriesForIndex(null, $parentCategory->getId()); if (count($subCategories) > 0) { foreach ($subCategories as $subCategory) { - $categoriesSelect->addOption(' — '.$subCategory->getTitle(), $subCategory->getId()); + $categoriesSelect->addOption(' — '.$this->translateDisplayName($subCategory->getTitle()), $subCategory->getId()); } } }