From a6f8499eceab0877bf803888571df6b289bb424d Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Sat, 28 Sep 2024 12:09:31 +0800 Subject: [PATCH] Fix dynamic uses of i18n (#335) (#336) Signed-off-by: Miki (cherry picked from commit b02b580b0acb86d3f142026a466c0efa8cffc09f) Signed-off-by: github-actions[bot] # Conflicts: # CHANGELOG.md Co-authored-by: github-actions[bot] --- .../incontext_insight/generate_popover_body.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/public/components/incontext_insight/generate_popover_body.tsx b/public/components/incontext_insight/generate_popover_body.tsx index 76f5950f..7c2c428d 100644 --- a/public/components/incontext_insight/generate_popover_body.tsx +++ b/public/components/incontext_insight/generate_popover_body.tsx @@ -261,9 +261,13 @@ export const GeneratePopoverBody: React.FC<{
- {i18n.translate('assistantDashboards.incontextInsight.Summary', { - defaultMessage: showInsight ? 'Insight With RAG' : 'Summary', - })} + {showInsight + ? i18n.translate('assistantDashboards.inContextInsight.withRAGSummary', { + defaultMessage: 'Insight With RAG', + }) + : i18n.translate('assistantDashboards.inContextInsight.summary', { + defaultMessage: 'Summary', + })}