A platform for community discussion. Free, open, simple.
UX: Improve copy for restricted category tags (#34240)
Martin Brennan2255b4f5db31
diff --git a/app/assets/javascripts/discourse/app/components/edit-category-tags.gjs b/app/assets/javascripts/discourse/app/components/edit-category-tags.gjsindex 4064f1f5312..f6f20d2ca4f 100644--- a/app/assets/javascripts/discourse/app/components/edit-category-tags.gjs+++ b/app/assets/javascripts/discourse/app/components/edit-category-tags.gjs@@ -48,7 +48,13 @@ export default class EditCategoryTags extends buildCategoryPanel("tags") {/></section><section class="field allowed-tags">- <label>{{i18n "category.tags_allowed_tags"}}</label>+ <label>+ {{#if this.category.id}}+ {{i18n "category.tags_allowed_tags" categoryName=this.category.name}}+ {{else}}+ {{i18n "category.tags_allowed_tags_new_category"}}+ {{/if}}+ </label><TagChooser@id="category-allowed-tags"@tags={{this.category.allowed_tags}}@@ -61,7 +67,16 @@ export default class EditCategoryTags extends buildCategoryPanel("tags") {</section><section class="field allowed-tag-groups">- <label>{{i18n "category.tags_allowed_tag_groups"}}</label>+ <label>+ {{#if this.category.id}}+ {{i18n+ "category.tags_allowed_tag_groups"+ categoryName=this.category.name+ }}+ {{else}}+ {{i18n "category.tags_allowed_tag_groups_new_category"}}+ {{/if}}+ </label><TagGroupChooser@id="category-allowed-tag-groups"@tagGroups={{this.category.allowed_tag_groups}}diff --git a/app/assets/stylesheets/common/base/edit-category.scss b/app/assets/stylesheets/common/base/edit-category.scssindex b411e4131a1..da3a57ea167 100644--- a/app/assets/stylesheets/common/base/edit-category.scss+++ b/app/assets/stylesheets/common/base/edit-category.scss@@ -1,7 +1,7 @@@use "lib/viewport";@use "sass:string";-$category-settings-width: string.unquote("min(500px, 90%)");+$category-settings-width: string.unquote("min(600px, 90%)");$number-input-width: 75px;div.edit-category {diff --git a/config/locales/client.en.yml b/config/locales/client.en.ymlindex 6c9f47b050e..416562f3ead 100644--- a/config/locales/client.en.yml+++ b/config/locales/client.en.yml@@ -4397,8 +4397,10 @@ en:add: "Add new locale"remove: "Remove"hint: "There are currently no localizations for this category. Click 'Add new locale' below to begin adding localizations."- tags_allowed_tags: "Restrict these tags to this category:"- tags_allowed_tag_groups: "Restrict these tag groups to this category:"+ tags_allowed_tags: "Restrict these tags to the '%{categoryName}' category:"+ tags_allowed_tags_new_category: "Restrict these tags to this category:"+ tags_allowed_tag_groups: "Restrict these tag groups to the '%{categoryName}' category:"+ tags_allowed_tag_groups_new_category: "Restrict these tag groups to this category:"tags_placeholder: "(Optional) list of allowed tags"tags_tab_description: "Tags and tag groups specified above will only be available in this category and other categories that also specify them. They won't be available for use in other categories."tag_groups_placeholder: "(Optional) list of allowed tag groups"