diff --git a/resources/views/components/menus/link-bubble-menu.blade.php b/resources/views/components/menus/link-bubble-menu.blade.php index da8dc0f2..71fa9469 100644 --- a/resources/views/components/menus/link-bubble-menu.blade.php +++ b/resources/views/components/menus/link-bubble-menu.blade.php @@ -6,7 +6,7 @@ @if (in_array('link', $tools))
- +
@endif diff --git a/resources/views/components/menus/table-bubble-menu.blade.php b/resources/views/components/menus/table-bubble-menu.blade.php index bb5a52f2..c75876bc 100644 --- a/resources/views/components/menus/table-bubble-menu.blade.php +++ b/resources/views/components/menus/table-bubble-menu.blade.php @@ -8,55 +8,55 @@ @endif diff --git a/resources/views/components/tools/align-center.blade.php b/resources/views/components/tools/align-center.blade.php index 28079da3..f75328d1 100644 --- a/resources/views/components/tools/align-center.blade.php +++ b/resources/views/components/tools/align-center.blade.php @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/resources/views/components/tools/align-justify.blade.php b/resources/views/components/tools/align-justify.blade.php index ea436c18..2f320a9b 100644 --- a/resources/views/components/tools/align-justify.blade.php +++ b/resources/views/components/tools/align-justify.blade.php @@ -1,6 +1,6 @@ diff --git a/resources/views/components/tools/align-left.blade.php b/resources/views/components/tools/align-left.blade.php index 166f3fe3..9b657c4e 100644 --- a/resources/views/components/tools/align-left.blade.php +++ b/resources/views/components/tools/align-left.blade.php @@ -1,5 +1,13 @@ \ No newline at end of file diff --git a/resources/views/components/tools/align-right.blade.php b/resources/views/components/tools/align-right.blade.php index 1b36bd32..175baa95 100644 --- a/resources/views/components/tools/align-right.blade.php +++ b/resources/views/components/tools/align-right.blade.php @@ -1,6 +1,14 @@ diff --git a/resources/views/components/tools/blockquote.blade.php b/resources/views/components/tools/blockquote.blade.php index 078a3cc6..3f54f6d4 100644 --- a/resources/views/components/tools/blockquote.blade.php +++ b/resources/views/components/tools/blockquote.blade.php @@ -1,6 +1,6 @@ diff --git a/resources/views/components/tools/blocks.blade.php b/resources/views/components/tools/blocks.blade.php index eea508cc..0b7f13e1 100644 --- a/resources/views/components/tools/blocks.blade.php +++ b/resources/views/components/tools/blocks.blade.php @@ -4,7 +4,7 @@ ]) diff --git a/resources/views/components/tools/bold.blade.php b/resources/views/components/tools/bold.blade.php index 6d42b1e2..37cb58b4 100644 --- a/resources/views/components/tools/bold.blade.php +++ b/resources/views/components/tools/bold.blade.php @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/resources/views/components/tools/bullet-list.blade.php b/resources/views/components/tools/bullet-list.blade.php index b536a0c6..049507b6 100644 --- a/resources/views/components/tools/bullet-list.blade.php +++ b/resources/views/components/tools/bullet-list.blade.php @@ -1,6 +1,6 @@ diff --git a/resources/views/components/tools/checked-list.blade.php b/resources/views/components/tools/checked-list.blade.php index d70613f6..b80add17 100644 --- a/resources/views/components/tools/checked-list.blade.php +++ b/resources/views/components/tools/checked-list.blade.php @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/resources/views/components/tools/code-block.blade.php b/resources/views/components/tools/code-block.blade.php index e8bfec78..0f56ca9b 100644 --- a/resources/views/components/tools/code-block.blade.php +++ b/resources/views/components/tools/code-block.blade.php @@ -1,6 +1,6 @@ diff --git a/resources/views/components/tools/code.blade.php b/resources/views/components/tools/code.blade.php index 8346335b..b385ca5d 100644 --- a/resources/views/components/tools/code.blade.php +++ b/resources/views/components/tools/code.blade.php @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/resources/views/components/tools/color.blade.php b/resources/views/components/tools/color.blade.php index 28fda4cc..02828657 100644 --- a/resources/views/components/tools/color.blade.php +++ b/resources/views/components/tools/color.blade.php @@ -1,5 +1,5 @@ - {{ __('filament-tiptap-editor::editor.color.choose') }} + {{ trans('filament-tiptap-editor::editor.color.choose') }} - {{ __('filament-tiptap-editor::editor.color.remove') }} + {{ trans('filament-tiptap-editor::editor.color.remove') }} diff --git a/resources/views/components/tools/details.blade.php b/resources/views/components/tools/details.blade.php index bf9c75a9..2e231562 100644 --- a/resources/views/components/tools/details.blade.php +++ b/resources/views/components/tools/details.blade.php @@ -1,6 +1,6 @@ diff --git a/resources/views/components/tools/erase.blade.php b/resources/views/components/tools/erase.blade.php index d9562996..ce9c39e7 100644 --- a/resources/views/components/tools/erase.blade.php +++ b/resources/views/components/tools/erase.blade.php @@ -1,5 +1,5 @@ diff --git a/resources/views/components/tools/fullscreen.blade.php b/resources/views/components/tools/fullscreen.blade.php index 11d56a05..37e6d77b 100644 --- a/resources/views/components/tools/fullscreen.blade.php +++ b/resources/views/components/tools/fullscreen.blade.php @@ -1,6 +1,6 @@
diff --git a/resources/views/components/tools/grid-builder.blade.php b/resources/views/components/tools/grid-builder.blade.php index d33be2e0..883126ac 100644 --- a/resources/views/components/tools/grid-builder.blade.php +++ b/resources/views/components/tools/grid-builder.blade.php @@ -5,6 +5,6 @@ diff --git a/resources/views/components/tools/grid.blade.php b/resources/views/components/tools/grid.blade.php index af15416d..a76572ab 100644 --- a/resources/views/components/tools/grid.blade.php +++ b/resources/views/components/tools/grid.blade.php @@ -7,7 +7,7 @@ @endphp @@ -15,7 +15,7 @@ - {{ __('filament-tiptap-editor::editor.grid.two_columns') }} + {{ trans('filament-tiptap-editor::editor.grid.two_columns') }} @endif @@ -23,7 +23,7 @@ - {{ __('filament-tiptap-editor::editor.grid.three_columns') }} + {{ trans('filament-tiptap-editor::editor.grid.three_columns') }} @endif @@ -31,7 +31,7 @@ - {{ __('filament-tiptap-editor::editor.grid.four_columns') }} + {{ trans('filament-tiptap-editor::editor.grid.four_columns') }} @endif @@ -39,7 +39,7 @@ - {{ __('filament-tiptap-editor::editor.grid.five_columns') }} + {{ trans('filament-tiptap-editor::editor.grid.five_columns') }} @endif @@ -47,7 +47,7 @@ - {{ __('filament-tiptap-editor::editor.grid.fixed_two_columns') }} + {{ trans('filament-tiptap-editor::editor.grid.fixed_two_columns') }} @endif @@ -55,14 +55,14 @@ - {{ __('filament-tiptap-editor::editor.grid.fixed_three_columns') }} + {{ trans('filament-tiptap-editor::editor.grid.fixed_three_columns') }} @endif @if (in_array('fixed-four-columns', $layouts)) - {{ __('filament-tiptap-editor::editor.grid.fixed_four_columns') }} + {{ trans('filament-tiptap-editor::editor.grid.fixed_four_columns') }} @endif @@ -70,7 +70,7 @@ - {{ __('filament-tiptap-editor::editor.grid.fixed_five_columns') }} + {{ trans('filament-tiptap-editor::editor.grid.fixed_five_columns') }} @endif @@ -78,7 +78,7 @@ - {{ __('filament-tiptap-editor::editor.grid.asymmetric_left_thirds') }} + {{ trans('filament-tiptap-editor::editor.grid.asymmetric_left_thirds') }} @endif @@ -86,7 +86,7 @@ - {{ __('filament-tiptap-editor::editor.grid.asymmetric_right_thirds') }} + {{ trans('filament-tiptap-editor::editor.grid.asymmetric_right_thirds') }} @endif @@ -94,7 +94,7 @@ - {{ __('filament-tiptap-editor::editor.grid.asymmetric_left_fourths') }} + {{ trans('filament-tiptap-editor::editor.grid.asymmetric_left_fourths') }} @endif @@ -102,7 +102,7 @@ - {{ __('filament-tiptap-editor::editor.grid.asymmetric_right_fourths') }} + {{ trans('filament-tiptap-editor::editor.grid.asymmetric_right_fourths') }} @endif diff --git a/resources/views/components/tools/heading.blade.php b/resources/views/components/tools/heading.blade.php index 930ba0b7..c6067d23 100644 --- a/resources/views/components/tools/heading.blade.php +++ b/resources/views/components/tools/heading.blade.php @@ -1,5 +1,5 @@ diff --git a/resources/views/components/tools/highlight.blade.php b/resources/views/components/tools/highlight.blade.php index 2b68be6c..e7a606bf 100644 --- a/resources/views/components/tools/highlight.blade.php +++ b/resources/views/components/tools/highlight.blade.php @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/resources/views/components/tools/hr.blade.php b/resources/views/components/tools/hr.blade.php index 410aeb1b..a3e7393f 100644 --- a/resources/views/components/tools/hr.blade.php +++ b/resources/views/components/tools/hr.blade.php @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/resources/views/components/tools/hurdle.blade.php b/resources/views/components/tools/hurdle.blade.php index 433f24f3..71f429ed 100644 --- a/resources/views/components/tools/hurdle.blade.php +++ b/resources/views/components/tools/hurdle.blade.php @@ -3,7 +3,7 @@ @endphp @@ -11,7 +11,7 @@ - {{ __('filament-tiptap-editor::editor.hurdle.colors.' . $color) }} + {{ trans('filament-tiptap-editor::editor.hurdle.colors.' . $color) }} @endforeach diff --git a/resources/views/components/tools/italic.blade.php b/resources/views/components/tools/italic.blade.php index 85e60d97..5e9de61d 100644 --- a/resources/views/components/tools/italic.blade.php +++ b/resources/views/components/tools/italic.blade.php @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/resources/views/components/tools/lead.blade.php b/resources/views/components/tools/lead.blade.php index 28c87e33..55f21ec7 100644 --- a/resources/views/components/tools/lead.blade.php +++ b/resources/views/components/tools/lead.blade.php @@ -1,6 +1,6 @@ diff --git a/resources/views/components/tools/link.blade.php b/resources/views/components/tools/link.blade.php index e23575db..d60aa492 100644 --- a/resources/views/components/tools/link.blade.php +++ b/resources/views/components/tools/link.blade.php @@ -1,7 +1,7 @@ @props([ 'statePath' => null, 'icon' => 'link', - 'label' => __('filament-tiptap-editor::editor.link.insert_edit'), + 'label' => trans('filament-tiptap-editor::editor.link.insert_edit'), 'active' => true, ]) diff --git a/resources/views/components/tools/media.blade.php b/resources/views/components/tools/media.blade.php index 1724c729..125923b9 100644 --- a/resources/views/components/tools/media.blade.php +++ b/resources/views/components/tools/media.blade.php @@ -12,7 +12,7 @@ \ No newline at end of file diff --git a/resources/views/components/tools/ordered-list.blade.php b/resources/views/components/tools/ordered-list.blade.php index eda16f29..0908b857 100644 --- a/resources/views/components/tools/ordered-list.blade.php +++ b/resources/views/components/tools/ordered-list.blade.php @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/resources/views/components/tools/paragraph.blade.php b/resources/views/components/tools/paragraph.blade.php index 7e8b0c50..165bb242 100644 --- a/resources/views/components/tools/paragraph.blade.php +++ b/resources/views/components/tools/paragraph.blade.php @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/resources/views/components/tools/redo.blade.php b/resources/views/components/tools/redo.blade.php index 3df6256b..357c7fb7 100644 --- a/resources/views/components/tools/redo.blade.php +++ b/resources/views/components/tools/redo.blade.php @@ -1,6 +1,6 @@ diff --git a/resources/views/components/tools/remove-color.blade.php b/resources/views/components/tools/remove-color.blade.php index d0e244aa..2568ebcb 100644 --- a/resources/views/components/tools/remove-color.blade.php +++ b/resources/views/components/tools/remove-color.blade.php @@ -2,6 +2,6 @@ x-show="tools.includes('color') && editor().isActive('textStyle', updatedAt)" style="display: none;" action="editor().chain().focus().unsetColor().run()" - label="{{ __('filament-tiptap-editor::editor.remove_color') }}" + label="{{ trans('filament-tiptap-editor::editor.remove_color') }}" icon="remove-color" /> \ No newline at end of file diff --git a/resources/views/components/tools/remove-link.blade.php b/resources/views/components/tools/remove-link.blade.php index eb5fe461..79b86845 100644 --- a/resources/views/components/tools/remove-link.blade.php +++ b/resources/views/components/tools/remove-link.blade.php @@ -1,5 +1,5 @@ \ No newline at end of file diff --git a/resources/views/components/tools/small.blade.php b/resources/views/components/tools/small.blade.php index af9b1bd9..60417129 100644 --- a/resources/views/components/tools/small.blade.php +++ b/resources/views/components/tools/small.blade.php @@ -1,6 +1,6 @@ diff --git a/resources/views/components/tools/source.blade.php b/resources/views/components/tools/source.blade.php index 466e1e06..ff618526 100644 --- a/resources/views/components/tools/source.blade.php +++ b/resources/views/components/tools/source.blade.php @@ -4,7 +4,7 @@ diff --git a/resources/views/components/tools/subscript.blade.php b/resources/views/components/tools/subscript.blade.php index bc7165fd..d79c7b8f 100644 --- a/resources/views/components/tools/subscript.blade.php +++ b/resources/views/components/tools/subscript.blade.php @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/resources/views/components/tools/superscript.blade.php b/resources/views/components/tools/superscript.blade.php index ce75668b..ccd9ea2e 100644 --- a/resources/views/components/tools/superscript.blade.php +++ b/resources/views/components/tools/superscript.blade.php @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/resources/views/components/tools/table.blade.php b/resources/views/components/tools/table.blade.php index dd35d733..509f02f1 100644 --- a/resources/views/components/tools/table.blade.php +++ b/resources/views/components/tools/table.blade.php @@ -2,5 +2,5 @@ action="editor().chain().focus().insertTable({ rows: 3, cols: 3, withHeaderRow: true }).run()" icon="table" :secondary="true" - label="{{ __('filament-tiptap-editor::editor.table.insert_table') }}" + label="{{ trans('filament-tiptap-editor::editor.table.insert_table') }}" /> diff --git a/resources/views/components/tools/underline.blade.php b/resources/views/components/tools/underline.blade.php index d39734b9..336d6661 100644 --- a/resources/views/components/tools/underline.blade.php +++ b/resources/views/components/tools/underline.blade.php @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/resources/views/components/tools/undo.blade.php b/resources/views/components/tools/undo.blade.php index 8f084dd2..cd2db3d7 100644 --- a/resources/views/components/tools/undo.blade.php +++ b/resources/views/components/tools/undo.blade.php @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/resources/views/tiptap-editor.blade.php b/resources/views/tiptap-editor.blade.php index 843c4382..ded170f1 100644 --- a/resources/views/tiptap-editor.blade.php +++ b/resources/views/tiptap-editor.blade.php @@ -61,7 +61,7 @@ class="relative z-0 tiptap-wrapper rounded-md bg-white dark:bg-gray-900 focus-wi x-trap.noscroll="fullScreenMode" > @if (! $isDisabled && ! $isToolbarMenusDisabled() && $tools) - +
@@ -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]), ];