Skip to content

Commit

Permalink
fix transcriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
atalyaalon committed Oct 30, 2024
1 parent 8ff94a5 commit e363b0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@ def get_transcription(request_params: RequestParams, items: Dict):
incident_keyword=_("accidents"),
out_of_them_keywoard=_("out of them (feminine)"),
)
non_empty_texts = [text for text in [severity_fatal_count_text, severity_severe_count_text, severity_light_count_text] if text]
text += join_strings(
[severity_fatal_count_text, severity_severe_count_text, severity_light_count_text],
non_empty_texts,
sep_a=" ,",
sep_b=_(" and "),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,11 @@ def get_transcription(request_params: RequestParams, items: Dict):
people_phrase=_("people from car accidents"),
out_of_them_keywoard=_("out of them (masculine plural)"),
)

non_empty_texts = [text for text in [killed_count_text, severity_severe_count_text, severity_light_count_text] if text]

text += join_strings(
[killed_count_text, severity_severe_count_text, severity_light_count_text],
non_empty_texts,
sep_a=" ,",
sep_b=_(" and "),
)
Expand Down

0 comments on commit e363b0c

Please sign in to comment.