From 64c2ed31a7f91aaa4dc49f51dd8139676d986776 Mon Sep 17 00:00:00 2001 From: Bartek Wajda Date: Tue, 24 Jun 2025 23:27:05 +0200 Subject: [PATCH] IBX-10167: Fixed translations export in abstract field type classes --- .../translations/ibexa_fieldtypes.en.xlf | 50 +++++++++---------- src/lib/FieldType/BaseNumericType.php | 3 +- src/lib/FieldType/BaseTextType.php | 3 +- src/lib/FieldType/Float/Type.php | 3 +- src/lib/FieldType/Integer/Type.php | 3 +- src/lib/FieldType/TextBlock/Type.php | 3 +- src/lib/FieldType/TextLine/Type.php | 3 +- 7 files changed, 35 insertions(+), 33 deletions(-) diff --git a/src/bundle/Core/Resources/translations/ibexa_fieldtypes.en.xlf b/src/bundle/Core/Resources/translations/ibexa_fieldtypes.en.xlf index 9f24a3826f..79d1abfafc 100644 --- a/src/bundle/Core/Resources/translations/ibexa_fieldtypes.en.xlf +++ b/src/bundle/Core/Resources/translations/ibexa_fieldtypes.en.xlf @@ -6,117 +6,117 @@ The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. - + Authors Authors key: ibexa_author.name - + File File key: ibexa_binaryfile.name - + Checkbox Checkbox key: ibexa_boolean.name - + Country Country key: ibexa_country.name - + Date Date key: ibexa_date.name - + Date and time Date and time key: ibexa_datetime.name - + Email address Email address key: ibexa_email.name - + Float Float key: ibexa_float.name - + Map location Map location key: ibexa_gmap_location.name - + Image Image key: ibexa_image.name - + Image Asset - Image Asset - key: ibexa_imageasset.name + Image Asset + key: ibexa_image_asset.name - + Integer Integer key: ibexa_integer.name - + ISBN ISBN key: ibexa_isbn.name - + Keywords Keywords key: ibexa_keyword.name - + Media Media key: ibexa_media.name - + Content relation (single) Content relation (single) key: ibexa_object_relation.name - + Content relations (multiple) Content relations (multiple) key: ibexa_object_relation_list.name - + Selection Selection key: ibexa_selection.name - + Text line Text line key: ibexa_string.name - + Text block Text block key: ibexa_text.name - + Time Time key: ibexa_time.name - + URL URL key: ibexa_url.name - + User account User account key: ibexa_user.name diff --git a/src/lib/FieldType/BaseNumericType.php b/src/lib/FieldType/BaseNumericType.php index 18f997eed2..aae72e23ea 100644 --- a/src/lib/FieldType/BaseNumericType.php +++ b/src/lib/FieldType/BaseNumericType.php @@ -10,9 +10,8 @@ use Ibexa\Contracts\Core\FieldType\Value as SPIValue; use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition; -use JMS\TranslationBundle\Translation\TranslationContainerInterface; -abstract class BaseNumericType extends FieldType implements TranslationContainerInterface +abstract class BaseNumericType extends FieldType { /** * @return array diff --git a/src/lib/FieldType/BaseTextType.php b/src/lib/FieldType/BaseTextType.php index aee2a53c80..3e28d47f99 100644 --- a/src/lib/FieldType/BaseTextType.php +++ b/src/lib/FieldType/BaseTextType.php @@ -12,14 +12,13 @@ use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition; use Ibexa\Core\Base\Exceptions\InvalidArgumentType; use Ibexa\Core\FieldType\Value as BaseValue; -use JMS\TranslationBundle\Translation\TranslationContainerInterface; /** * @internal * * Base implementation for TextLine\Type and TextBlock\Type which extends TextLine\Type. */ -abstract class BaseTextType extends FieldType implements TranslationContainerInterface +abstract class BaseTextType extends FieldType { public function isSearchable(): bool { diff --git a/src/lib/FieldType/Float/Type.php b/src/lib/FieldType/Float/Type.php index 519cae18c3..71bb1c1d01 100644 --- a/src/lib/FieldType/Float/Type.php +++ b/src/lib/FieldType/Float/Type.php @@ -14,13 +14,14 @@ use Ibexa\Core\FieldType\Validator; use Ibexa\Core\FieldType\Value as BaseValue; use JMS\TranslationBundle\Model\Message; +use JMS\TranslationBundle\Translation\TranslationContainerInterface; /** * Float field types. * * Represents floats. */ -class Type extends BaseNumericType +class Type extends BaseNumericType implements TranslationContainerInterface { protected $validatorConfigurationSchema = [ 'FloatValueValidator' => [ diff --git a/src/lib/FieldType/Integer/Type.php b/src/lib/FieldType/Integer/Type.php index 0630707f1d..a72e4e8067 100644 --- a/src/lib/FieldType/Integer/Type.php +++ b/src/lib/FieldType/Integer/Type.php @@ -14,13 +14,14 @@ use Ibexa\Core\FieldType\Validator; use Ibexa\Core\FieldType\Value as BaseValue; use JMS\TranslationBundle\Model\Message; +use JMS\TranslationBundle\Translation\TranslationContainerInterface; /** * Integer field types. * * Represents integers. */ -class Type extends BaseNumericType +class Type extends BaseNumericType implements TranslationContainerInterface { protected $validatorConfigurationSchema = [ 'IntegerValueValidator' => [ diff --git a/src/lib/FieldType/TextBlock/Type.php b/src/lib/FieldType/TextBlock/Type.php index 6ab259d466..245decbc26 100644 --- a/src/lib/FieldType/TextBlock/Type.php +++ b/src/lib/FieldType/TextBlock/Type.php @@ -12,13 +12,14 @@ use Ibexa\Core\FieldType\ValidationError; use Ibexa\Core\FieldType\Value as BaseValue; use JMS\TranslationBundle\Model\Message; +use JMS\TranslationBundle\Translation\TranslationContainerInterface; /** * The TextBlock field type. * * Represents a larger body of text, such as text areas. */ -class Type extends BaseTextType +class Type extends BaseTextType implements TranslationContainerInterface { protected $settingsSchema = [ 'textRows' => [ diff --git a/src/lib/FieldType/TextLine/Type.php b/src/lib/FieldType/TextLine/Type.php index c3812e43c3..eb502ee0d4 100644 --- a/src/lib/FieldType/TextLine/Type.php +++ b/src/lib/FieldType/TextLine/Type.php @@ -14,13 +14,14 @@ use Ibexa\Core\FieldType\Validator\StringLengthValidator; use Ibexa\Core\FieldType\Value as BaseValue; use JMS\TranslationBundle\Model\Message; +use JMS\TranslationBundle\Translation\TranslationContainerInterface; /** * The TextLine field type. * * This field type represents a simple string. */ -class Type extends BaseTextType +class Type extends BaseTextType implements TranslationContainerInterface { protected $validatorConfigurationSchema = [ 'StringLengthValidator' => [