Skip to content

SF-3812 Inform user when no training books are available#3936

Merged
pmachapman merged 2 commits into
masterfrom
fix/SF-3812
Jun 17, 2026
Merged

SF-3812 Inform user when no training books are available#3936
pmachapman merged 2 commits into
masterfrom
fix/SF-3812

Conversation

@pmachapman

@pmachapman pmachapman commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

This PR fixes the draft wizard UI to show a notice if no books are available for training (and that is OK), or an error if no books are available and books for training are required (i.e. because one of the languages is not in the NLLB).

I am not sure on the wording for the notice, as the issue did not contain any wording example.

The notice when all books were selected for drafting, and both languages are in the NLLB:
Screenshot 2026-06-10 143329

The notice when the only books left over for training are not suitable for training, and both languages are in the NLLB:
Screenshot 2026-06-10 144303

The notice when all books were selected for drafting, and one language is not in the NLLB (The next button does not proceed):
Screenshot 2026-06-10 143503

The notice when the only books left over for training are not suitable for training, and one language is not in the NLLB (The next button does not proceed):
Screenshot 2026-06-10 144308


This change is Reviewable

@pmachapman pmachapman added the will require testing PR should not be merged until testers confirm testing is complete label Jun 10, 2026
@pmachapman pmachapman temporarily deployed to screenshot_diff June 10, 2026 02:56 — with GitHub Actions Inactive
@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.88%. Comparing base (704cc65) to head (09be384).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3936   +/-   ##
=======================================
  Coverage   80.88%   80.88%           
=======================================
  Files         634      634           
  Lines       41019    41019           
  Branches     6655     6679   +24     
=======================================
+ Hits        33179    33180    +1     
  Misses       6802     6802           
+ Partials     1038     1037    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@RaymondLuong3 RaymondLuong3 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RaymondLuong3 reviewed 3 files and all commit messages, and made 2 comments.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on pmachapman).


src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-generation-steps/draft-generation-steps.component.html line 187 at r1 (raw file):

          </app-notice>
        }
        @if (selectableTrainingBooksByProj(activatedProject.projectId).length > 0) {

Nit: I don't think it is necessary to hide the reference books label. But I do see that there is a misleading message that training books will appear. So this should be fine.

Code quote:

        @if (selectableTrainingBooksByProj(activatedProject.projectId).length > 0) {

src/SIL.XForge.Scripture/ClientApp/src/assets/i18n/non_checking_en.json line 241 at r1 (raw file):

    "choose_books_for_training_header": "Training",
    "choose_books_for_training_no_books_error": "No books are available for training. Your project must have at least one translated book to use for training.",
    "choose_books_for_training_no_books_info": "No books are available for training. You may proceed with drafting, or go back and select fewer books for drafting if you wish to select books for training.",

This message seems a little clunky to me, but I am not able to give anything that is much better. Maybe this?
"No books have enough translations for training. Training books are optional. Go back and ensure translated books are not selected to draft if you want to use them for training.

Code quote:

"No books are available for training. You may proceed with drafting, or go back and select fewer books for drafting if you wish to select books for training.",

@RaymondLuong3 RaymondLuong3 added ready to test and removed will require testing PR should not be merged until testers confirm testing is complete labels Jun 11, 2026
@RaymondLuong3 RaymondLuong3 self-assigned this Jun 11, 2026

@pmachapman pmachapman left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pmachapman made 2 comments and resolved 2 discussions.
Reviewable status: 1 of 3 files reviewed, all discussions resolved (waiting on RaymondLuong3).


src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-generation-steps/draft-generation-steps.component.html line 187 at r1 (raw file):

Previously, RaymondLuong3 (Raymond Luong) wrote…

Nit: I don't think it is necessary to hide the reference books label. But I do see that there is a misleading message that training books will appear. So this should be fine.

Done. I think it looks better with the heading.


src/SIL.XForge.Scripture/ClientApp/src/assets/i18n/non_checking_en.json line 241 at r1 (raw file):

Previously, RaymondLuong3 (Raymond Luong) wrote…

This message seems a little clunky to me, but I am not able to give anything that is much better. Maybe this?
"No books have enough translations for training. Training books are optional. Go back and ensure translated books are not selected to draft if you want to use them for training.

Done. Sounds better than my words!

@RaymondLuong3 RaymondLuong3 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RaymondLuong3 reviewed 2 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on pmachapman).

@pmachapman pmachapman added testing complete Testing of PR is complete and should no longer hold up merging of the PR and removed ready to test labels Jun 17, 2026
@pmachapman pmachapman temporarily deployed to screenshot_diff June 17, 2026 19:44 — with GitHub Actions Inactive
@pmachapman pmachapman merged commit b7c38c4 into master Jun 17, 2026
26 checks passed
@pmachapman pmachapman deleted the fix/SF-3812 branch June 17, 2026 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing complete Testing of PR is complete and should no longer hold up merging of the PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants