i18n: imports use @grafana/i18n (#105177)

* i18n: everything should target @grafana/i18n

* wip

* chore: updates after PR feedback

* Trigger build

* Trigger build

* Trigger build

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: revert all flaky tests

* chore: some incorrect usages of useTranslate
This commit is contained in:
Hugo Häggmark
2025-05-15 09:17:14 +02:00
committed by GitHub
parent d8dd2facdd
commit 119d5897ea
1112 changed files with 2910 additions and 1877 deletions

View File

@ -1,8 +1,8 @@
import { useCallback, useEffect, useRef } from 'react';
import { DataSourceApi, QueryEditorProps, SelectableValue } from '@grafana/data';
import { useTranslate } from '@grafana/i18n';
import { InlineField, Select } from '@grafana/ui';
import { t } from 'app/core/internationalization';
import { ClassicConditions } from './components/ClassicConditions';
import { Math } from './components/Math';
@ -66,6 +66,8 @@ export function ExpressionQueryEditor(props: Props) {
setCachedExpression(query.type, query.expression);
}, [query.expression, query.type, setCachedExpression]);
const { t } = useTranslate();
const onSelectExpressionType = useCallback(
(item: SelectableValue<ExpressionQueryType>) => {
const cachedExpression = getCachedExpression(item.value!);