feat(cabana): mail templates screen over postcard overrides

- Settings -> Mail -> Mail templates in the internal pseudo-plugin when
  postcard's Mailer is published; system.manage_mail_templates and
  system.manage_mail_layouts registered with no role grants
- MailTemplate/MailLayout models, catalog-scoped list and form, layout
  relation over file and custom layouts, no create or delete
- save stamps is_custom, base_hash and customized_at and validates the
  override through postcard.Editor inside the save transaction
- serve-start postcard.SyncIndex through lagoon.OnDatabase, retried on
  the first mail list request
- copy en/pl, README and docs; TestMailScreensSmoke/templates

Plan 35-02, task 1
This commit is contained in:
Jakub Zych
2026-11-13 11:45:13 +01:00
parent 2acf8e46c4
commit 7efb9ed7ad
13 changed files with 1046 additions and 9 deletions

View File

@@ -138,6 +138,7 @@ relation:
settings:
title: Settings
category_system: "System"
category_mail: "Mail"
empty: No settings are available.
saved: Settings saved
back: Back to settings
@@ -584,6 +585,39 @@ permissions:
manage_roles: "Manage roles"
manage_roles_comment: "Create and edit roles and the permissions they grant."
view_plugins: "View plugins"
manage_mail_templates: "Manage mail templates"
manage_mail_templates_comment: "Edit mail templates, preview them and send test messages to yourself."
manage_mail_layouts: "Manage mail layouts and branding"
manage_mail_layouts_comment: "Edit mail layouts, partials, branding and the mail image library. These change every message the application sends."
version:
available: "A new version of the admin is available."
reload: "Reload"
mail:
code: "Code"
customized_at: "Customized"
file_delete: "This comes from a plugin file and cannot be deleted. Reset it to the file version instead."
file_missing: "The file of this record is no longer installed, so it cannot be changed."
invalid_parse: "This cannot be read as a template: :message"
invalid_render: "This does not render with the sample values: :message"
invalid_unsafe: "Mail cannot contain scripts, frames, embedded objects, inline event handlers or javascript:, vbscript: or data: addresses. Found: :message"
invalid_subject_line: "The subject must be a single line."
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."
template:
name: "Mail template"
list_title: "Mail templates"
list_empty: "No mail templates in this view. Clear the search and filters."
menu_label: "Mail templates"
menu_description: "Edit the subject and content of the mail the application sends."
no_create: "Mail templates come from plugin files and cannot be created here."
tab_template: "Template"
subject: "Subject"
subject_comment: "One line. Variables such as {{ .Name }} work here too."
description: "Description"
locale: "Locale"
locale_default: "Default"
layout: "Layout"
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."

View File

@@ -148,6 +148,7 @@ relation:
settings:
title: Ustawienia
category_system: "System"
category_mail: "Poczta e-mail"
empty: Brak dostępnych ustawień.
saved: Zapisano ustawienia
back: Wróć do ustawień
@@ -620,6 +621,39 @@ permissions:
manage_roles: "Zarządzanie rolami"
manage_roles_comment: "Tworzenie i edycja ról oraz uprawnień, które nadają."
view_plugins: "Podgląd wtyczek"
manage_mail_templates: "Zarządzanie szablonami wiadomości"
manage_mail_templates_comment: "Edycja szablonów wiadomości, ich podgląd i wysyłanie wiadomości testowych do siebie."
manage_mail_layouts: "Zarządzanie układami i wyglądem wiadomości"
manage_mail_layouts_comment: "Edycja układów, fragmentów i wyglądu wiadomości oraz biblioteki obrazów. Zmiany dotyczą każdej wiadomości wysyłanej przez aplikację."
version:
available: "Dostępna jest nowa wersja panelu."
reload: "Odśwież"
mail:
code: "Kod"
customized_at: "Dostosowano"
file_delete: "To pochodzi z pliku wtyczki i nie można tego usunąć. Zamiast tego przywróć wersję z pliku."
file_missing: "Plik tego rekordu nie jest już zainstalowany, więc nie można go zmienić."
invalid_parse: "Nie można odczytać tego jako szablonu: :message"
invalid_render: "To się nie renderuje z przykładowymi wartościami: :message"
invalid_unsafe: "Wiadomość nie może zawierać skryptów, ramek, osadzonych obiektów, atrybutów zdarzeń ani adresów javascript:, vbscript: lub data:. Znaleziono: :message"
invalid_subject_line: "Temat musi mieścić się w jednym wierszu."
invalid_layout: "Wybierz układ z listy."
invalid_partial: "Fragment „:name” nie istnieje."
invalid_no_content: "Wstaw {{ .Content }} w miejscu treści."
template:
name: "Szablon wiadomości"
list_title: "Szablony wiadomości"
list_empty: "Brak szablonów wiadomości w tym widoku. Wyczyść wyszukiwanie i filtry."
menu_label: "Szablony wiadomości"
menu_description: "Edytuj temat i treść wiadomości wysyłanych przez aplikację."
no_create: "Szablony wiadomości pochodzą z plików wtyczek i nie można ich tu tworzyć."
tab_template: "Szablon"
subject: "Temat"
subject_comment: "Jeden wiersz. Zmienne, np. {{ .Name }}, działają także tutaj."
description: "Opis"
locale: "Język"
locale_default: "Domyślny"
layout: "Układ"
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."