Skip to content

Commit

Permalink
Add missing translations for CP reactions
Browse files Browse the repository at this point in the history
  • Loading branch information
tobyzerner committed Dec 30, 2023
1 parent ebdc25b commit 3ec22f8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
8 changes: 7 additions & 1 deletion lang/en/cp.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,17 @@ reaction-sets-title = Reaction Sets
create-reaction-set-button = Create Reaction Set
edit-reaction-set-title = Edit Reaction Set
create-reaction-set-title = Create a Reaction Set
reaction-set-details-title = Details
reaction-set-name-label = Name
reaction-set-reactions-label = Reactions
reaction-set-usage-label = Usage
reaction-set-default-posts = Use as default for posts
reaction-set-default-comments = Use as default for comments
delete-reaction-set-confirm-message = Are you sure you want to delete this reaction set?
reaction-set-saved-message = Reaction set saved.
reaction-types-title = Reaction Types
reaction-types-empty-message = No Reaction Types
reaction-types-add-button = Add
edit-reaction-type-title = Edit Reaction Type
create-reaction-type-title = Create a Reaction Type
reaction-type-name-label = Name
Expand Down
16 changes: 12 additions & 4 deletions resources/views/cp/reactions/reaction-set.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
<x-waterhole::validation-errors />

<details class="card" open>
<summary class="card__header h5">Details</summary>
<summary class="card__header h5">
{{ __('waterhole::cp.reaction-set-details-title') }}
</summary>

<form
method="POST"
action="{{
Expand Down Expand Up @@ -53,7 +56,10 @@ class="card__body"

@isset($reactionSet)
<details class="card" open>
<summary class="card__header h5">Reaction Types</summary>
<summary class="card__header h5">
{{ __('waterhole::cp.reaction-types-title') }}
</summary>

<turbo-frame id="reaction-types">
<div class="card__body stack gap-md">
<x-waterhole::cp.sortable-context
Expand All @@ -67,7 +73,9 @@ class="card sortable"
aria-label="{{ __('waterhole::cp.reaction-set-reactions-label') }}"
>
@empty($reactionSet->reactionTypes->load('reactionSet'))
<li class="placeholder">No Reaction Types</li>
<li class="placeholder">
{{ __('waterhole::cp.reaction-types-empty-message') }}
</li>
@else
@foreach ($reactionSet->reactionTypes->load('reactionSet') as $reactionType)
<li
Expand Down Expand Up @@ -118,7 +126,7 @@ class="btn"
data-turbo-frame="modal"
>
@icon('tabler-plus')
Add
{{ __('waterhole::cp.reaction-types-add-button') }}
</a>
</div>
</div>
Expand Down
8 changes: 5 additions & 3 deletions src/Forms/Fields/ReactionSetDefaults.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,20 @@ public function render(): string
{
return <<<'blade'
<div class="field">
<div class="field__label">Usage</div>
<div class="field__label">
{{ __('waterhole::cp.reaction-set-usage-label') }}
</div>
<div class="stack gap-sm">
<label class="choice">
<input type="hidden" name="is_default_posts" value="0">
<input type="checkbox" name="is_default_posts" value="1" @checked($model->is_default_posts)>
Use as default for posts
{{ __('waterhole::cp.reaction-set-default-posts') }}
</label>
<label class="choice">
<input type="hidden" name="is_default_comments" value="0">
<input type="checkbox" name="is_default_comments" value="1" @checked($model->is_default_comments)>
Use as default for comments
{{ __('waterhole::cp.reaction-set-default-comments') }}
</label>
</div>
</div>
Expand Down

0 comments on commit 3ec22f8

Please sign in to comment.