RealRaven2000 / SmartTemplates

Thunderbird Add-on: SmartTemplates
http://smarttemplates.quickfolders.org/
Other
25 stars 15 forks source link

Cardbook: Lookup fails when replied email address has mixed case #278

Closed RealRaven2000 closed 4 months ago

RealRaven2000 commented 5 months ago

reported over at #257 by @richanl:

One problem left: If mail-addresses in my Cardbook are stored with capitals as Hans.Mayer@, Smart template doesn't recognize it in the Mail with %recipient(addressbook,nickname)%. Do I change it to hans.mayer@, it works on my system. Same Problem with "answer": If the senders mail-address is transmitted with capitals, ST4 doesn't recognize it. The letters must be in lower case. Can you fix this behaviour?

After I talked with the author of Cardbook this morning and raised an issue on his Gitlab, It turns out that he stores all emails in lowercase (according to standard) so this means that I can safely convert the email from any AB variable to lowercase when I look up addresses from the Cardbook database. New version will follow below.

I already made a full patch where the switch (conversion to lowercase) was optional and disabled, and I also already made a UI and full translations across all languages in the advanced preferences. I guess I can throw that work away.... it would have just been a one-liner change.

RealRaven2000 commented 5 months ago

I have to modify the following string from the change log (and localize to the other 20 languages)

 {L1}New option to force lowercase emails when looking up Cardbook contacts. {L2}

Since it won't be an option anymore, it will be something like:

 {L1}Force lowercase emails when looking up Cardbook contacts. [issue 278]{L2}
richanl commented 5 months ago

It turns out that he stores all emails in lowercase (according to standard) ....

I'm not sure about this: cardbook v92.3: grafik VCARD of this: grafik

RealRaven2000 commented 5 months ago

Can you please test this new version below? I force lower case conversion on search in this one, it seems to work. Also Phillipe wrote in the Gitlab comment:

image

new version to test: smartTemplate-fx-4.4pre30.zip

I also removed the option (lcase now forced always before lookup) and updated translations in the new change log:

image

RealRaven2000 commented 4 months ago

Implemented in 4.4 - published 28/03/2024