From 62f59d4c5a05ce122dbc9437b7a3c1f8814bea0a Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sat, 19 Aug 2023 13:08:10 +0200 Subject: [PATCH] DirectorDatafieldForm: fix typo, translate --- application/forms/DirectorDatafieldForm.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/forms/DirectorDatafieldForm.php b/application/forms/DirectorDatafieldForm.php index 2561d778..ab0dcd8a 100644 --- a/application/forms/DirectorDatafieldForm.php +++ b/application/forms/DirectorDatafieldForm.php @@ -165,7 +165,7 @@ class DirectorDatafieldForm extends DirectorObjectForm $this->addElement('select', 'category_id', [ 'label' => $this->translate('Data Field Category'), - 'multiOptions' => $this->optionalEnum($this->enumCategpories()), + 'multiOptions' => $this->optionalEnum($this->enumCategories()), ]); $error = false; @@ -281,7 +281,7 @@ class DirectorDatafieldForm extends DirectorObjectForm protected function enumDataTypes() { $hooks = Hook::all('Director\\DataType'); - $enum = array(null => '- please choose -'); + $enum = [null => $this->translate('- please choose -')]; /** @var DataTypeHook $hook */ foreach ($hooks as $hook) { $enum[get_class($hook)] = $hook->getName(); @@ -290,7 +290,7 @@ class DirectorDatafieldForm extends DirectorObjectForm return $enum; } - protected function enumCategpories() + protected function enumCategories() { $db = $this->getDb()->getDbAdapter(); return $db->fetchPairs(