PT9 import fails when interlinear data names a book the project has no text for

Đang mở Phù hợp với người mới
#655 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
backend, testing

Hướng nghiên cứu

Bắt đầu với importPt9Project trong src/services/pt9ImportService.ts và theo dõi cách xử lý lỗi từ getBookUSJ khi thiếu sách. Issue xác định fixture PIB và Interlinear_es_JAS.xml là trường hợp tái hiện; hãy kiểm tra báo cáo nhập để xác nhận các sách khác được chuyển đổi và JAS được báo cáo với bookFound: false.

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

Mô tả

Importing a Paratext 9 project fails outright when one of its interlinear files is for a book that the project has no text for. The PIB test project reproduces it with Interlinear_es_JAS.xml.

Steps: in the select dialog for PIB, choose Import from Paratext 9.

Expected: the import converts the other books, and the report names JAS as a book with no text (bookFound: false). The PIB fixture is documented to produce exactly that.

Actual: the modal says the import failed, and the log shows:

Interlinearizer: failed to import Paratext 9 interlinear data
JSON-RPC Request error (-32000): Book number 59 not found in project B2B2…B2.

Where: importPt9Project in src/services/pt9ImportService.ts expects getBookUSJ to return nothing for a missing book and skips the book when it does. The platform throws instead, so the error escapes and fails the whole import. Treating that error as a missing book would restore the documented behavior. The unit tests mock getBookUSJ, so they don't catch this.

Found while testing #643 in-app.

Ngôn ngữ chính
TypeScript
Star
2
Fork
0
Merge trung bình
1 ngày 1 giờ
Pull request đã merge (30 ngày)
107

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 sillsdev/interlinearizer-extension

Tất cả issue của sillsdev/interlinearizer-extension

Issue tương tự

Thêm issue về TypeScript

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.