HomePhabricator

Prevent NaN in the trend in CXStats

Authored by Amire80.

Description

Prevent NaN in the trend in CXStats

Before this patch, if two weeks ago there were zero translations,
the stats trend calculation would divide by zero and show "NaN%"
to the user.

Now, check: If it was zero, then show 0% if there were no translations
last week or 100% if there were any.

Bug: T112960
Change-Id: Icf98c545ad39ededf30bf1ebd15c5e821b488b08

Details

Committed
Amire80Sep 18 2015, 6:59 PM
Parents
rECTX34f89a756ea2: Prettify language selectors when it overflows
Branches
Unknown
Tags
Unknown
ChangeId
Icf98c545ad39ededf30bf1ebd15c5e821b488b08