Commit e4890a8b by Rocky Duan

fixed pluralize

parent f2507d7c
......@@ -12,7 +12,7 @@ import urllib
import os
def pluralize(singular_term, count):
if int(count) >= 2:
if int(count) >= 2 or int(count) == 0:
return singular_term + 's'
return singular_term
......
......@@ -7,7 +7,8 @@ import inspect
def pluralize(content, text):
num, word = text.split(' ')
if int(num or '0') >= 2:
num = int(num or '0')
if num >= 2 or num == 0:
return word + 's'
else:
return word
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment