freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "T X (JIRA)" <>
Subject [jira] [Created] (FREEMARKER-97) Header capitalization using standard styles
Date Tue, 29 May 2018 17:54:00 GMT
T X created FREEMARKER-97:

             Summary: Header capitalization using standard styles
                 Key: FREEMARKER-97
             Project: Apache Freemarker
          Issue Type: Bug
          Components: engine
    Affects Versions: 2.3.28
            Reporter: T X

FreeMarker offers a couple of simple algorithms for changing the case of titles:
 * [|]
 * [|]

Neither of these capitalize the text in ways that subscribe to various manuals of style:
 * [Chicago Manual of Style|]
 * [Associated Press|]
 * [MLA Style Manual|]
 * [APA Style|]

Here are some test texts:
 * On iPhone the Transcript Extends Outside of Screen Frame
 * PEAR And GNA Report Performance
 * BCMailPlusFTPClient Sends Document without Document ID
 * JWebUnit: Non-PEN Orders main.xhtml Meta Refresh Tag Issue

These are correct as written and must not be adjusted by an algorithm that changes the text
title. There are a couple of web sites that produce the expected titles (note that the second
site capitalizes the word "without," which implies the algorithm does not use Chicago conventions):
 * []
 * []

There are a variety of implementations that perform such a feat:

These implementations do not require a whitelist. (So "iPhone" and "ClassName" will not be
corrected.) Apache Commons' {{WordUtils}} class does not implement Chicago Style correctly.

Since {{?capitalize}} and {{?cap_first}} are taken, I propose {{?title_case}} with an optional
parameter (default is Chicago):
 * chicago
 * ap
 * apa
 * mla


This message was sent by Atlassian JIRA

View raw message