Skip to content

Commit

Permalink
Fixed name extraction of the Field Type (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikadamczyk authored Aug 23, 2023
1 parent 475eed7 commit 4317309
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ private function prependJMSTranslationConfig(ContainerBuilder $container): void
],
'output_dir' => __DIR__ . '/../Resources/translations/',
'output_format' => 'xliff',
'extractors' => ['ez_fieldtypes'],
],
],
]);
Expand Down
11 changes: 10 additions & 1 deletion src/lib/FieldType/Query/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
use Ibexa\Core\FieldType\ValidationError;
use Ibexa\Core\FieldType\Value as BaseValue;
use Ibexa\Core\QueryType\QueryTypeRegistry;
use JMS\TranslationBundle\Model\Message;
use JMS\TranslationBundle\Translation\TranslationContainerInterface;

final class Type extends FieldType
final class Type extends FieldType implements TranslationContainerInterface
{
protected $validatorConfigurationSchema = [];

Expand Down Expand Up @@ -237,6 +239,13 @@ public function validateFieldSettings($fieldSettings)

return $errors;
}

public static function getTranslationMessages(): array
{
return [
Message::create('ezcontentquery.name', 'fieldtypes')->setDesc('Content query'),
];
}
}

class_alias(Type::class, 'EzSystems\EzPlatformQueryFieldType\eZ\FieldType\Query\Type');

0 comments on commit 4317309

Please sign in to comment.