Fixed an issue where "Shar" was being returned as the number of comments on posts without comments
This commit is contained in:
parent
f6e8545236
commit
f4900d6d29
@ -18,6 +18,8 @@ def comments_strip(string,loader_context):
|
|||||||
return string[0].rstrip(' commenti')
|
return string[0].rstrip(' commenti')
|
||||||
|
|
||||||
elif lang == 'en':
|
elif lang == 'en':
|
||||||
|
if(string[0] == 'Share'):
|
||||||
|
return '0'
|
||||||
new_string = string[0].rstrip(' Comments')
|
new_string = string[0].rstrip(' Comments')
|
||||||
while new_string.rfind(',') != -1:
|
while new_string.rfind(',') != -1:
|
||||||
new_string = new_string[0:new_string.rfind(',')] + new_string[new_string.rfind(',')+1:]
|
new_string = new_string[0:new_string.rfind(',')] + new_string[new_string.rfind(',')+1:]
|
||||||
|
Loading…
Reference in New Issue
Block a user