Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Show closest word suggestion when translation or conjugation is invalid

Đang mở
#640 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

@prince-0408 đang làm issue này rồi.

Từ ngày 1/4/2026.

  • #642 của @prince-0408 — đang mở
  • #655 của @garvitkaushik-123 — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
68/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
swift
Lĩnh vực
mobile

Hướng nghiên cứu

Bắt đầu bằng cách lần theo luồng queryAutocompletions hiện có và cách xử lý lệnh không hợp lệ trong Translate.swift và Conjugate.swift. Sau đó kiểm tra CommandVariables.swift và KeyboardViewController.swift để xem trạng thái của thanh lệnh được biểu diễn và render như thế nào. Được xem là hoàn tất khi các đầu vào không hợp lệ của Translate và Conjugate có thể hiển thị từ khớp gần nhất dưới dạng gợi ý “Ý bạn là”, mà không loại bỏ hành vi hiện có.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Terms
Description

Summary

When a user enters a word that isn't found during Translate or Conjugate, Scribe currently shows a generic "invalid" error with no further guidance. Users are left with no idea whether they made a typo or the word simply doesn't exist in the database.

Problem

The invalid state (commandState = .invalid) gives zero actionable feedback. A user who types "hause" instead of "Haus" gets the same error as someone who types complete nonsense — no distinction, no hint.

Proposed Solution

Reuse the existing queryAutocompletions infrastructure to find the closest matching word when a command returns invalid, and display it in the command bar as:

"Did you mean: Haus?"

This covers both Translate and Conjugate commands since both already funnel through commandState = .invalid.

Affected Files

File Change
Translate.swift Surface closest match on invalid result
Conjugate.swift Surface closest match on invalid result
CommandVariables.swift State handling for "did you mean" display
KeyboardViewController.swift Render suggestion in command bar

Notes

  • LanguageDBManager.shared.queryAutocompletions(word:) already returns close matches — no new DB queries needed
  • Purely additive, no existing logic removed
  • Strings can be hard-coded for now pending i18n entry
Ngôn ngữ chính
Swift
Star
171
Fork
109
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của scribe-org/Scribe-iOS

Tất cả issue của scribe-org/Scribe-iOS

Issue tương tự

Thêm issue về Swift

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.