transform menu: preserve cases in capitalize title (#5174)

Do not lowercase the entire title before capitalizing
the first letter of each word to preserve abbreviations
or spelling of unusual words (e.g. 3D or iPhone).

Fixes: #5165
This commit is contained in:
abaevbog 2025-03-31 22:25:34 -07:00 committed by Dan Stillman
parent ea4f5fee60
commit 9fb961fd63

View file

@ -6846,7 +6846,7 @@ var ZoteroPane = new function()
this.buildFieldTransformMenu = function ({ target, onTransform }) {
let doc = target.ownerDocument;
let value = target.value;
let valueTitleCased = Zotero.Utilities.capitalizeTitle(value.toLowerCase(), true);
let valueTitleCased = Zotero.Utilities.capitalizeTitle(value, true);
let valueSentenceCased = Zotero.Utilities.sentenceCase(value);
let menupopup = doc.createXULElement('menupopup');