Skip to content

Commit

Permalink
Chore: normalization translations
Browse files Browse the repository at this point in the history
  • Loading branch information
awcodes committed Jan 6, 2024
1 parent 88db473 commit 6c951f7
Show file tree
Hide file tree
Showing 48 changed files with 151 additions and 136 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@if (in_array('link', $tools))
<div x-ref="linkBubbleMenu" class="flex gap-1 items-center" x-cloak>
<span x-text="editor().getAttributes('link').href" class="max-w-xs truncate overflow-hidden whitespace-nowrap"></span>
<x-filament-tiptap-editor::tools.link :state-path="$statePath" icon="edit" :active="false" label="{{ __('filament-tiptap-editor::editor.link.edit') }}"/>
<x-filament-tiptap-editor::tools.link :state-path="$statePath" icon="edit" :active="false" label="{{ trans('filament-tiptap-editor::editor.link.edit') }}"/>
<x-filament-tiptap-editor::tools.remove-link />
</div>
@endif
Expand Down
18 changes: 9 additions & 9 deletions resources/views/components/menus/table-bubble-menu.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,55 +8,55 @@
<x-filament-tiptap-editor::button
action="editor().chain().focus().addColumnBefore().run()"
icon="table-add-column-before"
label="{{ __('filament-tiptap-editor::editor.table.add_column_before') }}"
label="{{ trans('filament-tiptap-editor::editor.table.add_column_before') }}"
/>

<x-filament-tiptap-editor::button
action="editor().chain().focus().addColumnAfter().run()"
icon="table-add-column-after"
label="{{ __('filament-tiptap-editor::editor.table.add_column_after') }}"
label="{{ trans('filament-tiptap-editor::editor.table.add_column_after') }}"
/>

<x-filament-tiptap-editor::button
action="editor().chain().focus().deleteColumn().run()"
icon="table-delete-column"
label="{{ __('filament-tiptap-editor::editor.table.delete_column') }}"
label="{{ trans('filament-tiptap-editor::editor.table.delete_column') }}"
/>

<x-filament-tiptap-editor::button
action="editor().chain().focus().addRowBefore().run()"
icon="table-add-row-before"
label="{{ __('filament-tiptap-editor::editor.table.add_row_before') }}"
label="{{ trans('filament-tiptap-editor::editor.table.add_row_before') }}"
/>

<x-filament-tiptap-editor::button
action="editor().chain().focus().addRowAfter().run()"
icon="table-add-row-after"
label="{{ __('filament-tiptap-editor::editor.table.add_row_after') }}"
label="{{ trans('filament-tiptap-editor::editor.table.add_row_after') }}"
/>

<x-filament-tiptap-editor::button
action="editor().chain().focus().deleteRow().run()"
icon="table-delete-row"
label="{{ __('filament-tiptap-editor::editor.table.delete_row') }}"
label="{{ trans('filament-tiptap-editor::editor.table.delete_row') }}"
/>

<x-filament-tiptap-editor::button
action="editor().chain().focus().mergeCells().run()"
icon="table-merge-cells"
label="{{ __('filament-tiptap-editor::editor.table.merge_cells') }}"
label="{{ trans('filament-tiptap-editor::editor.table.merge_cells') }}"
/>

<x-filament-tiptap-editor::button
action="editor().chain().focus().splitCell().run()"
icon="table-split-cells"
label="{{ __('filament-tiptap-editor::editor.table.split_cell') }}"
label="{{ trans('filament-tiptap-editor::editor.table.split_cell') }}"
/>

<x-filament-tiptap-editor::button
action="editor().chain().focus().deleteTable().run()"
icon="table-delete"
label="{{ __('filament-tiptap-editor::editor.table.delete_table') }}"
label="{{ trans('filament-tiptap-editor::editor.table.delete_table') }}"
/>
</div>
@endif
2 changes: 1 addition & 1 deletion resources/views/components/tools/align-center.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<x-filament-tiptap-editor::button
action="editor().chain().focus().setTextAlign('center').run()"
active="{ textAlign: 'center' }"
label="{{ __('filament-tiptap-editor::editor.align_center') }}"
label="{{ trans('filament-tiptap-editor::editor.align_center') }}"
icon="align-center"
/>
2 changes: 1 addition & 1 deletion resources/views/components/tools/align-justify.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<x-filament-tiptap-editor::button
action="editor().chain().focus().setTextAlign('justify').run()"
active="{ textAlign: 'justify' }"
label="{{ __('filament-tiptap-editor::editor.align_justify') }}"
label="{{ trans('filament-tiptap-editor::editor.align_justify') }}"
icon="align-justify"
/>
12 changes: 10 additions & 2 deletions resources/views/components/tools/align-left.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<x-filament-tiptap-editor::button
action="editor().chain().focus().setTextAlign('start').run()"
label="{{ config('filament-tiptap-editor.direction') === 'rtl' ? __('filament-tiptap-editor::editor.align_right') : __('filament-tiptap-editor::editor.align_left') }}"
icon="{{ config('filament-tiptap-editor.direction') === 'rtl' ? 'align-right' : 'align-left' }}"
label="{{
config('filament-tiptap-editor.direction') === 'rtl'
? trans('filament-tiptap-editor::editor.align_right')
: trans('filament-tiptap-editor::editor.align_left')
}}"
icon="{{
config('filament-tiptap-editor.direction') === 'rtl'
? 'align-right'
: 'align-left'
}}"
/>
12 changes: 10 additions & 2 deletions resources/views/components/tools/align-right.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
<x-filament-tiptap-editor::button
action="editor().chain().focus().setTextAlign('end').run()"
active="{ textAlign: 'end' }"
label="{{ config('filament-tiptap-editor.direction') === 'rtl' ? __('filament-tiptap-editor::editor.align_left') : __('filament-tiptap-editor::editor.align_right') }}"
icon="{{ config('filament-tiptap-editor.direction') === 'rtl' ? 'align-left' : 'align-right' }}"
label="{{
config('filament-tiptap-editor.direction') === 'rtl'
? trans('filament-tiptap-editor::editor.align_left')
: trans('filament-tiptap-editor::editor.align_right')
}}"
icon="{{
config('filament-tiptap-editor.direction') === 'rtl'
? 'align-left'
: 'align-right'
}}"
/>
2 changes: 1 addition & 1 deletion resources/views/components/tools/blockquote.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<x-filament-tiptap-editor::button
action="editor().chain().focus().toggleBlockquote().run()"
active="blockquote"
label="{{ __('filament-tiptap-editor::editor.blockquote') }}"
label="{{ trans('filament-tiptap-editor::editor.blockquote') }}"
icon="blockquote"
/>
2 changes: 1 addition & 1 deletion resources/views/components/tools/blocks.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
])

<x-filament-tiptap-editor::dropdown-button
label="{{ __('filament-tiptap-editor::editor.blocks.insert') }}"
label="{{ trans('filament-tiptap-editor::editor.blocks.insert') }}"
icon="blocks"
:active="true"
>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/tools/bold.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<x-filament-tiptap-editor::button
action="editor().chain().focus().toggleBold().run()"
active="bold"
label="{{ __('filament-tiptap-editor::editor.bold') }}"
label="{{ trans('filament-tiptap-editor::editor.bold') }}"
icon="bold"
/>
2 changes: 1 addition & 1 deletion resources/views/components/tools/bullet-list.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<x-filament-tiptap-editor::button
action="editor().chain().focus().toggleBulletList().run()"
active="bulletlist"
label="{{ __('filament-tiptap-editor::editor.list.bulleted') }}"
label="{{ trans('filament-tiptap-editor::editor.list.bulleted') }}"
icon="bulletlist"
/>
2 changes: 1 addition & 1 deletion resources/views/components/tools/checked-list.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<x-filament-tiptap-editor::button
action="editor().chain().focus().toggleCheckedList().run()"
active="checkedlist"
label="{{ __('filament-tiptap-editor::editor.list.checked') }}"
label="{{ trans('filament-tiptap-editor::editor.list.checked') }}"
icon="checkedlist"
/>
2 changes: 1 addition & 1 deletion resources/views/components/tools/code-block.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<x-filament-tiptap-editor::button
action="editor().chain().focus().toggleCodeBlock().run()"
active="codeBlock"
label="{{ __('filament-tiptap-editor::editor.code_block') }}"
label="{{ trans('filament-tiptap-editor::editor.code_block') }}"
icon="code-block"
/>
2 changes: 1 addition & 1 deletion resources/views/components/tools/code.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<x-filament-tiptap-editor::button
action="editor().chain().focus().toggleCode().run()"
active="code"
label="{{ __('filament-tiptap-editor::editor.code') }}"
label="{{ trans('filament-tiptap-editor::editor.code') }}"
icon="code"
/>
6 changes: 3 additions & 3 deletions resources/views/components/tools/color.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<x-filament-tiptap-editor::dropdown-button
label="{{ __('filament-tiptap-editor::editor.color.label') }}"
label="{{ trans('filament-tiptap-editor::editor.color.label') }}"
active="color"
icon="color"
:list="false"
Expand Down Expand Up @@ -29,7 +29,7 @@ class="relative flex-1 p-1"
size="sm"
class="flex-1"
>
{{ __('filament-tiptap-editor::editor.color.choose') }}
{{ trans('filament-tiptap-editor::editor.color.choose') }}
</x-filament::button>

<x-filament::button
Expand All @@ -38,7 +38,7 @@ class="flex-1"
class="flex-1"
color="danger"
>
{{ __('filament-tiptap-editor::editor.color.remove') }}
{{ trans('filament-tiptap-editor::editor.color.remove') }}
</x-filament::button>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/tools/details.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<x-filament-tiptap-editor::button
action="editor().isActive('details', updatedAt) ? editor().chain().focus().unsetDetails().run() : editor().chain().focus().setDetails().run()"
active="details"
label="{{ __('filament-tiptap-editor::editor.details') }}"
label="{{ trans('filament-tiptap-editor::editor.details') }}"
icon="details"
/>
2 changes: 1 addition & 1 deletion resources/views/components/tools/erase.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<x-filament-tiptap-editor::button
action="editor().commands.clearContent(true)"
label="{{ __('filament-tiptap-editor::editor.erase') }}"
label="{{ trans('filament-tiptap-editor::editor.erase') }}"
icon="erase"
/>
2 changes: 1 addition & 1 deletion resources/views/components/tools/fullscreen.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<x-filament-tiptap-editor::button
action="fullScreenMode = !fullScreenMode; if (fullScreenMode) editor().chain().focus()"
x-tooltip="fullScreenMode ? '{{ __('filament-tiptap-editor::editor.fullscreen.exit') }}' : '{{ __('filament-tiptap-editor::editor.fullscreen.enter') }}'"
x-tooltip="fullScreenMode ? '{{ trans('filament-tiptap-editor::editor.fullscreen.exit') }}' : '{{ trans('filament-tiptap-editor::editor.fullscreen.enter') }}'"
>
<div x-show="!fullScreenMode">
<x-filament-tiptap-editor::icon icon="fullscreen-enter" />
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/tools/grid-builder.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<x-filament-tiptap-editor::button
action="$wire.dispatchFormEvent('tiptap::setGridBuilderContent', '{{ $statePath }}', {})"
active="grid-builder"
label="{{ __('filament-tiptap-editor::editor.grid-builder.label') }}"
label="{{ trans('filament-tiptap-editor::editor.grid-builder.label') }}"
icon="grid-builder"
/>
26 changes: 13 additions & 13 deletions resources/views/components/tools/grid.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,102 +7,102 @@
@endphp

<x-filament-tiptap-editor::dropdown-button
label="{{ __('filament-tiptap-editor::editor.grid.label') }}"
label="{{ trans('filament-tiptap-editor::editor.grid.label') }}"
active="grid"
icon="grid"
>
@if (in_array('two-columns', $layouts))
<x-filament-tiptap-editor::dropdown-button-item
action="editor().chain().focus().insertGrid({ cols: 2 }).run()"
>
{{ __('filament-tiptap-editor::editor.grid.two_columns') }}
{{ trans('filament-tiptap-editor::editor.grid.two_columns') }}
</x-filament-tiptap-editor::dropdown-button-item>
@endif

@if (in_array('three-columns', $layouts))
<x-filament-tiptap-editor::dropdown-button-item
action="editor().chain().focus().insertGrid({ cols: 3 }).run()"
>
{{ __('filament-tiptap-editor::editor.grid.three_columns') }}
{{ trans('filament-tiptap-editor::editor.grid.three_columns') }}
</x-filament-tiptap-editor::dropdown-button-item>
@endif

@if (in_array('four-columns', $layouts))
<x-filament-tiptap-editor::dropdown-button-item
action="editor().chain().focus().insertGrid({ cols: 4 }).run()"
>
{{ __('filament-tiptap-editor::editor.grid.four_columns') }}
{{ trans('filament-tiptap-editor::editor.grid.four_columns') }}
</x-filament-tiptap-editor::dropdown-button-item>
@endif

@if (in_array('five-columns', $layouts))
<x-filament-tiptap-editor::dropdown-button-item
action="editor().chain().focus().insertGrid({ cols: 5 }).run()"
>
{{ __('filament-tiptap-editor::editor.grid.five_columns') }}
{{ trans('filament-tiptap-editor::editor.grid.five_columns') }}
</x-filament-tiptap-editor::dropdown-button-item>
@endif

@if (in_array('fixed-two-columns', $layouts))
<x-filament-tiptap-editor::dropdown-button-item
action="editor().chain().focus().insertGrid({ cols: 2, type: 'fixed' }).run()"
>
{{ __('filament-tiptap-editor::editor.grid.fixed_two_columns') }}
{{ trans('filament-tiptap-editor::editor.grid.fixed_two_columns') }}
</x-filament-tiptap-editor::dropdown-button-item>
@endif

@if (in_array('fixed-three-columns', $layouts))
<x-filament-tiptap-editor::dropdown-button-item
action="editor().chain().focus().insertGrid({ cols: 3, type: 'fixed' }).run()"
>
{{ __('filament-tiptap-editor::editor.grid.fixed_three_columns') }}
{{ trans('filament-tiptap-editor::editor.grid.fixed_three_columns') }}
</x-filament-tiptap-editor::dropdown-button-item>
@endif

@if (in_array('fixed-four-columns', $layouts))
<x-filament-tiptap-editor::dropdown-button-item
action="editor().chain().focus().insertGrid({ cols: 4, type: 'fixed' }).run()">
{{ __('filament-tiptap-editor::editor.grid.fixed_four_columns') }}
{{ trans('filament-tiptap-editor::editor.grid.fixed_four_columns') }}
</x-filament-tiptap-editor::dropdown-button-item>
@endif

@if (in_array('fixed-five-columns', $layouts))
<x-filament-tiptap-editor::dropdown-button-item
action="editor().chain().focus().insertGrid({ cols: 5, type: 'fixed' }).run()"
>
{{ __('filament-tiptap-editor::editor.grid.fixed_five_columns') }}
{{ trans('filament-tiptap-editor::editor.grid.fixed_five_columns') }}
</x-filament-tiptap-editor::dropdown-button-item>
@endif

@if (in_array('asymmetric-left-thirds', $layouts))
<x-filament-tiptap-editor::dropdown-button-item
action="editor().chain().focus().insertGrid({ cols: 2, type: 'asymetric-left-thirds' }).run()"
>
{{ __('filament-tiptap-editor::editor.grid.asymmetric_left_thirds') }}
{{ trans('filament-tiptap-editor::editor.grid.asymmetric_left_thirds') }}
</x-filament-tiptap-editor::dropdown-button-item>
@endif

@if (in_array('asymmetric-right-thirds', $layouts))
<x-filament-tiptap-editor::dropdown-button-item
action="editor().chain().focus().insertGrid({ cols: 2, type: 'asymetric-right-thirds' }).run()"
>
{{ __('filament-tiptap-editor::editor.grid.asymmetric_right_thirds') }}
{{ trans('filament-tiptap-editor::editor.grid.asymmetric_right_thirds') }}
</x-filament-tiptap-editor::dropdown-button-item>
@endif

@if (in_array('asymmetric-left-fourths', $layouts))
<x-filament-tiptap-editor::dropdown-button-item
action="editor().chain().focus().insertGrid({ cols: 2, type: 'asymetric-left-fourths' }).run()"
>
{{ __('filament-tiptap-editor::editor.grid.asymmetric_left_fourths') }}
{{ trans('filament-tiptap-editor::editor.grid.asymmetric_left_fourths') }}
</x-filament-tiptap-editor::dropdown-button-item>
@endif

@if (in_array('asymmetric-right-fourths', $layouts))
<x-filament-tiptap-editor::dropdown-button-item
action="editor().chain().focus().insertGrid({ cols: 2, type: 'asymetric-right-fourths' }).run()"
>
{{ __('filament-tiptap-editor::editor.grid.asymmetric_right_fourths') }}
{{ trans('filament-tiptap-editor::editor.grid.asymmetric_right_fourths') }}
</x-filament-tiptap-editor::dropdown-button-item>
@endif
</x-filament-tiptap-editor::dropdown-button>
Loading

0 comments on commit 6c951f7

Please sign in to comment.