Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renamed domain names #127

Merged
merged 3 commits into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<body>
<trans-unit id="213da4efa5baa8b47c34dc4b645df7115d07d66e" resname="ezrichtext.name">
<source>Rich text</source>
<target>Rich text</target>
<target state="new">Rich text</target>
<note>key: ezrichtext.name</note>
</trans-unit>
</body>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% trans_default_domain "content_fields" %}
{% trans_default_domain 'ibexa_content_fields' %}

{% extends "@IbexaCore/content_fields.html.twig" %}

Expand Down
11 changes: 10 additions & 1 deletion src/lib/FieldType/RichText/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@
use Ibexa\Core\FieldType\FieldType;
use Ibexa\Core\FieldType\ValidationError;
use Ibexa\Core\FieldType\Value as BaseValue;
use JMS\TranslationBundle\Model\Message;
use JMS\TranslationBundle\Translation\TranslationContainerInterface;
use RuntimeException;

/**
* RichText field type.
*/
class Type extends FieldType
class Type extends FieldType implements TranslationContainerInterface
{
/**
* @var \Ibexa\Contracts\FieldTypeRichText\RichText\InputHandlerInterface
Expand Down Expand Up @@ -287,6 +289,13 @@ public function getRelations(SPIValue $value)

return $relations;
}

public static function getTranslationMessages(): array
{
return [
(new Message('ezrichtext.name', 'ibexa_fieldtypes'))->setDesc('Rich text'),
];
}
}

class_alias(Type::class, 'EzSystems\EzPlatformRichText\eZ\FieldType\RichText\Type');