From 6eb300b080c06d456d7df8e39fe6d2ea9bc86a84 Mon Sep 17 00:00:00 2001 From: Jack McDade Date: Thu, 2 May 2024 14:19:05 -0400 Subject: [PATCH 1/2] Add help text for the Multi-Site config form --- resources/lang/en/messages.php | 6 ++++++ src/Sites/Sites.php | 13 +++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/resources/lang/en/messages.php b/resources/lang/en/messages.php index 3214bb5146..ce2ecc72ac 100644 --- a/resources/lang/en/messages.php +++ b/resources/lang/en/messages.php @@ -199,6 +199,12 @@ 'session_expiry_logging_out_in_seconds' => 'You have been inactive for a while and will be logged out in :seconds seconds. Click to extend your session.', 'session_expiry_new_window' => 'Opens in a new window. Come back once you\'ve logged in.', 'show_slugs_instructions' => 'Whether to display slugs in the tree view.', + 'site_configure_attributes_instructions' => 'Add arbitrary attributes to your site\'s config which can be accessed in your templates. [Learn more](https://statamic.dev/multi-site#additional-attributes).', + 'site_configure_handle_instructions' => 'A unique reference to this site. Non-trivial to change later.', + 'site_configure_lang_instructions' => 'Learn about [Languages](https://statamic.dev/multi-site#language).', + 'site_configure_locale_instructions' => 'Learn about [Locales](https://statamic.dev/multi-site#locale).', + 'site_configure_name_instructions' => 'User-facing name shown throughout the control panel.', + 'site_configure_url_instructions' => 'Learn about [Multi-Site URLs](https://statamic.dev/multi-site#urlhttps://statamic.dev/multi-site#url).', 'status_expired_with_date' => 'Expired on :date', 'status_published_with_date' => 'Published on :date', 'status_scheduled_with_date' => 'Scheduled to be published on :date', diff --git a/src/Sites/Sites.php b/src/Sites/Sites.php index 8ed35aee50..d3d2b6f772 100644 --- a/src/Sites/Sites.php +++ b/src/Sites/Sites.php @@ -148,6 +148,7 @@ public function blueprint() 'handle' => 'name', 'field' => [ 'type' => 'text', + 'instructions' => __('statamic::messages.site_configure_name_instructions'), 'required' => true, 'width' => 50, ], @@ -158,6 +159,7 @@ public function blueprint() 'type' => 'slug', 'separator' => '_', 'generate' => true, + 'instructions' => __('statamic::messages.site_configure_handle_instructions'), 'show_regenerate' => true, 'from' => 'name', 'required' => true, @@ -168,28 +170,35 @@ public function blueprint() 'handle' => 'url', 'field' => [ 'type' => 'text', + 'instructions' => __('statamic::messages.site_configure_url_instructions'), 'required' => true, + 'width' => 33, ], ], [ 'handle' => 'locale', 'field' => [ 'type' => 'text', + 'instructions' => __('statamic::messages.site_configure_locale_instructions'), 'required' => true, - 'width' => 50, + 'width' => 33, ], ], [ 'handle' => 'lang', 'field' => [ 'type' => 'text', - 'width' => 50, + 'instructions' => __('statamic::messages.site_configure_lang_instructions'), + 'width' => 33, ], ], [ 'handle' => 'attributes', 'field' => [ + 'display' => __('Custom Attributes'), + 'instructions' => __('statamic::messages.site_configure_attributes_instructions'), 'type' => 'array', + 'add_button' => __('Add Attribute'), ], ], ]; From db39b4340b16dc22e20a5f92d3246ae5a157fccd Mon Sep 17 00:00:00 2001 From: Jack McDade Date: Thu, 2 May 2024 14:37:08 -0400 Subject: [PATCH 2/2] Don't say Multi cuz it ain't always --- resources/lang/en/messages.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/en/messages.php b/resources/lang/en/messages.php index ce2ecc72ac..5c2abdf154 100644 --- a/resources/lang/en/messages.php +++ b/resources/lang/en/messages.php @@ -204,7 +204,7 @@ 'site_configure_lang_instructions' => 'Learn about [Languages](https://statamic.dev/multi-site#language).', 'site_configure_locale_instructions' => 'Learn about [Locales](https://statamic.dev/multi-site#locale).', 'site_configure_name_instructions' => 'User-facing name shown throughout the control panel.', - 'site_configure_url_instructions' => 'Learn about [Multi-Site URLs](https://statamic.dev/multi-site#urlhttps://statamic.dev/multi-site#url).', + 'site_configure_url_instructions' => 'Learn about [Site URLs](https://statamic.dev/multi-site#urlhttps://statamic.dev/multi-site#url).', 'status_expired_with_date' => 'Expired on :date', 'status_published_with_date' => 'Published on :date', 'status_scheduled_with_date' => 'Scheduled to be published on :date',