mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-05 04:37:29 +01:00
Change wording of reviews hypertext helpfulness
This commit is contained in:
parent
699eabef80
commit
c7f26f706d
@ -339,8 +339,8 @@ def package_reviews_as_hypertext(package: Package, formspec_version: int = 7):
|
|||||||
num_comments = review.thread.replies.count()
|
num_comments = review.thread.replies.count()
|
||||||
comments = make_link(abs_url_for("threads.view", id=review.thread.id), f"Comments [{num_comments}]")
|
comments = make_link(abs_url_for("threads.view", id=review.thread.id), f"Comments [{num_comments}]")
|
||||||
positive, negative, _ = review.get_totals()
|
positive, negative, _ = review.get_totals()
|
||||||
helpful = f"{positive} helpful, {negative} unhelpful"
|
helpful = f"Review helpfulness: +{positive} / -{negative}"
|
||||||
body += f"{author} {rating}\n<big>{escape_hypertext(review.thread.title)}</big>\n{comment_body}\n{comments} - {helpful}\n\n"
|
body += f"{author} {rating}\n<big>{escape_hypertext(review.thread.title)}</big>\n{comment_body}\n{comments} — {helpful}\n\n"
|
||||||
|
|
||||||
if len(reviews) == 0:
|
if len(reviews) == 0:
|
||||||
body += escape_hypertext(gettext("No reviews available."))
|
body += escape_hypertext(gettext("No reviews available."))
|
||||||
|
Loading…
Reference in New Issue
Block a user