From 50290774d304709cd13686334700393f6d3b5ced Mon Sep 17 00:00:00 2001 From: ilestis Date: Thu, 9 Jan 2025 10:17:56 -0600 Subject: [PATCH] Entity subpages better helper texts --- lang/en/entities/abilities.php | 2 +- lang/en/entities/attributes.php | 6 +++++- lang/en/entities/events.php | 2 +- lang/en/entities/inventories.php | 6 +++++- resources/views/components/tutorial.blade.php | 16 ++++++++-------- .../entities/pages/abilities/render.blade.php | 2 +- .../entities/pages/attributes/main.blade.php | 17 +++++++++++++---- .../entities/pages/inventory/render.blade.php | 9 ++++++++- .../entities/pages/reminders/_list.blade.php | 2 +- 9 files changed, 43 insertions(+), 19 deletions(-) diff --git a/lang/en/entities/abilities.php b/lang/en/entities/abilities.php index 31ffacf3df..dd7b48d4de 100644 --- a/lang/en/entities/abilities.php +++ b/lang/en/entities/abilities.php @@ -41,7 +41,7 @@ 'success' => 'Abilities successfully reordered', ], 'show' => [ - 'helper' => 'Attach abilities to this entity. You can always edit the visibility or remove an ability. Abilities belonging to the same parent ability will display as filter boxes.', + 'helper' => 'Attach abilities to :name to represent what powers they possess.', 'reorder' => 'Reorder', 'title' => ':name Abilities', ], diff --git a/lang/en/entities/attributes.php b/lang/en/entities/attributes.php index 1cb1b69ba6..6b4a03f548 100644 --- a/lang/en/entities/attributes.php +++ b/lang/en/entities/attributes.php @@ -93,7 +93,11 @@ 'unlock' => 'Attribute unlocked', 'unpin' => 'Attribute unpinned', ], - 'tutorial' => 'Attributes are little bits of information attached to an entity. For example, a character might have an :hp and :str stat, while a location might have a :pop one. This can easily be tracked with attributes.', + 'tutorials' => [ + 'general' => 'Attributes are little bits of information attached to :name.', + 'character' => 'For example, they might have an :hp and :str property.', + 'location' => 'For example, they might have a :pop. property.', + ], 'types' => [ 'attribute' => 'Attribute', 'block' => 'Block', diff --git a/lang/en/entities/events.php b/lang/en/entities/events.php index 05db66df6d..cd982fe90d 100644 --- a/lang/en/entities/events.php +++ b/lang/en/entities/events.php @@ -7,7 +7,7 @@ 'helpers' => [ 'characters' => 'Setting the type as either the date of birth or of death for this character will automatically calculate their age. :more.', 'founding' => 'Setting the type as :type will automatically calculate the entity\'s age since founding.', - 'no_events_v2' => 'This entity can be linked to the campaign\'s calendars through reminders, which are displayed here.', + 'reminders' => 'Reminders linked to :name will be displayed here.', ], 'show' => [ 'actions' => [ diff --git a/lang/en/entities/inventories.php b/lang/en/entities/inventories.php index d9292352a2..7e3205ea84 100644 --- a/lang/en/entities/inventories.php +++ b/lang/en/entities/inventories.php @@ -49,7 +49,11 @@ 'tooltips' => [ 'equipped' => 'This item is equipped', ], - 'tutorial' => 'Keep track of what an entity possesses with by adding items to its inventory.', + 'tutorials' => [ + 'character' => 'Keep track of what :name possesses or has for sale by adding items to their inventory.', + 'location' => 'Keep track of what :name has for sale or to loot by adding items to its inventory.', + 'other' => 'Keep track of what :name possesses by adding items to its inventory.', + ], 'update' => [ 'success' => 'Item :item updated for :entity.', 'title' => 'Update an item on :name', diff --git a/resources/views/components/tutorial.blade.php b/resources/views/components/tutorial.blade.php index ea2238e74d..12e8d374b8 100644 --- a/resources/views/components/tutorial.blade.php +++ b/resources/views/components/tutorial.blade.php @@ -1,15 +1,15 @@ -
@auth @endauth - {!! $slot !!} - - @if (!empty($doc)) -

- {!! __('crud.helpers.learn_more', ['documentation' => ' ' . __('footer.documentation') . '']) !!} -

- @endif +
+ {!! $slot !!} + @if (!empty($doc)) +

+ {!! __('crud.helpers.learn_more', ['documentation' => ' ' . __('footer.documentation') . '']) !!} +

+ @endif +
diff --git a/resources/views/entities/pages/abilities/render.blade.php b/resources/views/entities/pages/abilities/render.blade.php index 125d6d69b7..c5608055bb 100644 --- a/resources/views/entities/pages/abilities/render.blade.php +++ b/resources/views/entities/pages/abilities/render.blade.php @@ -1,4 +1,4 @@ -

{{ __('entities/abilities.show.helper') }}

+

{!! __('entities/abilities.show.helper', ['name' => $entity->name]) !!}

@include('entities.pages.abilities._abilities') diff --git a/resources/views/entities/pages/attributes/main.blade.php b/resources/views/entities/pages/attributes/main.blade.php index 5a365e8d68..9390be5dcf 100644 --- a/resources/views/entities/pages/attributes/main.blade.php +++ b/resources/views/entities/pages/attributes/main.blade.php @@ -1,9 +1,18 @@ + -

{!! __('entities/attributes.tutorial', [ - 'hp' => 'HP', - 'str' => 'STR', - 'pop' => 'Population', +

{!! __('entities/attributes.tutorials.general', [ + 'name' => $entity->name, ]) !!}

+ @if ($entity->isCharacter()) +

{!! __('entities/attributes.tutorials.character', [ + 'hp' => 'HP', + 'str' => 'STR', + ]) !!}

+ @elseif ($entity->isLocation()) +

{!! __('entities/attributes.tutorials.location', [ + 'pop' => 'Population', + ]) !!}

+ @endif
@include('entities.pages.attributes.render') diff --git a/resources/views/entities/pages/inventory/render.blade.php b/resources/views/entities/pages/inventory/render.blade.php index 067d55d5f2..ea4998065c 100644 --- a/resources/views/entities/pages/inventory/render.blade.php +++ b/resources/views/entities/pages/inventory/render.blade.php @@ -1,4 +1,11 @@ + -

{{ __('entities/inventories.tutorial') }}

+ @if ($entity->isCharacter()) +

{!! __('entities/inventories.tutorials.character', ['name' => $entity->name]) !!}

+ @elseif ($entity->isLocation()) +

{!! __('entities/inventories.tutorials.location', ['name' => $entity->name]) !!}

+ @else +

{!! __('entities/inventories.tutorials.other', ['name' => $entity->name]) !!}

+ @endif
@include('entities.pages.inventory.grid') diff --git a/resources/views/entities/pages/reminders/_list.blade.php b/resources/views/entities/pages/reminders/_list.blade.php index 6ee806fad7..590c8fcc0f 100644 --- a/resources/views/entities/pages/reminders/_list.blade.php +++ b/resources/views/entities/pages/reminders/_list.blade.php @@ -1,5 +1,5 @@ -

{{ __('entities/events.helpers.no_events_v2') }}

+

{!! __('entities/events.helpers.reminders', ['name' => $entity->name]) !!}

@if ($rows->count() > 0)