feat(cabana): mail layouts and partials screens with reset, drift and custom layouts

- Layouts and partials controllers with catalog scoping, reset action and File version diff
- Custom layout create/delete with in-use refusal; meta.deletable and customized/outdated row states
- List schema golden fixtures updated for the two new row-state message keys

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-13 12:33:20 +01:00
parent 7efb9ed7ad
commit 83f76cc3f7
35 changed files with 1868 additions and 18 deletions

View File

@@ -230,6 +230,8 @@ messages:
row_state_deleted: Deleted
row_state_negative: Blocked
row_state_disabled: Inactive
row_state_customized: Customized
row_state_outdated: File changed
form:
create: New record
update: Edit record
@@ -604,6 +606,34 @@ mail:
invalid_layout: "Choose a layout from the list."
invalid_partial: "The partial “:name” does not exist."
invalid_no_content: "Put {{ .Content }} where the message goes."
name_field: "Name"
source: "Source"
source_custom: "Custom"
filter_status: "Status"
filter_customized: "Customized"
filter_not_customized: "Not customized"
filter_outdated: "File changed"
state_customized: "Customized"
state_outdated: "File changed"
tab_file_version: "File version"
info_description: "Description: :text"
info_file: "File: :path in :plugin"
info_not_customized: "Not customized. The form shows the file version; saving creates your version."
info_customized: "Customized. Your version is sent instead of the file."
info_custom_layout: "Custom layout. It exists only in the database and can be deleted."
info_variables: "Variables with sample values:"
info_no_samples: "This file declares no sample values. Variables show as [name] in the preview."
info_partial_usage: "Use it in a template or layout with:"
drift_title: "The file changed after this was customized"
drift_text: "A plugin update changed the file. Your version is still sent. Compare both on the File version tab, then save your version again to mark the change as reviewed, or reset to the file version."
file_changes: "Changes from the file"
file_legend: "Lines starting with + are only in your version. Lines starting with − are only in the file."
file_content: "File version"
file_identical: "Your version matches the file."
file_not_customized: "Not customized: the form already shows this version."
reset: "Reset to file version"
reset_done: "Reset to the file version."
reset_unavailable: "There is no customized version to reset."
template:
name: "Mail template"
list_title: "Mail templates"
@@ -621,3 +651,42 @@ mail:
layout_comment: "The layout wraps the message. Custom layouts are listed too."
body: "Message"
body_comment: "Markdown with variables such as {{ .Name }}. The plain-text version is made from it automatically."
reset_confirm: "Reset this template to the file version? Your subject, message and layout choice are deleted, and unsaved edits on this page are discarded. This cannot be undone."
layout:
name: "Mail layout"
new: "New layout"
list_title: "Mail layouts"
list_empty: "No layouts in this view. Clear the search, or create a layout."
menu_label: "Mail layouts"
menu_description: "Edit the layouts that wrap every message, or create your own."
tab_html: "HTML"
tab_text: "Plain text"
tab_css: "CSS"
code_comment: "Templates refer to the layout by this code. It cannot be changed later."
html: "HTML layout"
html_comment: "Wraps the HTML message. Put {{ .Content }} where the message goes."
text: "Plain-text layout"
text_comment: "Wraps the plain-text message. Put {{ .Content }} where the message goes."
css: "CSS"
css_comment: "Styles for this layout. They are inlined into the HTML message after the branding styles."
delete_confirm: "Delete this layout? This cannot be undone. A layout that customized templates still use cannot be deleted."
reset_confirm: "Reset this layout to the file version? Your HTML, plain-text and CSS changes are deleted, and unsaved edits on this page are discarded. This cannot be undone."
delete_in_use:
one: "The layout “:name” is used by :count customized template. Choose another layout for it first."
other: "The layout “:name” is used by :count customized templates. Choose another layout for them first."
code_taken: "This code is already used by another layout."
code_format: "Use lowercase letters, digits and dashes only."
partial:
name: "Mail partial"
list_title: "Mail partials"
list_empty: "No partials in this view. Clear the search."
menu_label: "Mail partials"
menu_description: "Edit the reusable blocks used in mail, such as buttons and panels."
no_create: "Mail partials come from plugin files and cannot be created here."
tab_html: "HTML"
tab_text: "Plain text"
html: "HTML"
html_comment: "Used in the HTML part of messages."
text: "Plain text"
text_comment: "Used in the plain-text part of messages."
reset_confirm: "Reset this partial to the file version? Your HTML and plain-text changes are deleted, and unsaved edits on this page are discarded. This cannot be undone."

View File

@@ -246,6 +246,8 @@ messages:
row_state_deleted: Usunięty
row_state_negative: Zablokowany
row_state_disabled: Nieaktywny
row_state_customized: Dostosowany
row_state_outdated: Plik zmieniony
form:
create: Nowy rekord
update: Edycja rekordu
@@ -640,6 +642,34 @@ mail:
invalid_layout: "Wybierz układ z listy."
invalid_partial: "Fragment „:name” nie istnieje."
invalid_no_content: "Wstaw {{ .Content }} w miejscu treści."
name_field: "Nazwa"
source: "Źródło"
source_custom: "Własny"
filter_status: "Status"
filter_customized: "Dostosowane"
filter_not_customized: "Niedostosowane"
filter_outdated: "Plik zmieniony"
state_customized: "Dostosowany"
state_outdated: "Plik zmieniony"
tab_file_version: "Wersja z pliku"
info_description: "Opis: :text"
info_file: "Plik: :path we wtyczce :plugin"
info_not_customized: "Nie dostosowano. Formularz pokazuje wersję z pliku; zapisanie utworzy Twoją wersję."
info_customized: "Dostosowano. Zamiast pliku wysyłana jest Twoja wersja."
info_custom_layout: "Układ własny. Istnieje tylko w bazie danych i można go usunąć."
info_variables: "Zmienne z przykładowymi wartościami:"
info_no_samples: "Ten plik nie deklaruje przykładowych wartości. W podglądzie zmienne są pokazane jako [nazwa]."
info_partial_usage: "Użyj go w szablonie lub układzie tak:"
drift_title: "Plik zmienił się po dostosowaniu"
drift_text: "Aktualizacja wtyczki zmieniła plik. Nadal wysyłana jest Twoja wersja. Porównaj obie w zakładce Wersja z pliku, a potem zapisz swoją wersję ponownie, aby oznaczyć zmianę jako sprawdzoną, albo przywróć wersję z pliku."
file_changes: "Zmiany względem pliku"
file_legend: "Wiersze zaczynające się od + są tylko w Twojej wersji. Wiersze zaczynające się od − są tylko w pliku."
file_content: "Wersja z pliku"
file_identical: "Twoja wersja jest zgodna z plikiem."
file_not_customized: "Nie dostosowano: formularz pokazuje już tę wersję."
reset: "Przywróć wersję z pliku"
reset_done: "Przywrócono wersję z pliku."
reset_unavailable: "Nie ma dostosowanej wersji do przywrócenia."
template:
name: "Szablon wiadomości"
list_title: "Szablony wiadomości"
@@ -657,3 +687,44 @@ mail:
layout_comment: "Układ otacza wiadomość. Na liście są też układy własne."
body: "Treść"
body_comment: "Markdown ze zmiennymi, np. {{ .Name }}. Wersja tekstowa powstaje z niej automatycznie."
reset_confirm: "Przywrócić wersję szablonu z pliku? Twój temat, treść i wybór układu zostaną usunięte, a niezapisane zmiany na tej stronie odrzucone. Tej operacji nie można cofnąć."
layout:
name: "Układ wiadomości"
new: "Nowy układ"
list_title: "Układy wiadomości"
list_empty: "Brak układów w tym widoku. Wyczyść wyszukiwanie lub utwórz układ."
menu_label: "Układy wiadomości"
menu_description: "Edytuj układy otaczające każdą wiadomość lub utwórz własne."
tab_html: "HTML"
tab_text: "Zwykły tekst"
tab_css: "CSS"
code_comment: "Szablony odwołują się do układu przez ten kod. Później nie można go zmienić."
html: "Układ HTML"
html_comment: "Otacza wiadomość HTML. Wstaw {{ .Content }} w miejscu treści."
text: "Układ tekstowy"
text_comment: "Otacza wiadomość tekstową. Wstaw {{ .Content }} w miejscu treści."
css: "CSS"
css_comment: "Style tego układu. Są wstawiane do wiadomości HTML po stylach wyglądu."
delete_confirm: "Usunąć ten układ? Tej operacji nie można cofnąć. Nie można usunąć układu, którego używają dostosowane szablony."
reset_confirm: "Przywrócić wersję układu z pliku? Twoje zmiany HTML, tekstu i CSS zostaną usunięte, a niezapisane zmiany na tej stronie odrzucone. Tej operacji nie można cofnąć."
delete_in_use:
one: "Układ „:name” jest używany przez :count dostosowany szablon. Najpierw wybierz dla niego inny układ."
few: "Układ „:name” jest używany przez :count dostosowane szablony. Najpierw wybierz dla nich inny układ."
many: "Układ „:name” jest używany przez :count dostosowanych szablonów. Najpierw wybierz dla nich inny układ."
other: "Układ „:name” jest używany przez :count dostosowanego szablonu. Najpierw wybierz dla nich inny układ."
code_taken: "Ten kod jest już używany przez inny układ."
code_format: "Używaj tylko małych liter, cyfr i myślników."
partial:
name: "Fragment wiadomości"
list_title: "Fragmenty wiadomości"
list_empty: "Brak fragmentów w tym widoku. Wyczyść wyszukiwanie."
menu_label: "Fragmenty wiadomości"
menu_description: "Edytuj bloki wielokrotnego użytku w wiadomościach, np. przyciski i panele."
no_create: "Fragmenty wiadomości pochodzą z plików wtyczek i nie można ich tu tworzyć."
tab_html: "HTML"
tab_text: "Zwykły tekst"
html: "HTML"
html_comment: "Używany w części HTML wiadomości."
text: "Zwykły tekst"
text_comment: "Używany w części tekstowej wiadomości."
reset_confirm: "Przywrócić wersję fragmentu z pliku? Twoje zmiany HTML i tekstu zostaną usunięte, a niezapisane zmiany na tej stronie odrzucone. Tej operacji nie można cofnąć."