Closed Bug 1310668 Opened 8 years ago Closed 3 years ago

Stats calculations are off

Categories

(Webtools Graveyard :: Pontoon, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED MOVED

People

(Reporter: mathjazz, Unassigned)

References

Details

Stats do not always reflect the actual state.

Multiple inconsistencies occur in the data model from time to time. Here's more specifics for developers:
1. TranslatedResource: translated + suggested + fuzzy > total
2. TranslatedResource & Resource: total_strings missmatch
3. ProjectLocale within the same project: total missmatch
Priority: P3 → P2
Possibly the most common reason for stats discrepancies currently is caused by duplicate approved translations submitted for the same string within a locale. It shouldn't be to hard to fix this when counting stats, but we should prevent duplicate submissions in first place.
Commenting here, because I think I’m seeing something related, but different from the temporary stats issue that is solved at next sync.

Thunderbird is displayed as 100% - 0 missing strings, several days after strings have landed: https://pontoon.mozilla.org/fr/thunderbird/ while we can see the strings here https://pontoon.mozilla.org/fr/thunderbird/all-resources/?status=missing

If people are not paying attention to Elmo (which is the case…), they could theoretically miss deadlines.
Thanks for reporting, Théo!

This type of error seems to be the subset of type #1 mentioned above. When translated strings are removed, we fail to reduce the number of translated strings in stats - and as a consequence, we also fail to increase the number of missing strings. In this subset case, the number of added and removed strings is the same, so we should 0 missing strings if the file was previously translated.

I've found two occurences:
https://hg.mozilla.org/users/m_owca.info/thunderbird-central/rev/318639affa08
https://hg.mozilla.org/users/m_owca.info/firefox-central/diff/37193f8be622/devtools/client/aboutdebugging.properties

For now, I've fixed stats by running calculate_stats() for all of the affected files for all locales.

I'm taking this bug now, because as you mentioned, it could have quite critical implications.
Assignee: nobody → m
An observation for projects with in-context l10n: stats for the Subpage can be OK, while stats for ProjectLocale aren't.

Such situations (along with some other mentioned above) are likely to get fixed on the following sync.
This ^^ works well for now, but is obviously just a temporary fix.
Priority: P2 → P3
Summary: Stats are off → Stats calculations are off
See Also: → 1381852
Assignee: m → nobody
*This bug has been moved to GitHub.*

*Please check it out on https://github.com/mozilla/pontoon/issues.*
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → MOVED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.