From 9e09a5decb7ed2556b9b881fc4d8f6c9a72c1a92 Mon Sep 17 00:00:00 2001 From: Moyasee Date: Mon, 27 Oct 2025 19:28:29 +0200 Subject: [PATCH] fix: translation key fix and formatting --- src/locales/en/translation.json | 2 +- .../src/pages/game-details/review-item.tsx | 27 +++++++++---------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index e578b251..cef82a4b 100755 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -223,7 +223,7 @@ "show_more": "Show more", "show_less": "Show less", "reviews": "Reviews", - "played_for": "Played for", + "review_played_for": "Played for", "leave_a_review": "Leave a Review", "write_review_placeholder": "Share your thoughts about this game...", "sort_newest": "Newest", diff --git a/src/renderer/src/pages/game-details/review-item.tsx b/src/renderer/src/pages/game-details/review-item.tsx index d6b9fd9c..8ffe42c0 100644 --- a/src/renderer/src/pages/game-details/review-item.tsx +++ b/src/renderer/src/pages/game-details/review-item.tsx @@ -30,8 +30,6 @@ interface ReviewItemProps { ) => void; } - - const getRatingText = (score: number, t: (key: string) => string): string => { switch (score) { case 1: @@ -157,22 +155,23 @@ export function ReviewItem({
- - - {review.score}/5 - -
+ className="game-details__review-score-stars" + title={getRatingText(review.score, t)} + > + + + {review.score}/5 + +
{review.playTimeInSeconds && review.playTimeInSeconds > 0 && (
- {t("played_for")} {formatPlayTime(review.playTimeInSeconds)} + {t("review_played_for")}{" "} + {formatPlayTime(review.playTimeInSeconds)}
)}