OpenTechStrategies / torque-sites

Open source code specific to OTS-managed Torque sites (usually client sites).
3 stars 1 forks source link

Production wikis still showing case-only Category differences. #43

Open kfogel opened 7 years ago

kfogel commented 7 years ago

Although issue #39 is resolved, the production wikis (yes, both of them) still show Categories that differ only by case. For example:

Health and Well-being, Communicable Diseases‏‎ (28 members)
Health and Well-being: Communicable Diseases‏‎ (8 members)
Health and Well-Being, Communicable Diseases‏‎ (95 members)
Health and Well-being, Diagnostics‏‎ (20 members)
Health and Well-Being, Diagnostics‏‎ (18 members)
Health and Well-being, Mental Health‏‎ (45 members)
Health and Well-Being, Mental Health‏‎ (69 members)
Health and Well-being, Non-communicable Diseases‏‎ (42 members)
Health and Well-being, Non-Communicable Diseases‏‎ (10 members)
Health and Well-Being, Non-communicable Diseases‏‎ (116 members)
Health and Well-being, Other, not elsewhere listed‏‎ (56 members)
Health and Well-being, Other, Not Elsewhere Listed‏‎ (132 members)
Health and Well-Being, Other, Not Elsewhere Listed‏‎ (274 members)
Health and Well-being, Population and Reproductive Health‏‎ (16 members)
Health and Well-being: Population and Reproductive Health‏‎ (18 members)
Health and Well-Being, Population and Reproductive Health‏‎ (51 members)

I'm not sure why this is, since we (supposedly) deleted all the obsolete pages and rebuilt categories on August 12th.

kfogel commented 7 years ago

Okay, the issue appears to be words that come directly after hyphens:

$ python3
Python 3.5.4rc1 (default, Jul 25 2017, 08:53:34) 
[GCC 6.4.0 20170704] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import string
>>> string.capwords("Health and Well-being, Mental Health")
'Health And Well-being, Mental Health'
>>> string.capwords("Health and Well being, Mental Health")
'Health And Well Being, Mental Health'
>>> ^D
$ 

Another tweak to fix-csv coming up.