You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ui): publish button shows locale-specific text without localized fields (#14690)
### What?
Updates the publish button logic to check whether a collection/global
has localized fields before displaying locale-specific button text
("Publish in [locale]").
The button now only shows locale-specific text when both conditions are
met:
1. The collection/global has localized fields
2. `localization.defaultLocalePublishOption` is set to `'active'`
### Why?
PR #13459 fixed the submenu "Publish in [specific locale]" button to not
appear on collections without localized fields, but missed updating the
main button label logic.
This caused the main publish button to display "Publish in [locale]"
even when a collection had no localized fields (when
`defaultLocalePublishOption: 'active'` was set).
### How?
- Updated `publishAll` calculation to check `canPublishSpecificLocale`
(which includes the `hasLocalizedFields` check) instead of just checking
if localization is enabled
- Changed the button label rendering from `{localization ? defaultLabel
: label}` to `{canPublishSpecificLocale ? defaultLabel : label}`
Fixes#14386
0 commit comments