[pve-devel] [PATCH many v3 0/8] notifications: move template strings to template files

Maximiliano Sandoval m.sandoval at proxmox.com
Wed May 29 14:29:20 CEST 2024


ping.

Its not possible to build proxmox-perl-rs at the moment without this
patch series.

Lukas Wagner <l.wagner at proxmox.com> writes:

> These changes adapts the PVE notification stack to the changes introduced
> in proxmox-notify 0.4.
>
> The notification system uses handlebar templates to render the subject
> and the body of notifications. Previously, the template strings were
> defined inline at the call site. This patch series extracts the templates
> into template files and installs them at
>   /usr/share/pve-manager/templates/default
>
> where they stored as <template-name>-{body,subject}.{txt,html}.hbs
>
> The 'default' part in the path is a preparation for translated
> notifications and/or overridable notification templates.
> Future work could provide notifications translated to e.g. German
> in `templates/de` or similar. This will be a first for having
> translated strings on the backend-side, so there is need for further
> research.
>
> Folke kindly did some off-list testing before this was posted, hence
> his T-bs were included.
>
> Bumps/dependencies:
>   - libproxmox-rs-perl needs to have its proxmox-notify dep updated to 0.4
>     and breaks old libpve-notify-perl (versioned break)
>   - libpve-notify-perl breaks old pve-manager and old pve-ha-manager (versioned break)
>
> The versioned breaks are necessary due to changed semantics in the API (passing
> a template name instead of template strings) and due to changes in how
> templates are rendered (separate templates for HTML/plain text, whereas before
> both were rendered from the same template string, with some magic from
> handlebar helpers)

-- 
Maximiliano




More information about the pve-devel mailing list