Skip to content

Commit

Permalink
Merge pull request #2725 from data-for-change/2724-fix-transcription
Browse files Browse the repository at this point in the history
fix transcriptions
  • Loading branch information
atalyaalon authored Oct 30, 2024
2 parents 8ff94a5 + e363b0c commit 9a72113
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 9a72113

Please sign in to comment.