i18n: Fix incorrect interpolation in query group options (#104873)
This commit is contained in:
@@ -121,6 +121,12 @@ describe('QueryGroup', () => {
|
||||
const addExpressionButton = screen.queryByTestId('query-tab-add-expression');
|
||||
expect(addExpressionButton).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('correctly renders query options', async () => {
|
||||
renderScenario({});
|
||||
expect(await screen.findByText('MD = 100')).toBeInTheDocument();
|
||||
expect(await screen.findByText('Interval = 1m')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
function renderScenario(overrides: Partial<Props>) {
|
||||
@@ -132,6 +138,8 @@ function renderScenario(overrides: Partial<Props>) {
|
||||
getTransformations: jest.fn(),
|
||||
}),
|
||||
options: {
|
||||
maxDataPoints: 100,
|
||||
minInterval: '1m',
|
||||
queries: [
|
||||
{
|
||||
datasource: mockDS,
|
||||
|
||||
@@ -310,12 +310,12 @@ export const QueryGroupOptionsEditor = React.memo(({ options, dataSource, data,
|
||||
<>
|
||||
{
|
||||
<span className={styles.collapsedText}>
|
||||
<Trans i18nKey="query.query-group-options-editor.collapsed-max-data-points">MD = {mdDesc}</Trans>
|
||||
<Trans i18nKey="query.query-group-options-editor.collapsed-max-data-points">MD = {{ mdDesc }}</Trans>
|
||||
</span>
|
||||
}
|
||||
{
|
||||
<span className={styles.collapsedText}>
|
||||
<Trans i18nKey="query.query-group-options-editor.collapsed-interval">Interval = {intervalDesc}</Trans>
|
||||
<Trans i18nKey="query.query-group-options-editor.collapsed-interval">Interval = {{ intervalDesc }}</Trans>
|
||||
</span>
|
||||
}
|
||||
</>
|
||||
|
||||
@@ -7830,8 +7830,8 @@
|
||||
"title-data-source-help": "Data source help"
|
||||
},
|
||||
"query-group-options-editor": {
|
||||
"collapsed-interval": "Interval = {intervalDesc}",
|
||||
"collapsed-max-data-points": "MD = {mdDesc}",
|
||||
"collapsed-interval": "Interval = {{intervalDesc}}",
|
||||
"collapsed-max-data-points": "MD = {{mdDesc}}",
|
||||
"hide-time-info": "Hide time info",
|
||||
"Query options-title-query-options": "Query options",
|
||||
"relative-time": "Relative time",
|
||||
|
||||
Reference in New Issue
Block a user