A platform for community discussion. Free, open, simple.
UX: Add translation button changes tooltip over icon color (#34901)
Keegan Georged093a698c6a7
diff --git a/app/assets/javascripts/discourse/app/components/post/menu/buttons/add-translation.gjs b/app/assets/javascripts/discourse/app/components/post/menu/buttons/add-translation.gjsindex 2bf5a873653..16bfe0ce135 100644--- a/app/assets/javascripts/discourse/app/components/post/menu/buttons/add-translation.gjs+++ b/app/assets/javascripts/discourse/app/components/post/menu/buttons/add-translation.gjs@@ -27,6 +27,16 @@ export default class PostMenuAddTranslationButton extends Component {);}+ get addTranslationsLabel() {+ if (this.showAsMenu) {+ return i18n("post.localizations.manage", {+ count: this.args.post.post_localizations_count,+ });+ }++ return i18n("post.localizations.add");+ }+get viewTranslationLabel() {return i18n("post.localizations.view", {count: this.args.post.post_localizations_count,@@ -81,7 +91,7 @@ export default class PostMenuAddTranslationButton extends Component {...attributes@identifier="post-action-menu-edit-translations"class="update-translations-menu"- @title={{i18n "post.localizations.add"}}+ @title={{this.addTranslationsLabel}}@icon="discourse-add-translation"@onRegisterApi={{this.onRegisterApi}}@arrow={{false}}diff --git a/app/assets/stylesheets/common/components/post-translations.scss b/app/assets/stylesheets/common/components/post-translations.scssindex 1a9f0e7506e..1391ed0db5d 100644--- a/app/assets/stylesheets/common/components/post-translations.scss+++ b/app/assets/stylesheets/common/components/post-translations.scss@@ -4,12 +4,6 @@}}-.update-translations-menu {- .d-icon {- color: var(--quaternary);- }-}-.post-language-selector-content {z-index: z("composer", "dropdown");diff --git a/config/locales/client.en.yml b/config/locales/client.en.ymlindex a34afc0e9a6..009454293c5 100644--- a/config/locales/client.en.yml+++ b/config/locales/client.en.yml@@ -4163,6 +4163,7 @@ en:edit: "Edit"delete: "Delete"add: "Add new translation"+ manage: "Manage translations (%{count} existing)"view:one: "View %{count} translated locale"other: "View %{count} translated locales"