Closed Bug 1179954 Opened 6 years ago Closed 1 month ago

Add translation status field to replace approved & fuzzy


(Webtools Graveyard :: Pontoon, defect, P3)



(firefox42 affected)

Tracking Status
firefox42 --- affected


(Reporter: osmose, Unassigned)



The routine that updates the translated_count attribute on Stats instances is wrong; it sometimes comes up with negative counts, which is why we currently have a workaround in place to handle negative counts (

We should probably investigate this to see if there's a more correct way of calculating it.

I've had a look on the bug and would love to work on it. I suspect the cause is that you're double-counting translations by separating fuzzy and approved translations. It looks like it's possible for a translation to be both approved and fuzzy in the database at once. Perhaps a better solution overall would be to have a single variable keeping track of the current state, instead of booleans for each state.

Thank you for looking into this bug. I like your idea of using e.g. status field with different states instead of separate fields.

I'm NIing :Osmose, who has been working on refactoring Stats recently and probably has an opinion on this.
Flags: needinfo?(mkelly)
As long as we are confident that fuzzy, approved, and unapproved are all mutually exclusive, a single state field for them is a fine idea. We can use a PositiveIntegerField with some choices for the actual field itself.

Are there any other states a translation can be in that we'd want to add to the list? Is there a better term than "fuzzy" for what the fuzzy status represents?
Flags: needinfo?(mkelly)
They are mutually exclusive.

The term fuzzy comes from the PO file format and since it's the only file format using this property, I don't see the point in renaming it.

We made add another state later (rejected) if we add an option to reject unapproved translations. That would allow us to split unapproved strings into 2 groups - rejected ("triaged") and unapproved ("non-triaged"). But that's not the topic of this bug.
Priority: -- → P3
Duplicate of this bug: 1226421
Summary: Stats.translated_count calculation is incorrect → Stats.fuzzy_count calculation is incorrect
Summary: Stats.fuzzy_count calculation is incorrect → Add translation status field to replace approved & fuzzy
See Also: → 1409724
*This bug has been moved to GitHub.*

*Please check it out on*
Closed: 1 month ago
Resolution: --- → MOVED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.