@@ -143,9 +143,9 @@ class="hidden shrink-0 space-y-2 max-w-sm md:flex flex-col h-full"
@if ($shouldSupportBlocks)
- {{ __('filament-tiptap-editor::editor.blocks.panel') }}
+ {{ trans('filament-tiptap-editor::editor.blocks.panel') }}
@else
- {{ __('filament-tiptap-editor::editor.merge_tags.panel') }}
+ {{ trans('filament-tiptap-editor::editor.merge_tags.panel') }}
@endif
diff --git a/src/Actions/GridBuilderAction.php b/src/Actions/GridBuilderAction.php
index 64712bec..4757ba11 100644
--- a/src/Actions/GridBuilderAction.php
+++ b/src/Actions/GridBuilderAction.php
@@ -21,7 +21,7 @@ protected function setUp(): void
{
parent::setUp();
- $this->modalHeading(__('filament-tiptap-editor::grid-modal.heading'));
+ $this->modalHeading(trans('filament-tiptap-editor::grid-modal.heading'));
$this->modalWidth('md');
@@ -32,7 +32,7 @@ protected function setUp(): void
->view('filament-tiptap-editor::components.grid-modal-preview')
->columnSpanFull(),
TextInput::make('columns')
- ->label(__('filament-tiptap-editor::grid-modal.labels.columns'))
+ ->label(trans('filament-tiptap-editor::grid-modal.labels.columns'))
->required()
->default(2)
->reactive()
@@ -41,23 +41,23 @@ protected function setUp(): void
->numeric()
->step(1),
Select::make('stack_at')
- ->label(__('filament-tiptap-editor::grid-modal.labels.stack_at'))
+ ->label(trans('filament-tiptap-editor::grid-modal.labels.stack_at'))
->reactive()
->selectablePlaceholder(false)
->options([
- 'none' => __('filament-tiptap-editor::grid-modal.labels.dont_stack'),
+ 'none' => trans('filament-tiptap-editor::grid-modal.labels.dont_stack'),
'sm' => 'sm',
'md' => 'md',
'lg' => 'lg',
])
->default('md'),
Toggle::make('asymmetric')
- ->label(__('filament-tiptap-editor::grid-modal.labels.asymmetric'))
+ ->label(trans('filament-tiptap-editor::grid-modal.labels.asymmetric'))
->default(false)
->reactive()
->columnSpanFull(),
TextInput::make('asymmetric_left')
- ->label(__('filament-tiptap-editor::grid-modal.labels.asymmetric_left'))
+ ->label(trans('filament-tiptap-editor::grid-modal.labels.asymmetric_left'))
->required()
->reactive()
->minValue(1)
@@ -65,7 +65,7 @@ protected function setUp(): void
->numeric()
->visible(fn (callable $get) => $get('asymmetric')),
TextInput::make('asymmetric_right')
- ->label(__('filament-tiptap-editor::grid-modal.labels.asymmetric_right'))
+ ->label(trans('filament-tiptap-editor::grid-modal.labels.asymmetric_right'))
->required()
->reactive()
->minValue(1)
@@ -78,7 +78,7 @@ protected function setUp(): void
$this->modalFooterActions(function ($action) {
return [
$action->getModalSubmitAction()
- ->label(__('filament-tiptap-editor::grid-modal.labels.submit')),
+ ->label(trans('filament-tiptap-editor::grid-modal.labels.submit')),
$action->getModalCancelAction(),
];
});
diff --git a/src/Actions/LinkAction.php b/src/Actions/LinkAction.php
index 250e4279..418b80dd 100644
--- a/src/Actions/LinkAction.php
+++ b/src/Actions/LinkAction.php
@@ -39,12 +39,12 @@ protected function setUp(): void
})->modalHeading(function (array $arguments) {
$context = blank($arguments['href']) ? 'insert' : 'update';
- return __('filament-tiptap-editor::link-modal.heading.' . $context);
+ return trans('filament-tiptap-editor::link-modal.heading.' . $context);
})->form([
Grid::make(['md' => 3])
->schema([
TextInput::make('href')
- ->label(__('filament-tiptap-editor::link-modal.labels.url'))
+ ->label(trans('filament-tiptap-editor::link-modal.labels.url'))
->columnSpan('full')
->requiredWithout('id')
->validationAttribute('URL'),
@@ -52,30 +52,30 @@ protected function setUp(): void
Select::make('target')
->selectablePlaceholder(false)
->options([
- '' => __('filament-tiptap-editor::link-modal.labels.target.default'),
- '_blank' => __('filament-tiptap-editor::link-modal.labels.target.new_window'),
- '_parent' => __('filament-tiptap-editor::link-modal.labels.target.parent'),
- '_top' => __('filament-tiptap-editor::link-modal.labels.target.top'),
+ '' => trans('filament-tiptap-editor::link-modal.labels.target.default'),
+ '_blank' => trans('filament-tiptap-editor::link-modal.labels.target.new_window'),
+ '_parent' => trans('filament-tiptap-editor::link-modal.labels.target.parent'),
+ '_top' => trans('filament-tiptap-editor::link-modal.labels.target.top'),
]),
TextInput::make('hreflang')
- ->label(__('filament-tiptap-editor::link-modal.labels.language')),
+ ->label(trans('filament-tiptap-editor::link-modal.labels.language')),
TextInput::make('rel')
->columnSpan('full'),
TextInput::make('referrerpolicy')
- ->label(__('filament-tiptap-editor::link-modal.labels.referrer_policy'))
+ ->label(trans('filament-tiptap-editor::link-modal.labels.referrer_policy'))
->columnSpan('full'),
Toggle::make('as_button')
- ->label(__('filament-tiptap-editor::link-modal.labels.as_button'))
+ ->label(trans('filament-tiptap-editor::link-modal.labels.as_button'))
->reactive(),
Radio::make('button_theme')
->columnSpan('full')
->columns(2)
->visible(fn ($get) => $get('as_button'))
->options([
- 'primary' => __('filament-tiptap-editor::link-modal.labels.button_theme.primary'),
- 'secondary' => __('filament-tiptap-editor::link-modal.labels.button_theme.secondary'),
- 'tertiary' => __('filament-tiptap-editor::link-modal.labels.button_theme.tertiary'),
- 'accent' => __('filament-tiptap-editor::link-modal.labels.button_theme.accent'),
+ 'primary' => trans('filament-tiptap-editor::link-modal.labels.button_theme.primary'),
+ 'secondary' => trans('filament-tiptap-editor::link-modal.labels.button_theme.secondary'),
+ 'tertiary' => trans('filament-tiptap-editor::link-modal.labels.button_theme.tertiary'),
+ 'accent' => trans('filament-tiptap-editor::link-modal.labels.button_theme.accent'),
]),
]),
])->action(function (TiptapEditor $component, $data) {
diff --git a/src/Actions/MediaAction.php b/src/Actions/MediaAction.php
index c8cd8d7f..dbe58923 100644
--- a/src/Actions/MediaAction.php
+++ b/src/Actions/MediaAction.php
@@ -52,11 +52,11 @@ protected function setUp(): void
})->modalHeading(function (TiptapEditor $component, array $arguments) {
$context = blank($arguments['src'] ?? null) ? 'insert' : 'update';
- return __('filament-tiptap-editor::media-modal.heading.' . $context);
+ return trans('filament-tiptap-editor::media-modal.heading.' . $context);
})->form(function (TiptapEditor $component) {
return [
FileUpload::make('src')
- ->label(__('filament-tiptap-editor::media-modal.labels.file'))
+ ->label(trans('filament-tiptap-editor::media-modal.labels.file'))
->disk($component->getDisk())
->directory($component->getDirectory())
->visibility(config('filament-tiptap-editor.visibility'))
@@ -96,11 +96,11 @@ protected function setUp(): void
return Storage::disk($component->getDiskName())->url($upload);
}),
TextInput::make('link_text')
- ->label(__('filament-tiptap-editor::media-modal.labels.link_text'))
+ ->label(trans('filament-tiptap-editor::media-modal.labels.link_text'))
->required()
->visible(fn (callable $get) => $get('type') == 'document'),
TextInput::make('alt')
- ->label(__('filament-tiptap-editor::media-modal.labels.alt'))
+ ->label(trans('filament-tiptap-editor::media-modal.labels.alt'))
->hidden(fn (callable $get) => $get('type') == 'document')
->hintAction(
Action::make('alt_hint_action')
@@ -109,9 +109,9 @@ protected function setUp(): void
->url('https://www.w3.org/WAI/tutorials/images/decision-tree', true)
),
TextInput::make('title')
- ->label(__('filament-tiptap-editor::media-modal.labels.title')),
+ ->label(trans('filament-tiptap-editor::media-modal.labels.title')),
Checkbox::make('lazy')
- ->label(__('filament-tiptap-editor::media-modal.labels.lazy'))
+ ->label(trans('filament-tiptap-editor::media-modal.labels.lazy'))
->default(false),
Hidden::make('width'),
Hidden::make('height'),
diff --git a/src/Actions/OEmbedAction.php b/src/Actions/OEmbedAction.php
index 7c844c1d..23bb9d79 100644
--- a/src/Actions/OEmbedAction.php
+++ b/src/Actions/OEmbedAction.php
@@ -25,10 +25,10 @@ protected function setUp(): void
$this
->modalWidth('lg')
- ->modalHeading(__('filament-tiptap-editor::oembed-modal.heading'))
+ ->modalHeading(trans('filament-tiptap-editor::oembed-modal.heading'))
->form([
TextInput::make('url')
- ->label(__('filament-tiptap-editor::oembed-modal.labels.url'))
+ ->label(trans('filament-tiptap-editor::oembed-modal.labels.url'))
->reactive()
->required(),
CheckboxList::make('native_options')
@@ -39,9 +39,9 @@ protected function setUp(): void
return ! (str_contains($get('url'), 'vimeo') || str_contains($get('url'), 'youtube') || str_contains($get('url'), 'youtu.be'));
})
->options([
- 'autoplay' => __('filament-tiptap-editor::oembed-modal.labels.autoplay'),
- 'loop' => __('filament-tiptap-editor::oembed-modal.labels.loop'),
- 'controls' => __('filament-tiptap-editor::oembed-modal.labels.controls'),
+ 'autoplay' => trans('filament-tiptap-editor::oembed-modal.labels.autoplay'),
+ 'loop' => trans('filament-tiptap-editor::oembed-modal.labels.loop'),
+ 'controls' => trans('filament-tiptap-editor::oembed-modal.labels.controls'),
]),
CheckboxList::make('vimeo_options')
->hiddenLabel()
@@ -51,11 +51,11 @@ protected function setUp(): void
return str_contains($get('url'), 'vimeo');
})
->options([
- 'autoplay' => __('filament-tiptap-editor::oembed-modal.labels.autoplay'),
- 'loop' => __('filament-tiptap-editor::oembed-modal.labels.loop'),
- 'show_title' => __('filament-tiptap-editor::oembed-modal.labels.title'),
- 'byline' => __('filament-tiptap-editor::oembed-modal.labels.byline'),
- 'portrait' => __('filament-tiptap-editor::oembed-modal.labels.portrait'),
+ 'autoplay' => trans('filament-tiptap-editor::oembed-modal.labels.autoplay'),
+ 'loop' => trans('filament-tiptap-editor::oembed-modal.labels.loop'),
+ 'show_title' => trans('filament-tiptap-editor::oembed-modal.labels.title'),
+ 'byline' => trans('filament-tiptap-editor::oembed-modal.labels.byline'),
+ 'portrait' => trans('filament-tiptap-editor::oembed-modal.labels.portrait'),
]),
Group::make([
CheckboxList::make('youtube_options')
@@ -63,11 +63,11 @@ protected function setUp(): void
->gridDirection('row')
->columns(3)
->options([
- 'controls' => __('filament-tiptap-editor::oembed-modal.labels.controls'),
- 'nocookie' => __('filament-tiptap-editor::oembed-modal.labels.nocookie'),
+ 'controls' => trans('filament-tiptap-editor::oembed-modal.labels.controls'),
+ 'nocookie' => trans('filament-tiptap-editor::oembed-modal.labels.nocookie'),
]),
TimePicker::make('start_at')
- ->label(__('filament-tiptap-editor::oembed-modal.labels.start_at'))
+ ->label(trans('filament-tiptap-editor::oembed-modal.labels.start_at'))
->reactive()
->date(false)
->afterStateHydrated(function (TimePicker $component, $state): void {
@@ -91,7 +91,7 @@ protected function setUp(): void
Checkbox::make('responsive')
->default(true)
->reactive()
- ->label(__('filament-tiptap-editor::oembed-modal.labels.responsive'))
+ ->label(trans('filament-tiptap-editor::oembed-modal.labels.responsive'))
->afterStateUpdated(function (callable $set, $state) {
if ($state) {
$set('width', '16');
@@ -106,12 +106,12 @@ protected function setUp(): void
TextInput::make('width')
->reactive()
->required()
- ->label(__('filament-tiptap-editor::oembed-modal.labels.width'))
+ ->label(trans('filament-tiptap-editor::oembed-modal.labels.width'))
->default('16'),
TextInput::make('height')
->reactive()
->required()
- ->label(__('filament-tiptap-editor::oembed-modal.labels.height'))
+ ->label(trans('filament-tiptap-editor::oembed-modal.labels.height'))
->default('9'),
])->columns(['md' => 2]),
])
diff --git a/src/Actions/SourceAction.php b/src/Actions/SourceAction.php
index 4c0a2dab..8c2d1dae 100644
--- a/src/Actions/SourceAction.php
+++ b/src/Actions/SourceAction.php
@@ -18,11 +18,11 @@ protected function setUp(): void
parent::setUp();
$this
- ->modalHeading(__('filament-tiptap-editor::source-modal.heading'))
+ ->modalHeading(trans('filament-tiptap-editor::source-modal.heading'))
->fillForm(fn ($arguments) => ['source' => $arguments['html']])
->form([
TextArea::make('source')
- ->label(__('filament-tiptap-editor::source-modal.labels.source'))
+ ->label(trans('filament-tiptap-editor::source-modal.labels.source'))
->extraAttributes(['class' => 'source_code_editor'])
->autosize(),
])
diff --git a/src/Blocks/VideoBlock.php b/src/Blocks/VideoBlock.php
index e2303081..d88e2134 100644
--- a/src/Blocks/VideoBlock.php
+++ b/src/Blocks/VideoBlock.php
@@ -22,7 +22,7 @@ public function getFormSchema(): array
{
return [
TextInput::make('url')
- ->label(__('filament-tiptap-editor::oembed-modal.labels.url'))
+ ->label(trans('filament-tiptap-editor::oembed-modal.labels.url'))
->live(onBlur: true)
->required()
->afterStateUpdated(function ($state, callable $set) {
@@ -36,9 +36,9 @@ public function getFormSchema(): array
return ! (str_contains($get('url'), 'vimeo') || str_contains($get('url'), 'youtube') || str_contains($get('url'), 'youtu.be'));
})
->options([
- 'autoplay' => __('filament-tiptap-editor::oembed-modal.labels.autoplay'),
- 'loop' => __('filament-tiptap-editor::oembed-modal.labels.loop'),
- 'controls' => __('filament-tiptap-editor::oembed-modal.labels.controls'),
+ 'autoplay' => trans('filament-tiptap-editor::oembed-modal.labels.autoplay'),
+ 'loop' => trans('filament-tiptap-editor::oembed-modal.labels.loop'),
+ 'controls' => trans('filament-tiptap-editor::oembed-modal.labels.controls'),
]),
CheckboxList::make('vimeo_options')
->hiddenLabel()
@@ -48,11 +48,11 @@ public function getFormSchema(): array
return str_contains($get('url'), 'vimeo');
})
->options([
- 'autoplay' => __('filament-tiptap-editor::oembed-modal.labels.autoplay'),
- 'loop' => __('filament-tiptap-editor::oembed-modal.labels.loop'),
- 'show_title' => __('filament-tiptap-editor::oembed-modal.labels.title'),
- 'byline' => __('filament-tiptap-editor::oembed-modal.labels.byline'),
- 'portrait' => __('filament-tiptap-editor::oembed-modal.labels.portrait'),
+ 'autoplay' => trans('filament-tiptap-editor::oembed-modal.labels.autoplay'),
+ 'loop' => trans('filament-tiptap-editor::oembed-modal.labels.loop'),
+ 'show_title' => trans('filament-tiptap-editor::oembed-modal.labels.title'),
+ 'byline' => trans('filament-tiptap-editor::oembed-modal.labels.byline'),
+ 'portrait' => trans('filament-tiptap-editor::oembed-modal.labels.portrait'),
]),
Group::make([
CheckboxList::make('youtube_options')
@@ -60,11 +60,11 @@ public function getFormSchema(): array
->gridDirection('row')
->columns(3)
->options([
- 'controls' => __('filament-tiptap-editor::oembed-modal.labels.controls'),
- 'nocookie' => __('filament-tiptap-editor::oembed-modal.labels.nocookie'),
+ 'controls' => trans('filament-tiptap-editor::oembed-modal.labels.controls'),
+ 'nocookie' => trans('filament-tiptap-editor::oembed-modal.labels.nocookie'),
]),
TimePicker::make('start_at')
- ->label(__('filament-tiptap-editor::oembed-modal.labels.start_at'))
+ ->label(trans('filament-tiptap-editor::oembed-modal.labels.start_at'))
->reactive()
->date(false)
->afterStateHydrated(function (TimePicker $component, $state): void {
@@ -88,7 +88,7 @@ public function getFormSchema(): array
Checkbox::make('responsive')
->default(true)
->reactive()
- ->label(__('filament-tiptap-editor::oembed-modal.labels.responsive'))
+ ->label(trans('filament-tiptap-editor::oembed-modal.labels.responsive'))
->afterStateUpdated(function (callable $set, $state) {
if ($state) {
$set('width', '16');
@@ -103,12 +103,12 @@ public function getFormSchema(): array
TextInput::make('width')
->reactive()
->required()
- ->label(__('filament-tiptap-editor::oembed-modal.labels.width'))
+ ->label(trans('filament-tiptap-editor::oembed-modal.labels.width'))
->default('16'),
TextInput::make('height')
->reactive()
->required()
- ->label(__('filament-tiptap-editor::oembed-modal.labels.height'))
+ ->label(trans('filament-tiptap-editor::oembed-modal.labels.height'))
->default('9'),
])->columns(['md' => 2]),
];