From edb286cf6a9dd08ab1a549b2d06fdc845d341838 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Mon, 10 Oct 2022 20:23:53 +0200 Subject: [PATCH] mvc: translate base field error Without gettext() wrapping we never produce a string in the translation for it. It gets passed to gettext() twice then but that is matters not as the target string cannot be translated again when called a second time. --- .../mvc/app/models/OPNsense/Base/FieldTypes/BaseListField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/BaseListField.php b/src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/BaseListField.php index b4a0dbfdf..b0f72a9ff 100644 --- a/src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/BaseListField.php +++ b/src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/BaseListField.php @@ -68,7 +68,7 @@ abstract class BaseListField extends BaseField protected function getValidationMessage() { if ($this->internalValidationMessage == null) { - return "option not in list"; + return gettext('option not in list'); } else { return $this->internalValidationMessage; }