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

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Xingyao Wang 2025-07-15 10:38:02 -04:00 committed by GitHub
parent 35b945b9d1
commit c419277326
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 2 additions and 18 deletions

View File

@ -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) */}

View File

@ -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",

View File

@ -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": "確認",