Skip to content

Commit

Permalink
Fix repeated verse issue
Browse files Browse the repository at this point in the history
Translation Services noted that when rendering the document for
English -> Kubu (kvb), some target text verses are repeated.

This was the classic "in a loop not using old value since current
value is null". Fixed, as always, with freshly initializing value with
empty string so that the value established in the last loop iteration
is not used. Why were some verses null? Because the target language,
in this case, did not have a particular book or verse available.
  • Loading branch information
linearcombination committed Oct 17, 2024
1 parent 673cfe7 commit 35547c0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/document/stet/stet.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ def generate_docx_document(
and usfm_book_.resource_type_name
== resource_type_codes_and_names[lang1_usfm_resource_type]
]
source_verse_text = ""
target_verse_text = ""
if source_selected_usfm_books:
source_selected_usfm_book = source_selected_usfm_books[0]
for verse_ref in verse_ref_dto.verse_refs:
Expand Down

0 comments on commit 35547c0

Please sign in to comment.