Skip to content

iOS: words mid-sentence stay lowercase unless you capitalized them - #2218

Merged
R44VC0RP merged 1 commit into
devfrom
ios-no-random-capitals
Nov 21, 2026
Merged

R44VC0RP merged 1 commit into
devfrom
ios-no-random-capitals

Conversation

@R44VC0RP

Copy link
Copy Markdown
Collaborator

TestFlight (build 56, iPhone 17 Pro, iOS 27.2.1, English, Auto-capitalization, Autocorrect and Spatial autocorrect on): "Getting random words capitalized". The screenshot reads "Testing how this World" with "working | Works | writing" in the strip.

Cause

Reproduced on build 56 (2ef08aa4) in a Mac Studio simulator (iPhone 17 Pro, iOS 27.2), with real touches and swipes. Swipe typing read your own UILexicon words with their capitals. With "World" and "Works" as lexicon terms (text replacements whose phrase is the word, which load the same way Contacts names do), swiping "works" after "testing how this" typed "Works", with "World" in the strip. Typed words were already right on build 56.

origin/dev already fixes this report with Auto-capitalization on (#2173). Two paths were still open:

  • Auto-capitalization off: a Contacts name or learned fix that is also a common word still went in capitalised. On dev, swiping gave "testing how this Works i Will". isOwnSpelling now only counts a capital that withoutStrayCapital would keep. Text replacement phrases still count as stored.
  • Your vocabulary (iOS: Czech keyboard, and custom words for typing #2205): a word you added with capitals ("Swift") was swiped and completed as "swift", while space wrote "Swift". Vocabulary words spelled as you added them now keep their capitals in every path.

Unchanged: sentence starts and auto-shift, capitals you type, "I" and its contractions, names the dictionary only knows capitalised ("Kate", "June" and "Monday" on space, #2091), German nouns, and text replacements.

Apple's keyboard (black box, same simulator)

Typed and swiped "works", "world", "will", "mark", "may", "bill", "rose" and "bell" stay lowercase mid-sentence, including when "World", "Works", "Will" and "Bill" are lexicon terms. "june", "monday" and "kate" become "June", "Monday" and "Kate" on space.

Verified

  • xcodebuild test (HEXMobile, iPhone 17 Pro, iOS 27.2): 621 tests, 1 skipped, 0 failures. New tests: testYourCommonWordsStayLowercaseAndYourVocabularyKeepsItsCapitals and testSwipedCommonWordsStayLowercaseMidSentenceAndVocabularyKeepsItsCapitals. Run before the rebase onto iOS: no double space when you fix a word mid-sentence #2214, which doesn't touch these files.
  • Live, this branch in a hosted field with the same lexicon. With Auto-capitalization off, "testing how this works i will hello world" swiped all lowercase, and the strip was lowercase too. With it on, 12 swiped and 13 typed phrases match Apple's casing, and sentence starts are capitalised.

Follow-up (not in this PR)

After a swipe, Apple offers the capitalised lexicon form as an extra choice in the strip ("I will" offers "Will"; "the bill" offers "Bill"). Hex offers only the lowercase word.

TestFlight (build 56, iPhone 17 Pro, iOS 27.2.1, English, Auto-capitalization,
Autocorrect and Spatial autocorrect on): "Getting random words capitalized".
The screenshot reads "Testing how this World" with "working | Works | writing"
in the strip.

Cause, reproduced on build 56 (2ef08aa) on a Mac Studio simulator (iPhone 17
Pro, iOS 27.2, real HID touches and swipes): Swipe typing read your own
UILexicon words with their capitals. With "World" and "Works" as lexicon terms
(text replacements whose phrase is the word, which load as Contacts names do),
swiping "works" after "testing how this" typed "Works" with "World" in the
strip, and "hello world", "i will", "ask mark", "pay the bill", "a rose"
swiped as "World", "Will", "Mark", "Bill", "Rose". Typed words were already
right on build 56.

origin/dev already fixes that report with Auto-capitalization on (#2173,
withoutStrayCapital): the same build-56 cases swipe in lowercase on dev, and
typed words, completions, Spatial readings and space's fixes keep no stray
capital. Two paths were left:
- Auto-capitalization off: swipeCased and the strip kept any "own spelling"
  as stored, so a Contacts name or learned fix that is also a common word
  still went in capitalised ("testing how this Works i Will" on dev).
  isOwnSpelling now only counts a capital withoutStrayCapital would keep;
  text replacement phrases still count as stored.
- Your vocabulary (#2205): withoutStrayCapital lowercased a vocabulary word
  the dictionary knows in lowercase ("Swift" swiped or completed as "swift",
  while space wrote "Swift"). A word in your vocabulary, spelled as added
  (isVocabularySpelling), now keeps its capitals in every path.
Unchanged: sentence starts and auto-shift, a capital you typed, "I" and its
contractions, names the dictionary knows only capitalised ("Kate", "June",
"Monday" on space, #2091), German nouns and text replacements.

Apple's keyboard (black box, same simulator): typed and swiped "works",
"world", "will", "mark", "may", "bill", "rose", "bell" stay lowercase
mid-sentence, including with "World", "Works", "Will" and "Bill" as lexicon
terms; "june", "monday" and "kate" become "June", "Monday", "Kate" on space.

Verified:
- xcodebuild test, HEXMobile scheme, iPhone 17 Pro simulator (iOS 27.2):
  621 tests, 1 skipped, 0 failures, with new
  AutocorrectEngineTests.testYourCommonWordsStayLowercaseAndYourVocabularyKeepsItsCapitals
  and FullKeyboardEngineTests.testSwipedCommonWordsStayLowercaseMidSentenceAndVocabularyKeepsItsCapitals.
- Live, this branch in a hosted field with the same lexicon: with
  Auto-capitalization off, "testing how this works i will hello world"
  swiped all lowercase (strip lowercase too); with it on, 12 swiped and 13
  typed phrases match Apple's casing, sentence starts capitalised.
@R44VC0RP
R44VC0RP merged commit 868584f into dev Nov 21, 2026
1 check passed
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.

1 participant