diff options
author | Vitaly Ovchinnikov <v@postbox.nz> | 2023-06-17 15:23:06 +0300 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-06-29 16:25:00 +0200 |
commit | 69094e332779a71ddd47b88bced0992c290d67e7 (patch) | |
tree | b9c2b01aa7441c6eb089015c209680f5edefdae1 /contrib/ircbot/Sourcehut/plugin.py | |
parent | 320d961dc87084add8c0c254f77be7f4fc76732d (diff) | |
download | aerc-69094e332779a71ddd47b88bced0992c290d67e7.tar.gz |
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 <v@postbox.nz>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'contrib/ircbot/Sourcehut/plugin.py')
0 files changed, 0 insertions, 0 deletions