Skip to content

Commit

Permalink
Corrected a word counting unsightliness (#80)
Browse files Browse the repository at this point in the history
Now if a text has a word count of 0, it won't be added to the language-specific word counts

This corrects the problem that if no texts pass for a certain language the language would show up with a 0 for words
  • Loading branch information
sonofmun authored and PonteIneptique committed Apr 7, 2017
1 parent 4431478 commit 248b5a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion HookTest/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,8 @@ def end(self):
for x in unit.additional['citations']:
total_units += x[1]
total_words += unit.additional['words']
language_words[unit.additional['language']] += unit.additional['words']
if unit.additional['words'] > 0:
language_words[unit.additional['language']] += unit.additional['words']
else:
display_table = PT(["Identifier", "Nodes", "Failed Tests"])
display_table.align['Identifier', 'Nodes', "Failed Tests"] = "c"
Expand Down

0 comments on commit 248b5a3

Please sign in to comment.