Skip to content

Always capitalize 'Mc'-prefixed small words in compound word groups#65

Merged
ppannuto merged 1 commit into
ppannuto:mainfrom
igorburago:mc-small-words
Jun 15, 2020
Merged

Always capitalize 'Mc'-prefixed small words in compound word groups#65
ppannuto merged 1 commit into
ppannuto:mainfrom
igorburago:mc-small-words

Conversation

@igorburago
Copy link
Copy Markdown
Contributor

Fixes #64.

@coveralls
Copy link
Copy Markdown

coveralls commented Jun 15, 2020

Coverage Status

Coverage remained the same at 81.218% when pulling b8d7f02 on iburago:mc-small-words into 871f13f on ppannuto:main.

Copy link
Copy Markdown
Owner

@ppannuto ppannuto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this also makes sense to me. In this case, I think adding a comment (I gave a quick suggestion) indicating that this is somewhat of an arbitrary choice might help future readers understand why McBy is capitalized how it is.

Comment thread titlecase/tests.py
Although there are no real surnames that start with ‘Mc’ and continues
with a word matched by the SMALL_WORDS regex, it feels weird for
a string like ‘mcto/mcby’ to be title-cased into ‘McTo/Mcby’, and not
‘McTo/McBy’, even though both ‘to’ and ‘by’ are small words—just
because the small_first_last argument is set to False in the slash-
or hyphen-induced recursion. Hence this fix.
@igorburago igorburago requested a review from ppannuto June 15, 2020 17:59
@ppannuto
Copy link
Copy Markdown
Owner

Perfect, thanks again!

@ppannuto ppannuto merged commit 0a1d1f6 into ppannuto:main Jun 15, 2020
@igorburago igorburago deleted the mc-small-words branch June 15, 2020 19:10
ppannuto added a commit that referenced this pull request Jan 22, 2021
Major (interface) changes (#60) -- big thanks @iburago!!:
 - Read from an abbreviations file only when invoked from command line
 - Rename and refactor the create_wordlist_filter() function

Minor changes:
 - #63: Do not capitalize small words occurring within hyphenated word groups (thanks @iburago!)
 - #65: Always capitalize 'Mc'-prefixed small words in compound word groups (thanks @iburago!)
 - #67: Don't capitalize Mr, Ms, Mrs (thanks @GurraB!)
 - #71: Add Manifest.in and include license file in src dist (thanks @synapticarbors!)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

‘Mc’-prefixed small words are not capitalized within slash-joined compound words

3 participants