Skip to content

🙌 OpenHands: AI-Driven Development

Fix Likert Scale displaying "Star Rating" text instead of star icons (#9708)

Xingyao Wangc4192773265c
diff --git a/frontend/src/components/features/feedback/likert-scale.tsx b/frontend/src/components/features/feedback/likert-scale.tsx
index 20456a49d2..63701be835 100644
--- a/frontend/src/components/features/feedback/likert-scale.tsx
+++ b/frontend/src/components/features/feedback/likert-scale.tsx
@@ -1,5 +1,6 @@
import React, { useState, useEffect, useContext } from "react";
import { useTranslation } from "react-i18next";
+import { FaStar } from "react-icons/fa";
import { cn } from "#/utils/utils";
import { I18nKey } from "#/i18n/declaration";
import { useSubmitConversationFeedback } from "#/hooks/mutation/use-submit-conversation-feedback";
@@ -207,7 +208,7 @@ export function LikertScale({
className={cn("text-xl transition-all", getButtonClass(rating))}
aria-label={`Rate ${rating} stars`}
>
- {t(I18nKey.FEEDBACK$STAR_RATING)}
+ <FaStar />
</button>
))}
{/* Show selected reason inline with stars when submitted (only for ratings <= 3) */}
diff --git a/frontend/src/i18n/declaration.ts b/frontend/src/i18n/declaration.ts
index 99bdd5b914..c466a11b9f 100644
--- a/frontend/src/i18n/declaration.ts
+++ b/frontend/src/i18n/declaration.ts
@@ -676,7 +676,6 @@ export enum I18nKey {
CONVERSATION$BUDGET_USAGE_FORMAT = "CONVERSATION$BUDGET_USAGE_FORMAT",
CONVERSATION$CACHE_HIT = "CONVERSATION$CACHE_HIT",
CONVERSATION$CACHE_WRITE = "CONVERSATION$CACHE_WRITE",
- FEEDBACK$STAR_RATING = "FEEDBACK$STAR_RATING",
BUTTON$CONFIRM = "BUTTON$CONFIRM",
FORM$VALUE = "FORM$VALUE",
FORM$DESCRIPTION = "FORM$DESCRIPTION",
diff --git a/frontend/src/i18n/translation.json b/frontend/src/i18n/translation.json
index 7b1abdcdc9..c1ed70e384 100644
--- a/frontend/src/i18n/translation.json
+++ b/frontend/src/i18n/translation.json
@@ -10815,22 +10815,6 @@
"de": "Cache-Schreiben",
"uk": "Запис у кеш"
},
- "FEEDBACK$STAR_RATING": {
- "en": "Star Rating",
- "ja": "星評価",
- "zh-CN": "星级评分",
- "zh-TW": "星級評分",
- "ko-KR": "별점",
- "no": "Stjerne Vurdering",
- "it": "Valutazione a Stelle",
- "pt": "Avaliação por Estrelas",
- "es": "Calificación por Estrellas",
- "ar": "تقييم النجوم",
- "fr": "Évaluation par Étoiles",
- "tr": "Yıldız Değerlendirmesi",
- "de": "Sternebewertung",
- "uk": "Зіркова оцінка"
- },
"BUTTON$CONFIRM": {
"en": "Confirm",
"ja": "確認",