Add proper rendering for single review title

This commit is contained in:
Pieter Vander Vennet 2020-12-31 21:18:44 +01:00
parent d225a32094
commit e7dcd350fe
3 changed files with 31 additions and 13 deletions

View file

@ -35,8 +35,10 @@ export default class ReviewElement extends UIElement {
new Combine([
SingleReview.GenStars(avg).SetClass("stars"),
`<a target="_blank" href='https://mangrove.reviews/search?sub=${encodeURIComponent(this._subject)}'>`,
Translations.t.reviews.title
.Subs({count: "" + revs.length}),
revs.length === 1 ? Translations.t.reviews.title_singular :
Translations.t.reviews.title
.Subs({count: "" + revs.length})
,
"</a>"
])