Title conversion to sentence case should preserve cases in certain words

I just noticed the new nice possibility to right click on a title in Zotero and have it converted to "sentence case".

However I think it should preserve case of some words, for example "ADHD" is commonly written that way.
  • the option isn't new - it's been around forever - it was just improved somewhat. We could consider protecting acronyms, but it gets tricky pretty fast, e.g. we'd probably want to keep this alive for strings in all caps. And obviously users would always have to correct proper nouns.
  • edited March 24, 2014
    Thanks, I never noticed the possibility before. I saw it some days ago in your post on The Zoteroist.

    A common list + a user list is what is needed I guess. Does it have to be very tricky?

    It could also be very useful to preserve upper case on words in uppercase only - if not the whole title is in upper case. (What programming language is used when doing the case conversion?)
  • I don't think a list makes much sense - there are simply too many possibilities.

    It could also be very useful to preserve upper case on words in uppercase only - if not the whole title is in upper case. (What programming language is used when doing the case conversion?)
    yes, that'd be the way to handle acronyms. Like all of the Zotero client, the code is in javascript. You can find the relevant sections by digging through the (closed) pull requests prior to the 4.0.18 release.
  • Checked out the source but could not find the function doing sentence case and taking care of the colon too.

    I think this fiddle here does the right thing:

    http://jsfiddle.net/lborgman/EppPj/1/
Sign In or Register to comment.