Repository navigation
iOS: words mid-sentence stay lowercase unless you capitalized them - #2218
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 ownUILexiconwords 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/devalready fixes this report with Auto-capitalization on (#2173). Two paths were still open:isOwnSpellingnow only counts a capital thatwithoutStrayCapitalwould keep. Text replacement phrases still count as stored.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:testYourCommonWordsStayLowercaseAndYourVocabularyKeepsItsCapitalsandtestSwipedCommonWordsStayLowercaseMidSentenceAndVocabularyKeepsItsCapitals. Run before the rebase onto iOS: no double space when you fix a word mid-sentence #2214, which doesn't touch these files.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.