Skip to content

Status button: use custom status label also for title #7043

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bezin opened this issue Mar 4, 2025 · 4 comments
Open

Status button: use custom status label also for title #7043

bezin opened this issue Mar 4, 2025 · 4 comments

Comments

@bezin
Copy link
Contributor

bezin commented Mar 4, 2025

Description

The change status button title attribute is not translated according to the page blueprint. It still contains the German label Ungelistet for unlisted status, wheras I set label and text to be something else. This also happens for the other translated label, too (listed => Freigegeben)

Expected behavior
The button text and title communicate the same status.

Screenshot

Image

To reproduce

  1. Have a page blueprint with the following status configuration:
status:
  draft:
    label: Entwurf
    text: Im Entwurfstadium können Sie die Inhalte frei bearbeiten
  unlisted:
    label: In Prüfung
    text: Ihre Inhalte werden geprüft und ggf. redaktionell bearbeitet. Sie können nun keine Änderungen mehr vornehmen
  listed:
    label: Freigegeben
    text: Ihre Inhalte sind für das Programm freigegeben
  1. Edit the page in the panel and change status to In Prüfung
  2. Hover over the change status button with your pointer

The title attribute shows Ungelistet rather than In Prüfung.

Your setup

Kirby 4.6.1
MacOS 15.3.1
PHP 8.4

@bezin
Copy link
Contributor Author

bezin commented Mar 12, 2025

This also applies to the status indicator in the pages section:

Image

@afbora
Copy link
Member

afbora commented Mar 13, 2025

@getkirby/backend If we read the blueprint for each model ($page->blueprint()) in the sections data prop and send it to Vue, will we experience performance issues? Or could the blueprint already be read and kept in the cache?

@distantnative
Copy link
Member

I think there performance concerns is why we haven't done it so far. But not sure we actually tested the performance impact.

@distantnative distantnative changed the title Title of change status button is not translated according to page blueprint Status button: use custom status label also for title Mar 29, 2025
@distantnative
Copy link
Member

I just checked again: for the status view button this does work in Kirby 5:
Image

But in sections, it isn't working in Kirby 5 either - and this might be a performance bottleneck if there are pages with many different blueprints in a section and all have to be read (at least currently where we aren't reading blueprints more lazily).

I would say to be further explored after release of 5.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants