Skip to content

Commit

Permalink
Converted notice to a briefer, more generic message
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmyers authored and Nateowami committed Apr 24, 2024
1 parent d865a05 commit 92e8ab7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
data-test-id="draft-stepper-translate-books"
></app-book-multi-select>

<app-notice *ngIf="unusableTranslateSourceBooks.length || unusableTranslateTargetBooks.length" type="light">
<app-notice *ngIf="unusableTranslateTargetBooks.length">
<transloco key="draft_generation_steps.unusable_target_books"></transloco>
</app-notice>

<app-notice *ngIf="unusableTranslateSourceBooks.length">
<h4 *ngIf="unusableTranslateSourceBooks.length">
<transloco
key="draft_generation_steps.these_source_books_cannot_be_used_for_translating"
Expand All @@ -25,18 +29,6 @@ <h4 *ngIf="unusableTranslateSourceBooks.length">
[availableBooks]="unusableTranslateSourceBooks"
[readonly]="true"
></app-book-multi-select>

<h4 *ngIf="unusableTranslateTargetBooks.length">
<transloco
key="draft_generation_steps.these_target_books_cannot_be_used_for_translating"
[params]="{ targetProjectName }"
></transloco>
</h4>
<app-book-multi-select
*ngIf="unusableTranslateTargetBooks.length"
[availableBooks]="unusableTranslateTargetBooks"
[readonly]="true"
></app-book-multi-select>
</app-notice>

<app-notice *ngIf="showBookSelectionError" type="error">
Expand Down Expand Up @@ -65,7 +57,11 @@ <h3>{{ t("choose_books_for_training_subheader") }}</h3>
data-test-id="draft-stepper-training-books"
></app-book-multi-select>

<app-notice *ngIf="unusableTrainingSourceBooks.length || unusableTrainingTargetBooks.length" type="light">
<app-notice *ngIf="unusableTranslateTargetBooks.length">
<transloco key="draft_generation_steps.unusable_target_books"></transloco>
</app-notice>

<app-notice *ngIf="unusableTrainingSourceBooks.length">
<h4>
<transloco
*ngIf="unusableTrainingSourceBooks.length"
Expand All @@ -78,19 +74,6 @@ <h4>
[availableBooks]="unusableTrainingSourceBooks"
[readonly]="true"
></app-book-multi-select>

<h4>
<transloco
*ngIf="unusableTrainingTargetBooks.length"
key="draft_generation_steps.these_target_books_cannot_be_used_for_training"
[params]="{ targetProjectName }"
></transloco>
</h4>
<app-book-multi-select
*ngIf="unusableTrainingTargetBooks.length"
[availableBooks]="unusableTrainingTargetBooks"
[readonly]="true"
></app-book-multi-select>
</app-notice>

<app-notice *ngIf="showBookSelectionError" type="error">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,7 @@ app-notice {
h4 {
font-style: italic;
font-weight: 400;
margin: 16px 0;
/* Remove the top margin for the first h4 */
&:first-of-type {
margin-top: 0;
}
margin: 0 0 16px;
}

&.warning {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,7 @@
"no_available_books": "You have no books available for drafting.",
"these_source_books_cannot_be_used_for_training": "The following books cannot be used for training as they are not in the training source text ({{ trainingSourceProjectName }}).",
"these_source_books_cannot_be_used_for_translating": "The following books cannot be translated as they are not in the drafting source text ({{ draftingSourceProjectName }}).",
"these_target_books_cannot_be_used_for_training": "The following books cannot be used for training as they are not in the target text ({{ targetProjectName }}).",
"these_target_books_cannot_be_used_for_translating": "The following books cannot be translated as they are not in the target text ({{ targetProjectName }})."
"unusable_target_books": "Can't find the book you're looking for? Be sure the book is created in Paratext, then sync your project."
},
"draft_viewer": {
"apply_to_project": "Apply to project",
Expand Down

0 comments on commit 92e8ab7

Please sign in to comment.