Skip to content

LanguageProfile architecture: per-language data files + autocorrect toggle #28

Description

@Pivii

Context

iOS v1.6.2 (#153) refactored all language-specific data into pure-data LanguageProfile structs — one file per language (overrides, accent map, contractions, collapse rules, seed bigrams). Result: adding German in v1.7.0 took one data file + enum case; picker entries, autocorrect and layout follow automatically. Android should adopt the same shape before adding Spanish/German, to avoid the six-files-per-language mess iOS had.

What to do

  • Kotlin LanguageProfile data class: overrides (ca→ça…), accentMap, contractions (l'/d'/qu'…), collapseRules (ae→ä for DE), seedBigrams, layout default (AZERTY/QWERTY), localized space/return labels
  • One object per language under e.g. ime/.../languages/ (French, English to start)
  • Settings language picker derived from the enum (SupportedLanguage.entries) so new languages appear automatically
  • Correction/prediction engines read profile data instead of hardcoded values
  • Add Autocorrect on/off toggle in Settings → CLAVIER (iOS has it; persists to DataStore, IME observes)

Per iOS ADR 0001: non-native languages launch with empty overrides/seeds (populate from real user feedback) — adopt the same policy.

Acceptance criteria

  • FR/EN behavior unchanged after refactor
  • Adding a language = one profile file + enum case
  • Autocorrect toggle works live in the IME

iOS reference: DictusCore/Sources/DictusCore/Languages/, ADR 0001, release v1.6.2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestios-parityiOS v1.7.1 parity catch-up

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions