Skip to content

iOS: Italian words are spellchecked as English, and accents are not restored #2196

Closed

Description

@marcoamt

Hex version

Hex Mobile TestFlight 0.2.0 (build 56)

Platform

Other

System details

iPhone 17 Pro, iOS 27.2.1. Full keyboard, Notes as host app.

What happened?

With the keyboard language set to Italian, two things go wrong.

The space bar shows Italiano, but Notes underlines correct Italian words in red. Typing "Questa e come scrive" underlines "Questa", "e" and "scrive"; "come" is not underlined (it is also an English word). Expected: the host spellchecks the text as Italian.

Accents are not restored on space: "e" stays "e" instead of "è", and "ce" stays "ce" instead of "c'è". Long-press does offer à è ì ò ù. Expected: common accented forms are restored on space, as Spanish "aqui" becomes "aquí".

This is not the bug fixed by #2069 (Italian autocorrected into English, e.g. "Domani" → "Domain"). This build already has that fix.

Steps to reproduce

  1. Settings › Keyboard › Languages: Automatic (with Italian dictation) or Italiano ticked. Also reproduced with Italiano, Español and English ticked, space bar showing Italiano.
  2. In Notes, type "Questa e come scrive", pressing space after each word.
  3. "Questa", "e" and "scrive" get a red underline; "e" is not changed to "è". Typing "ce" followed by space likewise stays "ce" instead of "c'è".

Additional context

Verified on dev:

  • ios/HEXKeyboard/Info.plist sets PrimaryLanguage to en-US. KeyboardViewController reads primaryLanguage only for typing logs and never assigns it.
  • FullKeyboardView.syncLanguage updates the engine language, layout, spatial autocorrect and space-bar label, but not the extension's primaryLanguage.
  • The comment on KeyboardLanguage.automatic() already notes that Hex's own input mode is the plist's en-US.
  • Only en, es and de ship a .hextm model, so Italian stays on UITextChecker.
  • In AutocorrectEngine.ownReplacement, UITextChecker guesses need a token of 3+ characters with no apostrophe (guard token.count >= 3, !token.contains("'")), so neither "e" nor "ce" can become "è" or "c'è" that way, and the Italian two-letter list has no "e" or "ce".

Hypotheses (not runtime-verified):

  • Notes underlines Italian because the host follows the extension's en-US. Setting primaryLanguage to the space-bar language's BCP 47 id (usually it-IT, from KeyboardLanguage.dictationLanguage) may fix it.
  • "ce" → "c'è" also needs an apostrophe inserted, and "ce" is itself a valid Italian word ("ce l'ho"), so it likely needs an explicit context-aware rule rather than a spellchecker guess.
  • For longer words like "perche" → "perché", the accent-only cost from iOS: spatial autocorrect experiment with Google Books models, plus accent and two-letter fixes #2059 already applies on the dictionary path, so UITextChecker may be accepting the unaccented form or not offering the accented guess. Needs a device check.

Related, not duplicates: #2069, #2059, #2143 and #2184 (dictionary-path diacritic restoration for Polish and Greek).

Activity

  1. thdxr commented on Nov 21, 2026

    @thdxr
    Member

    two things were wrong with italian on the full keyboard:

    • the keyboard always told the app it was typing english, so notes spellchecked italian words as english. it now tells the app the language shown on the space bar, and switches it when you switch
    • accents only came back through the spellchecker's guesses, which skip short words. common words like perche, piu, gia, citta and the days of the week now get their accent back on space

    "e" and "ce" stay as you type them, since they're words on their own ("and", "to us"). "è" and "c'è" show up in the suggestion bar instead, so one tap fixes them

    fixed in #2199, it'll be in the next dev build

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions