De-capitalize judo, aikido, karate, and tae kwon do

This commit is contained in:
Domenic Denicola 2020-12-25 17:45:48 -05:00
commit ed392d8b98

View file

@ -496,9 +496,16 @@ function fixCapitalization(xml, book) {
// This is sometimes missing its capitalization.
xml = xml.replace(/the birdcage/g, "the Birdcage");
// There's no reason why these should be capitalized. (Note that they never appear at the beginning of any sentences.)
xml = xml.replace(/Halberd/g, "halberd");
xml = xml.replace(/Loft/g, "loft");
// There's no reason why these should be capitalized.
xml = xml.replace(/(?<! {2}|“)Halberd/g, "halberd");
xml = xml.replace(/(?<! {2}|“)Loft/g, "loft");
// These are treated as common nouns and not traditionally capitalized. "Krav Maga" remains capitalized,
// interestingly (according to dictionaries and Wikipedia).
xml = xml.replace(/(?<! {2}|“)Judo/g, "judo");
xml = xml.replace(/(?<! {2}|“)Aikido/g, "aikido");
xml = xml.replace(/(?<! {2}|“)Karate/g, "karate");
xml = xml.replace(/(?<! {2}|“)Tae Kwon Do/g, "tae kwon do");
// There's no reason why university should be capitalized in most contexts, although sometimes it's used as part of
// a compound noun or at the beginning of a sentence.