SF-3812 Inform user when no training books are available#3936
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. |
RaymondLuong3
left a comment
There was a problem hiding this comment.
@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.",
pmachapman
left a comment
There was a problem hiding this comment.
@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
left a comment
There was a problem hiding this comment.
@RaymondLuong3 reviewed 2 files and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on pmachapman).
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:

The notice when the only books left over for training are not suitable for training, and both languages are in the NLLB:

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

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):

This change is