Skip to content

Commit

Permalink
Stats: Make nosuggestions stats generally available
Browse files Browse the repository at this point in the history
See #4943
  • Loading branch information
nijel committed Jan 29, 2021
1 parent 6e2b875 commit 94a0487
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions weblate/utils/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"allchecks",
"translated_checks",
"suggestions",
"nosuggestions",
"comments",
"approved_suggestions",
"languages",
Expand Down Expand Up @@ -414,6 +415,9 @@ def _prefetch_basic(self):
suggestions=conditional_sum(1, suggestion_count__gt=0),
suggestions_words=conditional_sum("num_words", suggestion_count__gt=0),
suggestions_chars=conditional_sum(Length("source"), suggestion_count__gt=0),
nosuggestions=conditional_sum(1, suggestion_count=0),
nosuggestions_words=conditional_sum("num_words", suggestion_count=0),
nosuggestions_chars=conditional_sum(Length("source"), suggestion_count=0),
approved_suggestions=conditional_sum(
1, state__gte=STATE_APPROVED, suggestion_count__gt=0
),
Expand Down

0 comments on commit 94a0487

Please sign in to comment.