Merge ~robru/britney/+git/britney2-ubuntu:fix-email-plurals into ~ubuntu-release/britney/+git/britney2-ubuntu:master
Proposed by
Robert Bruce Park
on 2017-03-13
| Status: | Merged |
|---|---|
| Merged at revision: | 057967745765ee36e6b4b813856d10e2bb26b15e |
| Proposed branch: | ~robru/britney/+git/britney2-ubuntu:fix-email-plurals |
| Merge into: | ~ubuntu-release/britney/+git/britney2-ubuntu:master |
| Diff against target: |
51 lines (+21/-1) 2 files modified
britney2/policies/email.py (+2/-1) tests/test_email.py (+19/-0) |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Ubuntu Release Team | 2017-03-13 | Pending | |
|
Review via email:
|
|||
Description of the Change
Rounding issue in email policy: When deciding when to pluralize "days", "age != 1" uses the un-rounded age, but then the email rounds the value after, so for example the value of age might be 1.01, that's != to 1 so the plural form is chosen, but then 1.01 rounds down to 1 for display, so the result is "1 days".
This commit rounds at the appropriate time so that the correct plural can be chosen.
To post a comment you must log in.
