Jump to content

User:ZKang123/TitleCaseConverter

From Wikipedia, the free encyclopedia
TitleCaseConverter
DescriptionConverts Reference Titles in Title Case.
Author(s)ZKang123 (talk · contribs)
UpdatedJune 13, 2024
    (9 days ago)
Skin supportminerva, modern, monobook, timeless, vector, vector-2022
SourceUser:ZKang123/TitleCaseConverter.js

This is a script that converts all reference titles to title case. This was created largely because at the Featured Article Candidate (FAC) stage, the FAC coordinators would often suggest before promoting that reference titles "should be either in sentence case or title case" regardless of "how they appear in their originals" (per MOS:CONFORM). As it would be cumbersome for one to go over 50+ references in an article and use other tools to convert each reference title manually to title case (such as Capitalizemytitle or Title Case Converter), I decided to write up this userscript so that the process would be much quicker.

Please note that there might still be some bugs in the script, but test cases have been largely successful thanks to guidance from Novem Linguae. Always click "Show changes" to see what has been changed before clicking "Publish page". The rules for title case in Wikipedia are taken from MOS:CT.

Installation[edit]

It is highly recommended to install User:Enterprisey/script-installer first. Come back to this page and click the giant blue "Install" button in the infobox on the right.

Or install it manually by adding the below code to your Special:MyPage/common.js file.

{{subst:iusc|User:ZKang123/TitleCaseConverter.js}}

Bugs and feature requests[edit]

Your feedback is essential. Please report all bugs and feature requests on the talk page. This is my first experience with Javascript, so be nice.

Current bugs to deal with (as of 17 June 2024)[edit]

  • All caps remaining in all caps
    • Might have to add a separate function/option to toggle between converting all caps or not
  • Possibly adding a sentence case function
  • "Error: Sidebar section not found" in mobile view.