diff --git a/changelogs/fragments/8397.yml b/changelogs/fragments/8397.yml new file mode 100644 index 000000000000..e33a3850d3f5 --- /dev/null +++ b/changelogs/fragments/8397.yml @@ -0,0 +1,2 @@ +fix: +- Fix dynamic uses of i18n and correct unprefixed i18n identifiers in queryEnhancements plugin ([#8397](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8397)) \ No newline at end of file diff --git a/src/plugins/query_enhancements/public/query_assist/components/call_outs.tsx b/src/plugins/query_enhancements/public/query_assist/components/call_outs.tsx index 57f70390ede1..6ca3824b1db9 100644 --- a/src/plugins/query_enhancements/public/query_assist/components/call_outs.tsx +++ b/src/plugins/query_enhancements/public/query_assist/components/call_outs.tsx @@ -26,7 +26,7 @@ const EmptyIndexCallOut: React.FC = (props) => ( data-test-subj="query-assist-empty-index-callout" title={ } @@ -44,7 +44,7 @@ const ProhibitedQueryCallOut: React.FC = (props) => ( data-test-subj="query-assist-guard-callout" title={ } @@ -62,7 +62,7 @@ const EmptyQueryCallOut: React.FC = (props) => ( data-test-subj="query-assist-empty-query-callout" title={ } @@ -80,7 +80,7 @@ const QueryGeneratedCallOut: React.FC = (props) => ( data-test-subj="query-assist-query-generated-callout" title={ diff --git a/src/plugins/query_enhancements/public/query_assist/components/query_assist_banner.tsx b/src/plugins/query_enhancements/public/query_assist/components/query_assist_banner.tsx index 6a1240e93b00..c1434918c2c0 100644 --- a/src/plugins/query_enhancements/public/query_assist/components/query_assist_banner.tsx +++ b/src/plugins/query_enhancements/public/query_assist/components/query_assist_banner.tsx @@ -49,13 +49,13 @@ export const QueryAssistBanner: React.FC = (props) => { - + = (props) => { }} > diff --git a/src/plugins/query_enhancements/public/query_assist/components/query_assist_summary.tsx b/src/plugins/query_enhancements/public/query_assist/components/query_assist_summary.tsx index d6ad2057a77d..4606a975713c 100644 --- a/src/plugins/query_enhancements/public/query_assist/components/query_assist_summary.tsx +++ b/src/plugins/query_enhancements/public/query_assist/components/query_assist_summary.tsx @@ -242,7 +242,8 @@ export const QueryAssistSummary: React.FC = (props) => type={'iInCircle'} content={`Summary based on first ${sampleSize} records`} aria-label={i18n.translate('queryEnhancements.queryAssist.summary.sampletip', { - defaultMessage: `Summary based on first ${sampleSize} records`, + defaultMessage: 'Summary based on first {sampleSize} records', + values: { sampleSize }, })} /> diff --git a/src/plugins/query_enhancements/public/query_assist/utils/create_extension.tsx b/src/plugins/query_enhancements/public/query_assist/utils/create_extension.tsx index 447d24714029..6cfb81d90186 100644 --- a/src/plugins/query_enhancements/public/query_assist/utils/create_extension.tsx +++ b/src/plugins/query_enhancements/public/query_assist/utils/create_extension.tsx @@ -105,7 +105,7 @@ export const createQueryAssistExtension = ( return { type: DATA_STRUCTURE_META_TYPES.FEATURE, icon: { type: assistantMark }, - tooltip: i18n.translate('queryAssist.meta.icon.tooltip', { + tooltip: i18n.translate('queryEnhancements.meta.icon.tooltip', { defaultMessage: 'Query assist is available', }), }; diff --git a/src/plugins/query_enhancements/public/query_editor/query_language_reference.tsx b/src/plugins/query_enhancements/public/query_editor/query_language_reference.tsx index 4ec2abd8da22..225da9511e95 100644 --- a/src/plugins/query_enhancements/public/query_editor/query_language_reference.tsx +++ b/src/plugins/query_enhancements/public/query_editor/query_language_reference.tsx @@ -28,7 +28,7 @@ export class QueryLanguageReference { const button = ( {