|
Post by soaringmoon on Jan 5, 2022 7:20:38 GMT
The to_title() script, incorrectly capitalizes short conjunctions, Effected are "For", "And", "Nor", "But", "Or", "Yet", and "So". (FANBOYS) As well as some short prepositions such as "If", "As", "By", "Off", "On", "Up", and "Via".
|
|
kolya
1/1 Squirrel
Posts: 58
Formerly Known As: fedosu
Color Alignment: Blue, Red, Green
|
Post by kolya on Jan 5, 2022 16:36:59 GMT
This isn't really a bug. The function just doesn't do quite what you thought it did. Title case just means that the first letter of each word is capitalized and the remaining letters of each word are not.
|
|
Sensei Le Roof
1/1 Squirrel
I was interested in Banding until they tried to make me play bass
Posts: 67
Formerly Known As: _________________
Favorite Card: Unhinged Forest #3
Favorite Set: TV
Color Alignment: White, Blue, Black, Red, Green, Colorless
|
Post by Sensei Le Roof on Jan 5, 2022 17:18:17 GMT
I'd say calling it "title case" is misleading then.
|
|
|
Post by soaringmoon on Jan 5, 2022 17:22:40 GMT
This isn't really a bug. The function just doesn't do quite what you thought it did. Title case just means that the first letter of each word is capitalized and the remaining letters of each word are not. Please don't be immediately dismissive of the problem. You attempted to correct me incorrectly. I know what title case is, and what it means. When you use this script it capitalizes every word EXCEPT for short words as described by the APA documentation. (or at least it is supposed to) APA Formatting Guidelines for Title Case Here is the script correctly NOT capitalizing the word "of".  Here is the script correctly NOT capitalizing the word "the".  Here is the script incorrectly NOT lowercasing the word "and".
|
|
kolya
1/1 Squirrel
Posts: 58
Formerly Known As: fedosu
Color Alignment: Blue, Red, Green
|
Post by kolya on Jan 5, 2022 18:49:25 GMT
Ah, interesting. It would have been clearer if you had mentioned that the function does leave some words lowercase. That isn't to lay blame for the confusion, but it would have prevented my fumble. I was relying on the documentation which states "Convert a string to title case, where each words starts with an upper case leter.[sic]" That said, to_title is one of the built in functions, so it would need to be tweaked in the application code. The project page is here.
|
|
|
Post by soaringmoon on Jan 5, 2022 21:23:06 GMT
Ah, interesting. That said, to_title is one of the built in functions, so it would need to be tweaked in the application code. The project page is here. No problem man. Thank you for the link to the code repo. I have found the offending code, and have proposed a change to it. 
|
|