Internationalisation: Mark up @grafana/sql package (#105842)

* scaffolding for package

* crowdin scaffolding

* markup

* add translations

* fix locale location

* fix tsconfig?

* undo bundler change

* object tranlsations, expose loadResources and call in mssql

* prettier

* remove useTranslate

* extract translations

* last couple of fixes

* remove deleted files
This commit is contained in:
Ashley Harrison
2025-06-12 10:52:04 +01:00
committed by GitHub
parent c42c89d5e4
commit 84eafb9a56
31 changed files with 405 additions and 89 deletions

View File

@ -1,6 +1,7 @@
import { useCallback } from 'react';
import { SelectableValue, toOption } from '@grafana/data';
import { t } from '@grafana/i18n';
import { AccessoryButton, EditorList, InputGroup } from '@grafana/plugin-ui';
import { Select } from '@grafana/ui';
@ -46,12 +47,20 @@ function makeRenderColumn({ options }: { options?: Array<SelectableValue<string>
<InputGroup>
<Select
value={item.property?.name ? toOption(item.property.name) : null}
aria-label="Group by"
aria-label={t('components.make-render-column.render-column.aria-label-group-by', 'Group by')}
options={options}
menuShouldPortal
onChange={({ value }) => value && onChangeItem(setGroupByField(value))}
/>
<AccessoryButton title="Remove group by column" icon="times" variant="secondary" onClick={onDeleteItem} />
<AccessoryButton
title={t(
'components.make-render-column.render-column.title-remove-group-by-column',
'Remove group by column'
)}
icon="times"
variant="secondary"
onClick={onDeleteItem}
/>
</InputGroup>
);
};