From 69094e332779a71ddd47b88bced0992c290d67e7 Mon Sep 17 00:00:00 2001 From: Vitaly Ovchinnikov Date: Sat, 17 Jun 2023 15:23:06 +0300 Subject: templates: process reversed names better Change the behavior of `names`, `firstnames` and `initials` functions in templates so they better process names formatted like this: "Last Name, First Name" Basically, if the name contains one (and only one) comma, its parts are flipped so the first name always goes first. This helps to do "Hello Name" in templates regardless of the name format in email address. Also if the template uses a full name it will make it "Hello FirstName LastName" instead of "Hello LastName, FirstName". Add tests to cover more complex names in the future. Signed-off-by: Vitaly Ovchinnikov Acked-by: Robin Jarry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index a9db8acd..74105ee8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Changed +- Names formatted like "Last Name, First Name" are better supported in templates - Composing an email is now aborted if the text editor exits with an error (e.g. with `vim`, abort an email with `:cq`). -- cgit