diff --git a/src/calibre/utils/titlecase.py b/src/calibre/utils/titlecase.py index 12f3079a10..97daed23a9 100755 --- a/src/calibre/utils/titlecase.py +++ b/src/calibre/utils/titlecase.py @@ -28,8 +28,6 @@ SUBPHRASE = re.compile(r'([:.;?!][ ])(%s)' % SMALL) APOS_SECOND = re.compile(r"^[dol]{1}['‘]{1}[a-z]+$", re.I) ALL_CAPS = re.compile(r'^[A-Z\s%s]+$' % PUNCT) UC_INITIALS = re.compile(r"^(?:[A-Z]{1}\.{1}|[A-Z]{1}\.{1}[A-Z]{1})+$") -MAC_MC = re.compile(r"^([Mm]a?c)(.+)") - _lang = None @@ -40,7 +38,6 @@ def lang(): _lang = get_lang().lower() return _lang - def titlecase(text): """ @@ -78,13 +75,6 @@ def titlecase(text): line.append(icu_lower(word)) continue - if lang().startswith('en'): - match = MAC_MC.match(word) - if match and not match.group(2)[:3] in ('hin', 'ht'): - line.append("%s%s" % (capitalize(match.group(1)), - capitalize(match.group(2)))) - continue - hyphenated = [] for item in word.split('-'): hyphenated.append(CAPFIRST.sub(lambda m: icu_upper(m.group(0)), item))