mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Explore: Translate table title in runtime to get a better test id (#83236)
* Explore: Translate table title in runtime to get a better test id * Fix escaping * Retrigger the build * Prettify
This commit is contained in:
@@ -7,7 +7,7 @@ import { getTemplateSrv } from '@grafana/runtime';
|
|||||||
import { TimeZone } from '@grafana/schema';
|
import { TimeZone } from '@grafana/schema';
|
||||||
import { Table, AdHocFilterItem, PanelChrome, withTheme2, Themeable2 } from '@grafana/ui';
|
import { Table, AdHocFilterItem, PanelChrome, withTheme2, Themeable2 } from '@grafana/ui';
|
||||||
import { config } from 'app/core/config';
|
import { config } from 'app/core/config';
|
||||||
import { t, Trans } from 'app/core/internationalization';
|
import { t } from 'app/core/internationalization';
|
||||||
import {
|
import {
|
||||||
hasDeprecatedParentRowIndex,
|
hasDeprecatedParentRowIndex,
|
||||||
migrateFromParentRowIndexToNestedFrames,
|
migrateFromParentRowIndexToNestedFrames,
|
||||||
@@ -59,11 +59,9 @@ export class TableContainer extends PureComponent<Props> {
|
|||||||
name = data.refId || `${i}`;
|
name = data.refId || `${i}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return name ? (
|
return name
|
||||||
<Trans i18nKey="explore.table.title-with-name">Table - {{ name }}</Trans>
|
? t('explore.table.title-with-name', 'Table - {{name}}', { name, interpolation: { escapeValue: false } })
|
||||||
) : (
|
: t('explore.table.title', 'Table');
|
||||||
t('explore.table.title', 'Table')
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|||||||
Reference in New Issue
Block a user