Chore: Auto mark up some more areas for translations (#102479)

* markup api-keys

* markup auth-config

* auto markup connections

* markup explore

* translation extractions

* fix unit tests
This commit is contained in:
Ashley Harrison
2025-03-24 11:41:45 +00:00
committed by GitHub
parent 00db0cf6e6
commit 0bedd57812
62 changed files with 884 additions and 447 deletions
+42 -262
View File
@@ -2521,74 +2521,33 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
[0, 0, 0, "Unexpected any. Specify a different type.", "2"]
],
"public/app/features/api-keys/ApiKeysActionBar.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"]
],
"public/app/features/api-keys/ApiKeysPage.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "1"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "3"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "4"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "5"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "6"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "7"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "8"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "9"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "10"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "11"]
],
"public/app/features/api-keys/ApiKeysTable.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "3"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "4"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "5"]
],
"public/app/features/api-keys/MigrateToServiceAccountsCard.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "1"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "2"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "3"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "4"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "5"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "6"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "7"]
],
"public/app/features/api-keys/MigrateToServiceAccountsCard.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"]
],
"public/app/features/auth-config/AuthDrawer.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "1"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "3"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "4"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "5"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "6"]
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"]
],
"public/app/features/auth-config/AuthProvidersListPage.tsx:5381": [
[0, 0, 0, "\'@grafana/data/src/types/config\' import is restricted from being used by a pattern. Import from the public export instead.", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"]
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"]
],
"public/app/features/auth-config/ProviderConfigForm.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "1"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "2"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "3"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "4"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "5"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "6"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "7"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "8"]
],
"public/app/features/auth-config/components/ConfigureAuthCTA.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"]
],
"public/app/features/auth-config/components/ServerDiscoveryModal.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "1"]
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"]
],
"public/app/features/auth-config/fields.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
@@ -2631,9 +2590,7 @@ exports[`better eslint`] = {
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
],
"public/app/features/connections/components/ConnectionsRedirectNotice/ConnectionsRedirectNotice.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"]
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
],
"public/app/features/connections/components/ConnectionsRedirectNotice/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"]
@@ -2661,16 +2618,13 @@ exports[`better eslint`] = {
"public/app/features/connections/tabs/ConnectData/NoAccessModal/NoAccessModal.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "3"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "4"]
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"]
],
"public/app/features/connections/tabs/ConnectData/NoAccessModal/index.tsx:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"]
],
"public/app/features/connections/tabs/ConnectData/Search/Search.tsx:5381": [
[0, 0, 0, "Do not use the t() function outside of a component or function", "0"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "1"]
[0, 0, 0, "Do not use the t() function outside of a component or function", "0"]
],
"public/app/features/connections/tabs/ConnectData/Search/index.tsx:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"]
@@ -3926,98 +3880,41 @@ exports[`better eslint`] = {
"public/app/features/dimensions/utils.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/features/explore/ContentOutline/ContentOutlineItemButton.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"]
],
"public/app/features/explore/CorrelationEditorModeBar.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"]
],
"public/app/features/explore/CorrelationHelper.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "1"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "2"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "3"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "4"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "5"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "6"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "7"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "8"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "9"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "10"]
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "3"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "4"]
],
"public/app/features/explore/CorrelationTransformationAddModal.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "1"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "2"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "3"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "4"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "5"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "6"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "7"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "8"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "9"]
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"]
],
"public/app/features/explore/CorrelationUnsavedChangesModal.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "3"]
],
"public/app/features/explore/Explore.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "1"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "2"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "3"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "4"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "5"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "6"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "7"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "8"]
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"]
],
"public/app/features/explore/ExploreRunQueryButton.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "1"]
],
"public/app/features/explore/ExploreToolbar.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"]
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"]
],
"public/app/features/explore/FeatureTogglePage.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
],
"public/app/features/explore/LiveTailButton.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"]
],
"public/app/features/explore/Logs/LiveLogs.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"]
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
],
"public/app/features/explore/Logs/Logs.test.tsx:5381": [
[0, 0, 0, "\'@grafana/data/src/transformations/transformers/organize\' import is restricted from being used by a pattern. Import from the public export instead.", "0"]
],
"public/app/features/explore/Logs/Logs.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "1"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "2"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "3"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "4"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "5"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "6"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "7"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "8"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "9"],
[0, 0, 0, "Unexpected any. Specify a different type.", "10"]
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
[0, 0, 0, "Unexpected any. Specify a different type.", "2"]
],
"public/app/features/explore/Logs/LogsColumnSearch.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"]
],
"public/app/features/explore/Logs/LogsContainer.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"]
],
"public/app/features/explore/Logs/LogsFeedback.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"]
@@ -4025,19 +3922,8 @@ exports[`better eslint`] = {
"public/app/features/explore/Logs/LogsMetaRow.test.tsx:5381": [
[0, 0, 0, "\'@grafana/data/src/transformations/transformers/organize\' import is restricted from being used by a pattern. Import from the public export instead.", "0"]
],
"public/app/features/explore/Logs/LogsMetaRow.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "1"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "2"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "3"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "4"]
],
"public/app/features/explore/Logs/LogsSamplePanel.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "3"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "4"]
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
],
"public/app/features/explore/Logs/LogsTable.test.tsx:5381": [
[0, 0, 0, "\'@grafana/data/src/transformations/transformers/organize\' import is restricted from being used by a pattern. Import from the public export instead.", "0"]
@@ -4045,43 +3931,24 @@ exports[`better eslint`] = {
"public/app/features/explore/Logs/LogsTableAvailableFields.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"]
],
"public/app/features/explore/Logs/LogsTableEmptyFields.tsx:5381": [
"public/app/features/explore/Logs/LogsTableMultiSelect.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
],
"public/app/features/explore/Logs/LogsTableMultiSelect.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"]
],
"public/app/features/explore/Logs/LogsTableNavField.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "1"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"]
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
],
"public/app/features/explore/Logs/LogsTableWrap.test.tsx:5381": [
[0, 0, 0, "\'@grafana/data/src/transformations/transformers/organize\' import is restricted from being used by a pattern. Import from the public export instead.", "0"]
],
"public/app/features/explore/Logs/LogsTableWrap.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "1"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "2"]
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"]
],
"public/app/features/explore/Logs/LogsVolumePanelList.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "1"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "2"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "3"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "4"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "5"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "6"]
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
],
"public/app/features/explore/MetaInfoText.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
],
"public/app/features/explore/NoDataSourceCallToAction.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"]
],
"public/app/features/explore/NodeGraph/NodeGraphContainer.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"]
@@ -4092,8 +3959,7 @@ exports[`better eslint`] = {
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"]
],
"public/app/features/explore/PrometheusListView/RawListItem.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"]
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
],
"public/app/features/explore/PrometheusListView/RawListItemAttributes.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
@@ -4113,21 +3979,12 @@ exports[`better eslint`] = {
"public/app/features/explore/ShortLinkButtonMenu.tsx:5381": [
[0, 0, 0, "Do not use the t() function outside of a component or function", "0"]
],
"public/app/features/explore/SupplementaryResultError.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
],
"public/app/features/explore/TraceView/TraceView.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"]
],
"public/app/features/explore/TraceView/TraceViewContainer.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"]
[0, 0, 0, "Do not use any type assertions.", "1"]
],
"public/app/features/explore/TraceView/components/TracePageHeader/Actions/TracePageActions.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "1"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"]
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"]
],
"public/app/features/explore/TraceView/components/TracePageHeader/SearchBar/NextPrevResult.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
@@ -4135,10 +3992,7 @@ exports[`better eslint`] = {
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "3"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "4"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "5"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "6"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "7"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "8"]
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "5"]
],
"public/app/features/explore/TraceView/components/TracePageHeader/SearchBar/TracePageSearchBar.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
@@ -4154,35 +4008,7 @@ exports[`better eslint`] = {
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "2"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "3"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "4"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "5"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "6"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "7"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "8"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "9"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "10"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "11"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "12"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "13"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "14"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "15"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "16"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "17"]
],
"public/app/features/explore/TraceView/components/TracePageHeader/SpanFilters/SpanFiltersTags.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "1"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "2"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "3"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "4"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "5"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "6"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "7"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "8"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "9"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "10"]
],
"public/app/features/explore/TraceView/components/TracePageHeader/SpanGraph/ViewingLayer.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "5"]
],
"public/app/features/explore/TraceView/components/TracePageHeader/TracePageHeader.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
@@ -4206,43 +4032,20 @@ exports[`better eslint`] = {
"public/app/features/explore/TraceView/components/TraceTimelineViewer/SpanDetail/AccordianReferences.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "3"]
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"]
],
"public/app/features/explore/TraceView/components/TraceTimelineViewer/SpanDetail/AccordianText.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
],
"public/app/features/explore/TraceView/components/TraceTimelineViewer/SpanDetail/SpanFlameGraph.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
],
"public/app/features/explore/TraceView/components/TraceTimelineViewer/SpanDetail/index.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "1"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "2"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "3"]
],
"public/app/features/explore/TraceView/components/TraceTimelineViewer/TimelineHeaderRow/TimelineCollapser.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "1"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "2"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "3"]
],
"public/app/features/explore/TraceView/components/TraceTimelineViewer/TimelineHeaderRow/TimelineHeaderRow.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
],
"public/app/features/explore/TraceView/components/TraceTimelineViewer/TimelineHeaderRow/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./TimelineHeaderRow\`)", "0"]
],
"public/app/features/explore/TraceView/components/TraceTimelineViewer/VirtualizedTraceView.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"]
],
"public/app/features/explore/TraceView/components/TraceTimelineViewer/utils.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`../utils/date\`)", "0"]
],
"public/app/features/explore/TraceView/components/common/SearchBarInput.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "1"]
],
"public/app/features/explore/TraceView/components/demo/trace-generators.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
@@ -4280,13 +4083,7 @@ exports[`better eslint`] = {
"public/app/features/explore/TraceView/components/settings/SpanBarSettings.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "1"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "2"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "3"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "4"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "5"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "6"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "7"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "8"]
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "2"]
],
"public/app/features/explore/TraceView/components/types/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`../settings/SpanBarSettings\`)", "0"],
@@ -4298,11 +4095,7 @@ exports[`better eslint`] = {
"public/app/features/explore/TraceView/components/utils/DraggableManager/demo/DraggableManagerDemo.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "3"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "4"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "5"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "6"]
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"]
],
"public/app/features/explore/TraceView/components/utils/DraggableManager/demo/index.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./DraggableManagerDemo\`)", "0"]
@@ -4314,31 +4107,18 @@ exports[`better eslint`] = {
],
"public/app/features/explore/TraceView/createSpanLink.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Do not use any type assertions.", "1"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "2"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "3"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "4"]
[0, 0, 0, "Do not use any type assertions.", "1"]
],
"public/app/features/explore/extensions/ConfirmNavigationModal.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "3"]
],
"public/app/features/explore/extensions/toolbar/BasicExtensions.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"]
],
"public/app/features/explore/extensions/toolbar/QuerylessAppsExtensions.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"]
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
],
"public/app/features/explore/hooks/useStateSync/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./external.utils\`)", "0"]
],
"public/app/features/explore/spec/helper/setup.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "1"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"],
[0, 0, 0, "Unexpected any. Specify a different type.", "3"]
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
[0, 0, 0, "Unexpected any. Specify a different type.", "2"]
],
"public/app/features/explore/state/main.test.ts:5381": [
[0, 0, 0, "\'@grafana/data/src/utils/url\' import is restricted from being used by a pattern. Import from the public export instead.", "0"]
@@ -1,4 +1,5 @@
import { FilterInput, InlineField } from '@grafana/ui';
import { t } from 'app/core/internationalization';
interface Props {
searchQuery: string;
@@ -10,7 +11,11 @@ export const ApiKeysActionBar = ({ searchQuery, disabled, onSearchChange }: Prop
return (
<div className="page-action-bar">
<InlineField grow>
<FilterInput placeholder="Search keys" value={searchQuery} onChange={onSearchChange} />
<FilterInput
placeholder={t('api-keys.api-keys-action-bar.placeholder-search-keys', 'Search keys')}
value={searchQuery}
onChange={onSearchChange}
/>
</InlineField>
</div>
);
+15 -5
View File
@@ -6,7 +6,7 @@ import { connect, ConnectedProps } from 'react-redux';
import { InlineField, InlineSwitch, Modal, Button, EmptyState } from '@grafana/ui';
import { Page } from 'app/core/components/Page/Page';
import { contextSrv } from 'app/core/core';
import { t } from 'app/core/internationalization';
import { t, Trans } from 'app/core/internationalization';
import { getTimeZone } from 'app/features/profile/state/selectors';
import { AccessControlAction, ApiKey, ApikeyMigrationResult, StoreState } from 'app/types';
@@ -127,7 +127,10 @@ export class ApiKeysPageUnconnected extends PureComponent<Props, State> {
onSearchChange={this.onSearchQueryChange}
/>
) : null}
<InlineField disabled={includeExpiredDisabled} label="Include expired keys">
<InlineField
disabled={includeExpiredDisabled}
label={t('api-keys.api-keys-page-unconnected.label-include-expired-keys', 'Include expired keys')}
>
<InlineSwitch id="showExpired" value={includeExpired} onChange={this.onIncludeExpiredChange} />
</InlineField>
{apiKeys.length > 0 ? (
@@ -175,10 +178,17 @@ const styles: { [key: string]: React.CSSProperties } = {
export const MigrationSummary: React.FC<MigrationSummaryProps> = ({ visible, data, onDismiss }) => {
return (
<Modal title="Migration summary" isOpen={visible} closeOnBackdropClick={true} onDismiss={onDismiss}>
<Modal
title={t('api-keys.migration-summary.title-migration-summary', 'Migration summary')}
isOpen={visible}
closeOnBackdropClick={true}
onDismiss={onDismiss}
>
{data.failedApikeyIDs.length === 0 && (
<div style={styles.migrationSummary}>
<p>Migration Successful!</p>
<p>
<Trans i18nKey="api-keys.migration-summary.migration-successful">Migration Successful!</Trans>
</p>
<p>
<strong>Total: </strong>
{data.total}
@@ -220,7 +230,7 @@ export const MigrationSummary: React.FC<MigrationSummaryProps> = ({ visible, dat
)}
<Modal.ButtonRow>
<Button variant="secondary" onClick={onDismiss}>
Close
<Trans i18nKey="api-keys.migration-summary.close">Close</Trans>
</Button>
</Modal.ButtonRow>
</Modal>
+17 -6
View File
@@ -3,6 +3,7 @@ import { css } from '@emotion/css';
import { dateTimeFormat, GrafanaTheme2, TimeZone } from '@grafana/data';
import { Button, DeleteButton, Icon, Stack, Tooltip, useTheme2 } from '@grafana/ui';
import { contextSrv } from 'app/core/core';
import { Trans, t } from 'app/core/internationalization';
import { AccessControlAction } from 'app/types';
import { ApiKey } from '../../types';
@@ -22,10 +23,18 @@ export const ApiKeysTable = ({ apiKeys, timeZone, onDelete, onMigrate }: Props)
<table className="filter-table">
<thead>
<tr>
<th>Name</th>
<th>Role</th>
<th>Expires</th>
<th>Last used at</th>
<th>
<Trans i18nKey="api-keys.api-keys-table.name">Name</Trans>
</th>
<th>
<Trans i18nKey="api-keys.api-keys-table.role">Role</Trans>
</th>
<th>
<Trans i18nKey="api-keys.api-keys-table.expires">Expires</Trans>
</th>
<th>
<Trans i18nKey="api-keys.api-keys-table.last-used-at">Last used at</Trans>
</th>
<th style={{ width: '34px' }} />
</tr>
</thead>
@@ -51,10 +60,12 @@ export const ApiKeysTable = ({ apiKeys, timeZone, onDelete, onMigrate }: Props)
<td>
<Stack justifyContent="flex-end">
<Button size="sm" onClick={() => onMigrate(key)}>
Migrate to service account
<Trans i18nKey="api-keys.api-keys-table.migrate-to-service-account">
Migrate to service account
</Trans>
</Button>
<DeleteButton
aria-label="Delete API key"
aria-label={t('api-keys.api-keys-table.aria-label-delete-api-key', 'Delete API key')}
size="sm"
onConfirm={() => onDelete(key)}
disabled={!contextSrv.hasPermissionInMetadata(AccessControlAction.ActionAPIKeysDelete, key)}
@@ -3,6 +3,7 @@ import { useState } from 'react';
import { GrafanaTheme2 } from '@grafana/data';
import { Alert, Button, ConfirmModal, useStyles2 } from '@grafana/ui';
import { Trans, t } from 'app/core/internationalization';
interface Props {
onMigrate: () => void;
@@ -21,15 +22,29 @@ export const MigrateToServiceAccountsCard = ({ onMigrate, apikeysCount, disabled
target="_blank"
rel="noopener noreferrer"
>
Find out more about the migration here.
<Trans i18nKey="api-keys.migrate-to-service-accounts-card.docs-link.about-migration">
Find out more about the migration here.
</Trans>
</a>
);
const migrationBoxDesc = <span>Migrating all API keys will hide the API keys tab.</span>;
const migrationBoxDesc = (
<span>
<Trans i18nKey="api-keys.migrate-to-service-accounts-card.migration-box-desc.migrating">
Migrating all API keys will hide the API keys tab.
</Trans>
</span>
);
return (
<>
{apikeysCount > 0 && (
<Alert title="Switch from API keys to service accounts" severity="warning">
<Alert
title={t(
'api-keys.migrate-to-service-accounts-card.title-switch-service-accounts',
'Switch from API keys to service accounts'
)}
severity="warning"
>
<div className={styles.text}>
API keys are deprecated and will be removed from Grafana on Jan 31, 2025. Each API key will be migrated into
a service account with a token and will continue to work as they were. We encourage you to migrate your API
@@ -37,7 +52,9 @@ export const MigrateToServiceAccountsCard = ({ onMigrate, apikeysCount, disabled
</div>
<div className={styles.actionRow}>
<Button className={styles.actionButton} onClick={() => setIsModalOpen(true)}>
Migrate all service accounts
<Trans i18nKey="api-keys.migrate-to-service-accounts-card.migrate-all-service-accounts">
Migrate all service accounts
</Trans>
</Button>
<ConfirmModal
title={'Migrate API keys to Service accounts'}
@@ -54,7 +71,10 @@ export const MigrateToServiceAccountsCard = ({ onMigrate, apikeysCount, disabled
)}
{apikeysCount === 0 && (
<>
<Alert title="No API keys found" severity="warning">
<Alert
title={t('api-keys.migrate-to-service-accounts-card.title-no-api-keys-found', 'No API keys found')}
severity="warning"
>
<div className={styles.text}>
No API keys were found. If you reload the browser, this page will not be available anymore.
</div>
+16 -4
View File
@@ -5,6 +5,7 @@ import { connect, ConnectedProps } from 'react-redux';
import { GrafanaTheme2 } from '@grafana/data';
import { Button, Drawer, Text, TextLink, Switch, useStyles2 } from '@grafana/ui';
import { useAppNotification } from 'app/core/copy/appNotification';
import { t, Trans } from 'app/core/internationalization';
import { StoreState } from 'app/types';
import { loadSettings, saveSettings } from './state/actions';
@@ -84,10 +85,21 @@ export const AuthDrawerUnconnected = ({
const styles = useStyles2(getStyles);
return (
<Drawer title="Auth Settings" subtitle={subtitle} size="md" onClose={onClose}>
<Drawer
title={t('auth-config.auth-drawer-unconnected.title-auth-settings', 'Auth settings')}
subtitle={subtitle}
size="md"
onClose={onClose}
>
<div className={styles.advancedAuth}>
<Text variant="h4">Advanced Auth</Text>
<Text variant="h5">Enable insecure email lookup</Text>
<Text variant="h4">
<Trans i18nKey="auth-config.auth-drawer-unconnected.advanced-auth">Advanced Auth</Trans>
</Text>
<Text variant="h5">
<Trans i18nKey="auth-config.auth-drawer-unconnected.enable-insecure-email-lookup">
Enable insecure email lookup
</Trans>
</Text>
<Text variant="body" color="secondary">
Allow users to use the same email address to log into Grafana with different identity providers.
</Text>
@@ -100,7 +112,7 @@ export const AuthDrawerUnconnected = ({
onClick={resetButtonOnClick}
tooltip="This action will disregard any saved changes and load the configuration from the configuration file."
>
Reset
<Trans i18nKey="auth-config.auth-drawer-unconnected.reset">Reset</Trans>
</Button>
</Drawer>
);
@@ -6,6 +6,7 @@ import { reportInteraction } from '@grafana/runtime';
import { Grid, TextLink, ToolbarButton } from '@grafana/ui';
import { Page } from 'app/core/components/Page/Page';
import { config } from 'app/core/config';
import { Trans } from 'app/core/internationalization';
import { StoreState } from 'app/types';
import AuthDrawer from './AuthDrawer';
@@ -95,7 +96,7 @@ export const AuthConfigPageUnconnected = ({
actions={
config.buildInfo.edition !== GrafanaEdition.OpenSource && (
<ToolbarButton icon="cog" variant="canvas" onClick={() => setShowDrawer(true)}>
Auth settings
<Trans i18nKey="auth-config.auth-config-page-unconnected.auth-settings">Auth settings</Trans>
</ToolbarButton>
)
}
@@ -16,6 +16,7 @@ import {
Stack,
Switch,
} from '@grafana/ui';
import { t, Trans } from 'app/core/internationalization';
import { FormPrompt } from '../../core/components/FormPrompt/FormPrompt';
import { Page } from '../../core/components/Page/Page';
@@ -54,7 +55,10 @@ export const ProviderConfigForm = ({ config, provider, isLoading }: ProviderConf
const additionalActionsMenu = (
<Menu>
<Menu.Item
label="Reset to default values"
label={t(
'auth-config.provider-config-form.additional-actions-menu.label-reset-to-default-values',
'Reset to default values'
)}
icon="history-alt"
onClick={() => {
setResetConfig(true);
@@ -163,7 +167,7 @@ export const ProviderConfigForm = ({ config, provider, isLoading }: ProviderConf
reset();
}}
/>
<Field label="Enabled" hidden={true}>
<Field label={t('auth-config.provider-config-form.label-enabled', 'Enabled')} hidden={true}>
<Switch {...register('enabled')} id="enabled" label={'Enabled'} />
</Field>
<Stack gap={2} direction={'column'}>
@@ -210,13 +214,13 @@ export const ProviderConfigForm = ({ config, provider, isLoading }: ProviderConf
{isSaving ? 'Saving...' : 'Save'}
</Button>
<LinkButton href={'/admin/authentication'} variant={'secondary'}>
Discard
<Trans i18nKey="auth-config.provider-config-form.discard">Discard</Trans>
</LinkButton>
<Dropdown overlay={additionalActionsMenu} placement="bottom-start">
<IconButton
tooltip="More actions"
title="More actions"
tooltip={t('auth-config.provider-config-form.tooltip-more-actions', 'More actions')}
title={t('auth-config.provider-config-form.title-more-actions', 'More actions')}
tooltipPlacement="top"
size="md"
variant="secondary"
@@ -231,10 +235,14 @@ export const ProviderConfigForm = ({ config, provider, isLoading }: ProviderConf
<ConfirmModal
isOpen
icon="trash-alt"
title="Reset"
title={t('auth-config.provider-config-form.title-reset', 'Reset')}
body={
<Stack direction={'column'} gap={3}>
<span>Are you sure you want to reset this configuration?</span>
<span>
<Trans i18nKey="auth-config.provider-config-form.reset-configuration">
Are you sure you want to reset this configuration?
</Trans>
</span>
<small>
After resetting these settings Grafana will use the provider configuration from the system (config
file/environment variables) if any.
@@ -3,6 +3,7 @@ import * as React from 'react';
import { GrafanaTheme2 } from '@grafana/data';
import { Icon, Stack, Text, TextLink, useStyles2 } from '@grafana/ui';
import { Trans } from 'app/core/internationalization';
export interface Props {}
@@ -12,13 +13,19 @@ const ConfigureAuthCTA: React.FunctionComponent<Props> = () => {
<div className={styles.container}>
<Stack gap={1} alignItems={'center'}>
<Icon name={'cog'} />
<Text>Configuration required</Text>
<Text>
<Trans i18nKey="auth-config.configure-auth-cta.configuration-required">Configuration required</Trans>
</Text>
</Stack>
<Text variant={'bodySmall'} color={'secondary'}>
You have no authentication configuration created at the moment.
<Trans i18nKey="auth-config.configure-auth-cta.authentication-configuration-created-moment">
You have no authentication configuration created at the moment.
</Trans>
</Text>
<TextLink href={'https://grafana.com/docs/grafana/latest/auth/overview/'} external>
Refer to the documentation on how to configure authentication
<Trans i18nKey="auth-config.configure-auth-cta.refer-documentation-configure-authentication">
Refer to the documentation on how to configure authentication
</Trans>
</TextLink>
</div>
);
@@ -1,6 +1,7 @@
import { useForm } from 'react-hook-form';
import { Button, Input, Field, Modal } from '@grafana/ui';
import { t } from 'app/core/internationalization';
import { Trans } from '../../../core/internationalization';
import { ServerDiscoveryFormData } from '../types';
@@ -38,7 +39,15 @@ export const ServerDiscoveryModal = ({ isOpen, onClose, onSuccess, isLoading }:
};
return (
<Modal title="OpenID Connect Discovery URL" onDismiss={onClose} onClickBackdrop={onClose} isOpen={isOpen}>
<Modal
title={t(
'auth-config.server-discovery-modal.title-open-id-connect-discovery-url',
'OpenID Connect Discovery URL'
)}
onDismiss={onClose}
onClickBackdrop={onClose}
isOpen={isOpen}
>
<form
onSubmit={(e) => {
e.stopPropagation();
@@ -46,7 +55,10 @@ export const ServerDiscoveryModal = ({ isOpen, onClose, onSuccess, isLoading }:
}}
>
<Field
label="The .well-known/openid-configuration endpoint for your IdP"
label={t(
'auth-config.server-discovery-modal.label-the-wellknownopenidconfiguration-endpoint-for-your-id-p',
'The .well-known/openid-configuration endpoint for your IdP'
)}
invalid={!!errors.url}
error={errors.url?.message}
htmlFor="url"
@@ -3,6 +3,7 @@ import { useState } from 'react';
import { GrafanaTheme2 } from '@grafana/data';
import { Alert, LinkButton, useStyles2 } from '@grafana/ui';
import { t, Trans } from 'app/core/internationalization';
import { contextSrv } from '../../../../core/core';
import { AccessControlAction } from '../../../../types';
@@ -36,8 +37,16 @@ export function ConnectionsRedirectNotice() {
Data sources have a new home! You can discover new data sources or manage existing ones in the Connections
page, accessible from the main menu.
</p>
<LinkButton aria-label="Link to Connections" icon="arrow-right" href={ROUTES.DataSources} fill="text">
Go to connections
<LinkButton
aria-label={t(
'connections.connections-redirect-notice.aria-label-link-to-connections',
'Link to Connections'
)}
icon="arrow-right"
href={ROUTES.DataSources}
fill="text"
>
<Trans i18nKey="connections.connections-redirect-notice.go-to-connections">Go to connections</Trans>
</LinkButton>
</div>
</Alert>
@@ -2,6 +2,7 @@ import { css } from '@emotion/css';
import { GrafanaTheme2 } from '@grafana/data';
import { useStyles2, Modal, Icon, Button } from '@grafana/ui';
import { Trans } from 'app/core/internationalization';
import { type CardGridItem } from '../CardGrid';
@@ -92,11 +93,17 @@ export function NoAccessModal({ item, isOpen, onDismiss }: NoAccessModalProps) {
Editors cannot add new connections. You may check to see if it is already configured in{' '}
<a href="/connections/datasources">Data sources</a>.
</p>
<p>To add a new connection, contact your Grafana admin.</p>
<p>
<Trans i18nKey="connections.no-access-modal.connection-contact-grafana-admin">
To add a new connection, contact your Grafana admin.
</Trans>
</p>
</div>
</div>
<div className={styles.actionsSection}>
<Button onClick={onDismiss}>Okay</Button>
<Button onClick={onDismiss}>
<Trans i18nKey="connections.no-access-modal.okay">Okay</Trans>
</Button>
</div>
</div>
</Modal>
@@ -37,7 +37,7 @@ export const Search = ({ onChange, value }: Props) => {
onChange={onChange}
prefix={<Icon name="search" />}
placeholder={placeholder}
aria-label="Search all"
aria-label={t('connections.search.aria-label-search-all', 'Search all')}
/>
</div>
);
@@ -5,6 +5,7 @@ import * as React from 'react';
import { IconName, isIconName, GrafanaTheme2 } from '@grafana/data';
import { Button, Icon, Tooltip, useTheme2 } from '@grafana/ui';
import { TooltipPlacement } from '@grafana/ui/internal';
import { t } from 'app/core/internationalization';
type CommonProps = {
contentOutlineExpanded?: boolean;
@@ -64,7 +65,10 @@ export function ContentOutlineItemButton({
<button
className={styles.collapseButton}
onClick={toggleCollapsed}
aria-label="Content outline item collapse button"
aria-label={t(
'explore.content-outline-item-button.body.aria-label-content-outline-item-collapse-button',
'Content outline item collapse button'
)}
aria-expanded={!collapsed}
aria-controls={sectionId}
>
@@ -6,6 +6,7 @@ import { GrafanaTheme2, colorManipulator } from '@grafana/data';
import { reportInteraction } from '@grafana/runtime';
import { Button, Icon, Stack, Tooltip, useStyles2 } from '@grafana/ui';
import { Prompt } from 'app/core/components/FormPrompt/Prompt';
import { Trans } from 'app/core/internationalization';
import { CORRELATION_EDITOR_POST_CONFIRM_ACTION, ExploreItemState, useDispatch, useSelector } from 'app/types';
import { CorrelationUnsavedChangesModal } from './CorrelationUnsavedChangesModal';
@@ -242,7 +243,7 @@ export const CorrelationEditorModeBar = ({ panes }: { panes: Array<[string, Expl
saveCorrelationPostAction(true);
}}
>
Save
<Trans i18nKey="explore.correlation-editor-mode-bar.save">Save</Trans>
</Button>
<Button
variant="secondary"
@@ -254,7 +255,7 @@ export const CorrelationEditorModeBar = ({ panes }: { panes: Array<[string, Expl
reportInteraction('grafana_explore_correlation_editor_exit_pressed');
}}
>
Exit correlation editor
<Trans i18nKey="explore.correlation-editor-mode-bar.exit-correlation-editor">Exit correlation editor</Trans>
</Button>
</Stack>
</div>
@@ -18,6 +18,7 @@ import {
Icon,
Stack,
} from '@grafana/ui';
import { t, Trans } from 'app/core/internationalization';
import { useDispatch, useSelector } from 'app/types';
import { getTransformationVars } from '../correlations/transformations';
@@ -156,7 +157,7 @@ export const CorrelationHelper = ({ exploreId, correlations }: Props) => {
}
/>
)}
<Alert title="Correlation details" severity="info">
<Alert title={t('explore.correlation-helper.title-correlation-details', 'Correlation details')} severity="info">
The correlation link will appear by the <code>{correlations.resultField}</code> field. You can use the following
variables to set up your correlations:
<pre>
@@ -179,7 +180,7 @@ export const CorrelationHelper = ({ exploreId, correlations }: Props) => {
</Stack>
}
>
<Field label="Label" htmlFor={`${id}-label`}>
<Field label={t('explore.correlation-helper.label-label', 'Label')} htmlFor={`${id}-label`}>
<Input
{...register('label')}
id={`${id}-label`}
@@ -190,7 +191,7 @@ export const CorrelationHelper = ({ exploreId, correlations }: Props) => {
}}
/>
</Field>
<Field label="Description" htmlFor={`${id}-description`}>
<Field label={t('explore.correlation-helper.label-description', 'Description')} htmlFor={`${id}-description`}>
<Input {...register('description')} id={`${id}-description`} />
</Field>
</Collapse>
@@ -217,7 +218,7 @@ export const CorrelationHelper = ({ exploreId, correlations }: Props) => {
}}
className={styles.transformationAction}
>
Add transformation
<Trans i18nKey="explore.correlation-helper.add-transformation">Add transformation</Trans>
</Button>
{transformations.map((transformation, i) => {
const { type, field, expression, mapValue } = transformation;
@@ -241,14 +242,17 @@ export const CorrelationHelper = ({ exploreId, correlations }: Props) => {
<IconButton
key="edit"
name="edit"
aria-label="edit transformation"
aria-label={t('explore.correlation-helper.aria-label-edit-transformation', 'Edit transformation')}
onClick={() => {
setTransformationIdxToEdit(i);
setShowTransformationAddModal(true);
}}
/>
<DeleteButton
aria-label="delete transformation"
aria-label={t(
'explore.correlation-helper.aria-label-delete-transformation',
'Delete transformation'
)}
onConfirm={() => setTransformations(transformations.filter((_, idx) => i !== idx))}
closeOnConfirm
/>
@@ -5,6 +5,7 @@ import { useForm, Controller } from 'react-hook-form';
import { DataLinkTransformationConfig, ScopedVars } from '@grafana/data';
import { Button, Field, Icon, Input, Label, Modal, Select, Tooltip, Stack } from '@grafana/ui';
import { t, Trans } from 'app/core/internationalization';
import {
getSupportedTransTypeDetails,
@@ -137,7 +138,7 @@ export const CorrelationTransformationAddModal = ({
A transformation extracts variables out of a single field. These variables will be available along with your
field variables.
</p>
<Field label="Field">
<Field label={t('explore.correlation-transformation-add-modal.label-field', 'Field')}>
<Controller
control={control}
render={({ field: { onChange, ref, ...field } }) => (
@@ -152,7 +153,7 @@ export const CorrelationTransformationAddModal = ({
options={Object.entries(fieldList).map((entry) => {
return { label: entry[0], value: entry[0] };
})}
aria-label="field"
aria-label={t('explore.correlation-transformation-add-modal.aria-label-field', 'Field')}
/>
)}
name={`field` as const}
@@ -168,7 +169,7 @@ export const CorrelationTransformationAddModal = ({
autoEscape={false}
/>
</pre>
<Field label="Type">
<Field label={t('explore.correlation-transformation-add-modal.label-type', 'Type')}>
<Controller
control={control}
render={({ field: { onChange, ref, ...field } }) => (
@@ -183,7 +184,7 @@ export const CorrelationTransformationAddModal = ({
});
}}
options={getTransformOptions()}
aria-label="type"
aria-label={t('explore.correlation-transformation-add-modal.aria-label-type', 'Type')}
/>
)}
name={`type` as const}
@@ -193,7 +194,10 @@ export const CorrelationTransformationAddModal = ({
<Field
label={
formFieldsVis.expressionDetails.helpText ? (
<LabelWithTooltip label="Expression" tooltipText={formFieldsVis.expressionDetails.helpText} />
<LabelWithTooltip
label={t('explore.correlation-transformation-add-modal.label-expression', 'Expression')}
tooltipText={formFieldsVis.expressionDetails.helpText}
/>
) : (
'Expression'
)
@@ -208,9 +212,12 @@ export const CorrelationTransformationAddModal = ({
<Field
label={
formFieldsVis.mapValueDetails.helpText ? (
<LabelWithTooltip label="Variable Name" tooltipText={formFieldsVis.mapValueDetails.helpText} />
<LabelWithTooltip
label={t('explore.correlation-transformation-add-modal.label-variable-name', 'Variable name')}
tooltipText={formFieldsVis.mapValueDetails.helpText}
/>
) : (
'Variable Name'
'Variable name'
)
}
htmlFor={`${id}-mapValue`}
@@ -232,7 +239,7 @@ export const CorrelationTransformationAddModal = ({
)}
<Modal.ButtonRow>
<Button variant="secondary" onClick={onCancel} fill="outline">
Cancel
<Trans i18nKey="explore.correlation-transformation-add-modal.cancel">Cancel</Trans>
</Button>
<Button variant="primary" onClick={() => onSave(getValues())} disabled={!validToSave}>
{transformationToEdit ? 'Edit transformation' : 'Add transformation to correlation'}
@@ -1,6 +1,7 @@
import { css } from '@emotion/css';
import { Button, Modal } from '@grafana/ui';
import { Trans } from 'app/core/internationalization';
interface UnsavedChangesModalProps {
message: string;
@@ -21,13 +22,15 @@ export const CorrelationUnsavedChangesModal = ({ onSave, onDiscard, onCancel, me
<h5>{message}</h5>
<Modal.ButtonRow>
<Button variant="secondary" onClick={onCancel} fill="outline">
Cancel
<Trans i18nKey="explore.correlation-unsaved-changes-modal.cancel">Cancel</Trans>
</Button>
<Button variant="destructive" onClick={onDiscard}>
Continue without saving
<Trans i18nKey="explore.correlation-unsaved-changes-modal.continue-without-saving">
Continue without saving
</Trans>
</Button>
<Button variant="primary" onClick={onSave}>
Save correlation
<Trans i18nKey="explore.correlation-unsaved-changes-modal.save-correlation">Save correlation</Trans>
</Button>
</Modal.ButtonRow>
</Modal>
+36 -9
View File
@@ -31,6 +31,7 @@ import {
} from '@grafana/ui';
import { FILTER_FOR_OPERATOR, FILTER_OUT_OPERATOR } from '@grafana/ui/internal';
import { supportedFeatures } from 'app/core/history/richHistoryStorageProvider';
import { t } from 'app/core/internationalization';
import { MIXED_DATASOURCE_NAME } from 'app/plugins/datasource/mixed/MixedDataSource';
import { StoreState } from 'app/types';
@@ -371,7 +372,7 @@ export class Explore extends PureComponent<Props, ExploreState> {
const { graphResult, timeZone, queryResponse, showFlameGraph } = this.props;
return (
<ContentOutlineItem panelId="Graph" title="Graph" icon="graph-bar">
<ContentOutlineItem panelId="Graph" title={t('explore.explore.title-graph', 'Graph')} icon="graph-bar">
<GraphContainer
data={graphResult!}
height={showFlameGraph ? 180 : 400}
@@ -391,7 +392,7 @@ export class Explore extends PureComponent<Props, ExploreState> {
renderTablePanel(width: number) {
const { exploreId, timeZone } = this.props;
return (
<ContentOutlineItem panelId="Table" title="Table" icon="table">
<ContentOutlineItem panelId="Table" title={t('explore.explore.title-table', 'Table')} icon="table">
<TableContainer
ariaLabel={selectors.pages.Explore.General.table}
width={width}
@@ -407,7 +408,11 @@ export class Explore extends PureComponent<Props, ExploreState> {
renderRawPrometheus(width: number) {
const { exploreId, datasourceInstance, timeZone } = this.props;
return (
<ContentOutlineItem panelId="Raw Prometheus" title="Raw Prometheus" icon="gf-prometheus">
<ContentOutlineItem
panelId="Raw Prometheus"
title={t('explore.explore.title-raw-prometheus', 'Raw Prometheus')}
icon="gf-prometheus"
>
<RawPrometheusContainer
showRawPrometheus={true}
ariaLabel={selectors.pages.Explore.General.table}
@@ -433,7 +438,12 @@ export class Explore extends PureComponent<Props, ExploreState> {
gap: theme.spacing(1),
});
return (
<ContentOutlineItem panelId="Logs" title="Logs" icon="gf-logs" className={logsContentOutlineWrapper}>
<ContentOutlineItem
panelId="Logs"
title={t('explore.explore.title-logs', 'Logs')}
icon="gf-logs"
className={logsContentOutlineWrapper}
>
<LogsContainer
exploreId={exploreId}
loadingState={queryResponse.state}
@@ -459,7 +469,11 @@ export class Explore extends PureComponent<Props, ExploreState> {
const { logsSample, timeZone, setSupplementaryQueryEnabled, exploreId, datasourceInstance, queries } = this.props;
return (
<ContentOutlineItem panelId="Logs Sample" title="Logs Sample" icon="gf-logs">
<ContentOutlineItem
panelId="Logs Sample"
title={t('explore.explore.title-logs-sample', 'Logs sample')}
icon="gf-logs"
>
<LogsSamplePanel
queryResponse={logsSample.data}
timeZone={timeZone}
@@ -480,7 +494,11 @@ export class Explore extends PureComponent<Props, ExploreState> {
const datasourceType = datasourceInstance ? datasourceInstance?.type : 'unknown';
return (
<ContentOutlineItem panelId="Node Graph" title="Node Graph" icon="code-branch">
<ContentOutlineItem
panelId="Node Graph"
title={t('explore.explore.title-node-graph', 'Node graph')}
icon="code-branch"
>
<NodeGraphContainer
dataFrames={queryResponse.nodeGraphFrames}
exploreId={exploreId}
@@ -495,7 +513,11 @@ export class Explore extends PureComponent<Props, ExploreState> {
renderFlameGraphPanel() {
const { queryResponse } = this.props;
return (
<ContentOutlineItem panelId="Flame Graph" title="Flame Graph" icon="fire">
<ContentOutlineItem
panelId="Flame Graph"
title={t('explore.explore.title-flame-graph', 'Flame graph')}
icon="fire"
>
<FlameGraphExploreContainer dataFrames={queryResponse.flameGraphFrames} />
</ContentOutlineItem>
);
@@ -508,7 +530,7 @@ export class Explore extends PureComponent<Props, ExploreState> {
return (
// If there is no data (like 404) we show a separate error so no need to show anything here
dataFrames.length && (
<ContentOutlineItem panelId="Traces" title="Traces" icon="file-alt">
<ContentOutlineItem panelId="Traces" title={t('explore.explore.title-traces', 'Traces')} icon="file-alt">
<TraceViewContainer
exploreId={exploreId}
dataFrames={dataFrames}
@@ -593,7 +615,12 @@ export class Explore extends PureComponent<Props, ExploreState> {
<div className={styles.exploreContainer}>
{datasourceInstance ? (
<>
<ContentOutlineItem panelId="Queries" title="Queries" icon="arrow" mergeSingleChild={true}>
<ContentOutlineItem
panelId="Queries"
title={t('explore.explore.title-queries', 'Queries')}
icon="arrow"
mergeSingleChild={true}
>
<PanelContainer className={styles.queryContainer}>
<DrilldownAlertBox datasourceType={datasourceInstance?.type || ''} />
{correlationsBox}
@@ -118,7 +118,14 @@ export function ExploreRunQueryButton({
return (
<Dropdown onVisibleChange={(state) => setOpenRunQueryButton(state)} placement="bottom-start" overlay={menu}>
<ToolbarButton aria-label="run query options" variant="canvas" isOpen={openRunQueryButton}>
<ToolbarButton
aria-label={t(
'explore.explore-run-query-button.run-button.aria-label-run-query-options',
'Run query options'
)}
variant="canvas"
isOpen={openRunQueryButton}
>
{t('explore.run-query.run-query-button', 'Run query')}
</ToolbarButton>
</Dropdown>
@@ -227,7 +227,7 @@ export function ExploreToolbar({ exploreId, onChangeTime, onContentOutlineToogle
<ToolbarButton
key="content-outline"
variant="canvas"
tooltip="Content outline"
tooltip={t('explore.explore-toolbar.tooltip-content-outline', 'Content outline')}
icon="list-ui-alt"
iconOnly={splitted}
onClick={onContentOutlineToogle}
@@ -235,7 +235,7 @@ export function ExploreToolbar({ exploreId, onChangeTime, onContentOutlineToogle
aria-controls={isContentOutlineOpen ? 'content-outline-container' : undefined}
className={styles.toolbarButton}
>
Outline
<Trans i18nKey="explore.explore-toolbar.outline">Outline</Trans>
</ToolbarButton>,
<DataSourcePicker
key={`${exploreId}-ds-picker`}
+22 -2
View File
@@ -3,6 +3,7 @@ import { useRef } from 'react';
import { CSSTransition } from 'react-transition-group';
import { Tooltip, ButtonGroup, ToolbarButton } from '@grafana/ui';
import { Trans } from 'app/core/internationalization';
type LiveTailButtonProps = {
splitted: boolean;
@@ -23,7 +24,17 @@ export function LiveTailButton(props: LiveTailButtonProps) {
return (
<ButtonGroup>
<Tooltip
content={isLive && !isPaused ? <>Pause the live stream</> : <>Start live stream your logs</>}
content={
isLive && !isPaused ? (
<>
<Trans i18nKey="explore.live-tail-button.pause-the-live-stream">Pause the live stream</Trans>
</>
) : (
<>
<Trans i18nKey="explore.live-tail-button.start-live-stream-your-logs">Start live stream your logs</Trans>
</>
)
}
placement="bottom"
>
<ToolbarButton
@@ -49,7 +60,16 @@ export function LiveTailButton(props: LiveTailButtonProps) {
}}
nodeRef={transitionRef}
>
<Tooltip content={<>Stop and exit the live stream</>} placement="bottom">
<Tooltip
content={
<>
<Trans i18nKey="explore.live-tail-button.stop-and-exit-the-live-stream">
Stop and exit the live stream
</Trans>
</>
}
placement="bottom"
>
<ToolbarButton ref={transitionRef} variant={buttonVariant} onClick={stop} icon="square-shape" />
</Tooltip>
</CSSTransition>
@@ -6,6 +6,7 @@ import tinycolor from 'tinycolor2';
import { LogRowModel, dateTimeFormat, GrafanaTheme2, LogsSortOrder } from '@grafana/data';
import { TimeZone } from '@grafana/schema';
import { Button, Themeable2, withTheme2 } from '@grafana/ui';
import { Trans } from 'app/core/internationalization';
import { LogMessageAnsi } from '../../logs/components/LogMessageAnsi';
import { getLogRowStyles } from '../../logs/components/getLogRowStyles';
@@ -172,10 +173,10 @@ class LiveLogs extends PureComponent<Props, State> {
{isPaused ? 'Resume' : 'Pause'}
</Button>
<Button icon="trash-alt" variant="secondary" onClick={onClear} className={styles.button}>
Clear logs
<Trans i18nKey="explore.live-logs.clear-logs">Clear logs</Trans>
</Button>
<Button icon="square-shape" variant="secondary" onClick={this.props.stopLive} className={styles.button}>
Exit live mode
<Trans i18nKey="explore.live-logs.exit-live-mode">Exit live mode</Trans>
</Button>
{isPaused ||
(this.rowsToRender().length > 0 && (
+29 -9
View File
@@ -49,7 +49,7 @@ import {
withTheme2,
} from '@grafana/ui';
import { mapMouseEventToMode } from '@grafana/ui/internal';
import { Trans } from 'app/core/internationalization';
import { Trans, t } from 'app/core/internationalization';
import store from 'app/core/store';
import { createAndCopyShortLink, getLogsPermalinkRange } from 'app/core/utils/shortLinks';
import { InfiniteScroll } from 'app/features/logs/components/InfiniteScroll';
@@ -804,7 +804,7 @@ const UnthemedLogs: React.FunctionComponent<Props> = (props: Props) => {
/>
)}
<PanelChrome
title="Logs volume"
title={t('explore.unthemed-logs.title-logs-volume', 'Logs volume')}
collapsible
collapsed={!logsVolumeEnabled}
onToggleCollapse={onToggleLogsVolumeCollapse}
@@ -829,7 +829,7 @@ const UnthemedLogs: React.FunctionComponent<Props> = (props: Props) => {
titleItems={[
config.featureToggles.logsExploreTableVisualisation ? (
visualisationType === 'logs' ? null : (
<PanelChrome.TitleItem title="Feedback" key="A">
<PanelChrome.TitleItem title={t('explore.unthemed-logs.title-feedback', 'Feedback')} key="A">
<LogsFeedback feedbackUrl="https://forms.gle/5YyKdRQJ5hzq4c289" />
</PanelChrome.TitleItem>
)
@@ -868,7 +868,11 @@ const UnthemedLogs: React.FunctionComponent<Props> = (props: Props) => {
{visualisationType !== 'table' && (
<div className={styles.logOptions}>
<InlineFieldRow>
<InlineField label="Time" className={styles.horizontalInlineLabel} transparent>
<InlineField
label={t('explore.unthemed-logs.label-time', 'Time')}
className={styles.horizontalInlineLabel}
transparent
>
<InlineSwitch
value={showTime}
onChange={onChangeShowTime}
@@ -877,7 +881,11 @@ const UnthemedLogs: React.FunctionComponent<Props> = (props: Props) => {
id={`show-time_${exploreId}`}
/>
</InlineField>
<InlineField label="Unique labels" className={styles.horizontalInlineLabel} transparent>
<InlineField
label={t('explore.unthemed-logs.label-unique-labels', 'Unique labels')}
className={styles.horizontalInlineLabel}
transparent
>
<InlineSwitch
value={showLabels}
onChange={onChangeLabels}
@@ -886,7 +894,11 @@ const UnthemedLogs: React.FunctionComponent<Props> = (props: Props) => {
id={`unique-labels_${exploreId}`}
/>
</InlineField>
<InlineField label="Wrap lines" className={styles.horizontalInlineLabel} transparent>
<InlineField
label={t('explore.unthemed-logs.label-wrap-lines', 'Wrap lines')}
className={styles.horizontalInlineLabel}
transparent
>
<InlineSwitch
value={wrapLogMessage}
onChange={onChangeWrapLogMessage}
@@ -895,7 +907,11 @@ const UnthemedLogs: React.FunctionComponent<Props> = (props: Props) => {
id={`wrap-lines_${exploreId}`}
/>
</InlineField>
<InlineField label="Prettify JSON" className={styles.horizontalInlineLabel} transparent>
<InlineField
label={t('explore.unthemed-logs.label-prettify-json', 'Prettify JSON')}
className={styles.horizontalInlineLabel}
transparent
>
<InlineSwitch
value={prettifyLogMessage}
onChange={onChangePrettifyLogMessage}
@@ -904,7 +920,11 @@ const UnthemedLogs: React.FunctionComponent<Props> = (props: Props) => {
id={`prettify_${exploreId}`}
/>
</InlineField>
<InlineField label="Deduplication" className={styles.horizontalInlineLabel} transparent>
<InlineField
label={t('explore.unthemed-logs.label-deduplication', 'Deduplication')}
className={styles.horizontalInlineLabel}
transparent
>
<RadioButtonGroup
options={DEDUP_OPTIONS.map((dedupType) => ({
label: capitalize(dedupType),
@@ -920,7 +940,7 @@ const UnthemedLogs: React.FunctionComponent<Props> = (props: Props) => {
<div>
<InlineField
label="Display results"
label={t('explore.unthemed-logs.label-display-results', 'Display results')}
className={styles.horizontalInlineLabel}
transparent
disabled={isFlipping || loading}
@@ -25,6 +25,7 @@ import {
import { getDataSourceSrv } from '@grafana/runtime';
import { DataQuery } from '@grafana/schema';
import { Collapse } from '@grafana/ui';
import { t } from 'app/core/internationalization';
import { MIXED_DATASOURCE_NAME } from 'app/plugins/datasource/mixed/MixedDataSource';
import { StoreState } from 'app/types';
import { ExploreItemState } from 'app/types/explore';
@@ -300,7 +301,7 @@ class LogsContainer extends PureComponent<LogsContainerProps, LogsContainerState
return (
<>
<LogsCrossFadeTransition visible={isLive}>
<Collapse label="Logs" loading={false} isOpen>
<Collapse label={t('explore.logs-container.label-logs', 'Logs')} loading={false} isOpen>
<LiveTailControls exploreId={exploreId}>
{(controls) => (
<LiveLogsWithTheme
@@ -18,6 +18,7 @@ import {
import { DataFrame } from '@grafana/data/';
import { config, reportInteraction } from '@grafana/runtime';
import { Button, Dropdown, Menu, ToolbarButton, Tooltip, useStyles2 } from '@grafana/ui';
import { Trans } from 'app/core/internationalization';
import { downloadDataFrameAsCsv, downloadLogsModelAsTxt } from '../../inspector/utils/download';
import { LogLabels, LogLabelsList } from '../../logs/components/LogLabels';
@@ -140,7 +141,7 @@ export const LogsMetaRow = memo(
label: '',
value: (
<Button variant="primary" fill="outline" size="sm" onClick={clearDetectedFields}>
Show original line
<Trans i18nKey="explore.logs-meta-row.show-original-line">Show original line</Trans>
</Button>
),
}
@@ -165,8 +166,11 @@ export const LogsMetaRow = memo(
}
const downloadMenu = (
<Menu>
{/* eslint-disable-next-line @grafana/no-untranslated-strings */}
<Menu.Item label="txt" onClick={() => downloadLogs(DownloadFormat.Text)} />
{/* eslint-disable-next-line @grafana/no-untranslated-strings */}
<Menu.Item label="json" onClick={() => downloadLogs(DownloadFormat.Json)} />
{/* eslint-disable-next-line @grafana/no-untranslated-strings */}
<Menu.Item label="csv" onClick={() => downloadLogs(DownloadFormat.CSV)} />
</Menu>
);
@@ -185,7 +189,7 @@ export const LogsMetaRow = memo(
{!config.exploreHideLogsDownload && (
<Dropdown overlay={downloadMenu}>
<ToolbarButton isOpen={false} variant="canvas" icon="download-alt">
Download
<Trans i18nKey="explore.logs-meta-row.download">Download</Trans>
</ToolbarButton>
</Dropdown>
)}
@@ -13,6 +13,7 @@ import {
import { reportInteraction } from '@grafana/runtime';
import { DataQuery, TimeZone } from '@grafana/schema';
import { Button, Collapse, Icon, Tooltip, useStyles2 } from '@grafana/ui';
import { Trans, t } from 'app/core/internationalization';
import store from 'app/core/store';
import { LogRows } from '../../logs/components/LogRows';
@@ -69,7 +70,9 @@ export function LogsSamplePanel(props: Props) {
return (
<Button size="sm" className={styles.logSamplesButton} onClick={onSplitOpen}>
Open logs in split view
<Trans i18nKey="explore.logs-sample-panel.open-in-split-view-button.open-logs-in-split-view">
Open logs in split view
</Trans>
</Button>
);
};
@@ -80,12 +83,23 @@ export function LogsSamplePanel(props: Props) {
LogsSamplePanelContent = null;
} else if (queryResponse.error !== undefined) {
LogsSamplePanelContent = (
<SupplementaryResultError error={queryResponse.error} title="Failed to load logs sample for this query" />
<SupplementaryResultError
error={queryResponse.error}
title={t('explore.logs-sample-panel.title-failed-sample-query', 'Failed to load logs sample for this query')}
/>
);
} else if (queryResponse.state === LoadingState.Loading) {
LogsSamplePanelContent = <span>Logs sample is loading...</span>;
LogsSamplePanelContent = (
<span>
<Trans i18nKey="explore.logs-sample-panel.logs-sample-is-loading">Logs sample is loading...</Trans>
</span>
);
} else if (queryResponse.data.length === 0 || queryResponse.data.every((frame) => frame.length === 0)) {
LogsSamplePanelContent = <span>No logs sample data.</span>;
LogsSamplePanelContent = (
<span>
<Trans i18nKey="explore.logs-sample-panel.no-logs-sample-data">No logs sample data.</Trans>
</span>
);
} else {
const logs = dataFrameToLogsModel(queryResponse.data);
LogsSamplePanelContent = (
@@ -2,6 +2,7 @@ import { css } from '@emotion/css';
import { GrafanaTheme2 } from '@grafana/data';
import { useTheme2 } from '@grafana/ui';
import { Trans } from 'app/core/internationalization';
function getStyles(theme: GrafanaTheme2) {
return {
@@ -16,5 +17,9 @@ function getStyles(theme: GrafanaTheme2) {
export function LogsTableEmptyFields() {
const theme = useTheme2();
const styles = getStyles(theme);
return <div className={styles.empty}>No fields</div>;
return (
<div className={styles.empty}>
<Trans i18nKey="explore.logs-table-empty-fields.no-fields">No fields</Trans>
</div>
);
}
@@ -2,6 +2,7 @@ import { css } from '@emotion/css';
import { GrafanaTheme2 } from '@grafana/data/src';
import { useTheme2 } from '@grafana/ui';
import { Trans } from 'app/core/internationalization';
import { LogsTableActiveFields } from './LogsTableActiveFields';
import { LogsTableAvailableFields } from './LogsTableAvailableFields';
@@ -71,7 +72,9 @@ export const LogsTableMultiSelect = (props: {
id={'selected-fields'}
/>
<div className={styles.columnHeader}>Fields</div>
<div className={styles.columnHeader}>
<Trans i18nKey="explore.logs-table-multi-select.fields">Fields</Trans>
</div>
<LogsTableAvailableFields
toggleColumn={props.toggleColumn}
labels={props.filteredColumnsWithMeta ?? props.columnsWithMeta}
@@ -3,6 +3,7 @@ import * as React from 'react';
import { GrafanaTheme2 } from '@grafana/data';
import { Checkbox, Icon, useTheme2 } from '@grafana/ui';
import { t } from 'app/core/internationalization';
import { FieldNameMeta } from './LogsTableWrap';
@@ -69,8 +70,8 @@ export function LogsTableNavField(props: {
</div>
{props.draggable && (
<Icon
aria-label="Drag and drop icon"
title="Drag and drop to reorder"
aria-label={t('explore.logs-table-nav-field.aria-label-drag-and-drop-icon', 'Drag and drop icon')}
title={t('explore.logs-table-nav-field.title-drag-and-drop-to-reorder', 'Drag and drop to reorder')}
name="draggabledots"
size="lg"
className={styles.dragIcon}
@@ -15,6 +15,7 @@ import {
} from '@grafana/data';
import { reportInteraction } from '@grafana/runtime/src';
import { InlineField, Select, Themeable2 } from '@grafana/ui';
import { t } from 'app/core/internationalization';
import { parseLogsFrame } from '../../logs/logsFrame';
@@ -492,10 +493,13 @@ export function LogsTableWrap(props: Props) {
{logsFrames.length > 1 && (
<div>
<InlineField
label="Select query"
label={t('explore.logs-table-wrap.label-select-query', 'Select query')}
htmlFor="explore_logs_table_frame_selector"
labelWidth={22}
tooltip="Select a query to visualize in the table."
tooltip={t(
'explore.logs-table-wrap.tooltip-select-query-visualize-table',
'Select a query to visualize in the table'
)}
>
<Select
inputId={'explore_logs_table_frame_selector'}
@@ -18,7 +18,7 @@ import {
} from '@grafana/data';
import { config } from '@grafana/runtime';
import { Button, InlineField, Alert, useStyles2, SeriesVisibilityChangeMode } from '@grafana/ui';
import { Trans } from 'app/core/internationalization';
import { Trans, t } from 'app/core/internationalization';
import { mergeLogsVolumeDataFrames, isLogsVolumeLimited, getLogsVolumeMaximumRange } from '../../logs/utils';
import { SupplementaryResultError } from '../SupplementaryResultError';
@@ -97,11 +97,15 @@ export const LogsVolumePanelList = ({
const visibleRange: TimeRange = { from, to, raw: { from, to } };
if (logsVolumeData?.state === LoadingState.Loading) {
return <span>Loading...</span>;
return (
<span>
<Trans i18nKey="explore.logs-volume-panel-list.loading">Loading...</Trans>
</span>
);
} else if (timeoutError && !canShowPartialData) {
return (
<SupplementaryResultError
title="Unable to show log volume"
title={t('explore.logs-volume-panel-list.title-unable-to-show-log-volume', 'Unable to show log volume')}
// Using info to avoid users thinking that the actual query has failed.
message={
<>
@@ -131,13 +135,24 @@ export const LogsVolumePanelList = ({
/>
);
} else if (logsVolumeData?.error !== undefined && !canShowPartialData) {
return <SupplementaryResultError error={logsVolumeData.error} title="Failed to load log volume for this query" />;
return (
<SupplementaryResultError
error={logsVolumeData.error}
title={t(
'explore.logs-volume-panel-list.title-failed-volume-query',
'Failed to load log volume for this query'
)}
/>
);
}
if (numberOfLogVolumes === 0 && logsVolumeData?.state !== LoadingState.Streaming) {
return (
<div className={styles.alertContainer}>
<Alert severity="info" title="No logs volume available">
<Alert
severity="info"
title={t('explore.logs-volume-panel-list.title-no-logs-volume-available', 'No logs volume available')}
>
No volume information available for the current queries and time range.
</Alert>
</div>
@@ -148,7 +163,7 @@ export const LogsVolumePanelList = ({
<div className={styles.listContainer}>
{timeoutError && canShowPartialData && (
<SupplementaryResultError
title="Showing partial data"
title={t('explore.logs-volume-panel-list.title-showing-partial-data', 'Showing partial data')}
message="The query is trying to access too much data and some sharded requests could not be completed. Try decreasing the time range or adding more labels to your query."
severity="info"
dismissable
@@ -176,7 +191,10 @@ export const LogsVolumePanelList = ({
})}
{containsZoomed && (
<div className={styles.extraInfoContainer}>
<InlineField label="Reload log volume" transparent>
<InlineField
label={t('explore.logs-volume-panel-list.label-reload-log-volume', 'Reload log volume')}
transparent
>
<Button size="xs" icon="sync" variant="secondary" onClick={onLoadLogsVolume} id="reload-volume" />
</InlineField>
</div>
@@ -3,6 +3,7 @@ import { css } from '@emotion/css';
import { GrafanaTheme2 } from '@grafana/data';
import { LinkButton, CallToActionCard, Icon, useStyles2 } from '@grafana/ui';
import { contextSrv } from 'app/core/core';
import { Trans } from 'app/core/internationalization';
import { AccessControlAction } from 'app/types';
function getCardStyles(theme: GrafanaTheme2) {
@@ -25,21 +26,26 @@ export const NoDataSourceCallToAction = () => {
const footer = (
<>
<Icon name="rocket" />
<> ProTip: You can also define data sources through configuration files. </>
<>
<Trans i18nKey="explore.no-data-source-call-to-action.footer.pro-tip-define-sources-through-configuration-files">
{' '}
ProTip: You can also define data sources through configuration files.{' '}
</Trans>
</>
<a
href="http://docs.grafana.org/administration/provisioning/?utm_source=explore#data-sources"
target="_blank"
rel="noreferrer"
className="text-link"
>
Learn more
<Trans i18nKey="explore.no-data-source-call-to-action.footer.learn-more">Learn more</Trans>
</a>
</>
);
const ctaElement = (
<LinkButton size="lg" href="datasources/new" icon="database" disabled={!canCreateDataSource}>
Add data source
<Trans i18nKey="explore.no-data-source-call-to-action.cta-element.add-data-source">Add data source</Trans>
</LinkButton>
);
@@ -5,6 +5,7 @@ import { Field, GrafanaTheme2 } from '@grafana/data/';
import { isValidLegacyName, utf8Support } from '@grafana/prometheus/src/utf8_support';
import { reportInteraction } from '@grafana/runtime/src';
import { IconButton, useStyles2 } from '@grafana/ui';
import { t } from 'app/core/internationalization';
import { ItemLabels } from './ItemLabels';
import { ItemValues } from './ItemValues';
@@ -130,7 +131,7 @@ const RawListItem = ({ listItemData, listKey, totalNumberOfValues, valueLabels,
<div key={listKey} className={styles.rowWrapper}>
<span className={styles.copyToClipboardWrapper}>
<IconButton
tooltip="Copy to clipboard"
tooltip={t('explore.raw-list-item.tooltip-copy-to-clipboard', 'Copy to clipboard')}
onClick={() => {
reportInteraction('grafana_explore_prometheus_instant_query_ui_raw_toggle_expand');
copyToClipboard(stringRep);
@@ -3,6 +3,7 @@ import { ReactNode, useCallback, useState } from 'react';
import { DataQueryError, GrafanaTheme2 } from '@grafana/data';
import { Alert, AlertVariant, Button, useTheme2 } from '@grafana/ui';
import { Trans } from 'app/core/internationalization';
type Props = {
error?: DataQueryError;
@@ -50,7 +51,7 @@ export function SupplementaryResultError(props: Props) {
setIsOpen(true);
}}
>
Show details
<Trans i18nKey="explore.supplementary-result-error.show-details">Show details</Trans>
</Button>
) : (
message
@@ -86,14 +86,14 @@ describe('TraceView', () => {
it('toggles detailState', async () => {
renderTraceViewNew();
expect(screen.queryByText(/Span Attributes/)).toBeFalsy();
expect(screen.queryByText(/Span attributes/)).toBeFalsy();
const spanView = screen.getAllByText('', { selector: 'div[data-testid="span-view"]' })[0];
await userEvent.click(spanView);
expect(screen.queryByText(/Span Attributes/)).toBeTruthy();
expect(screen.queryByText(/Span attributes/)).toBeTruthy();
await userEvent.click(spanView);
screen.debug(screen.queryAllByText(/Span Attributes/));
expect(screen.queryByText(/Span Attributes/)).toBeFalsy();
screen.debug(screen.queryAllByText(/Span attributes/));
expect(screen.queryByText(/Span attributes/)).toBeFalsy();
});
it('shows timeline ticks', () => {
@@ -20,6 +20,7 @@ import { getTemplateSrv } from '@grafana/runtime';
import { DataQuery } from '@grafana/schema';
import { useStyles2 } from '@grafana/ui';
import { TempoQuery } from '@grafana-plugins/tempo/types';
import { Trans } from 'app/core/internationalization';
import { getDatasourceSrv } from 'app/features/plugins/datasource_srv';
import { getTimeZone } from 'app/features/profile/state/selectors';
import { useDispatch, useSelector } from 'app/types';
@@ -245,7 +246,9 @@ export function TraceView(props: Props) {
/>
</>
) : (
<div className={styles.noDataMsg}>No data</div>
<div className={styles.noDataMsg}>
<Trans i18nKey="explore.trace-view.no-data">No data</Trans>
</div>
)}
</>
);
@@ -62,9 +62,9 @@ describe('TraceViewContainer', () => {
it('toggles collapses and expands all levels', async () => {
renderTraceViewContainer();
expect(screen.queryAllByText('', { selector: 'div[data-testid="span-view"]' }).length).toBe(3);
await user.click(screen.getByLabelText('Collapse All'));
await user.click(screen.getByLabelText('Collapse all'));
expect(screen.queryAllByText('', { selector: 'div[data-testid="span-view"]' }).length).toBe(1);
await user.click(screen.getByLabelText('Expand All'));
await user.click(screen.getByLabelText('Expand all'));
expect(screen.queryAllByText('', { selector: 'div[data-testid="span-view"]' }).length).toBe(3);
});
@@ -2,6 +2,7 @@ import { useMemo } from 'react';
import { DataFrame, SplitOpen, TimeRange } from '@grafana/data';
import { PanelChrome } from '@grafana/ui';
import { t } from 'app/core/internationalization';
import { StoreState, useSelector } from 'app/types';
import { TraceView } from './TraceView';
@@ -29,7 +30,7 @@ export function TraceViewContainer(props: Props) {
}
return (
<PanelChrome padding="none" title="Trace">
<PanelChrome padding="none" title={t('explore.trace-view-container.title-trace', 'Trace')}>
<TraceView
exploreId={exploreId}
dataFrames={dataFrames}
@@ -4,6 +4,7 @@ import { useState } from 'react';
import { GrafanaTheme2, CoreApp, DataFrame } from '@grafana/data';
import { reportInteraction } from '@grafana/runtime';
import { Icon, useTheme2 } from '@grafana/ui';
import { t, Trans } from 'app/core/internationalization';
import { config } from '../../../../../../core/config';
import { downloadTraceAsJson } from '../../../../../inspector/utils/download';
@@ -72,11 +73,14 @@ export default function TracePageActions(props: TracePageActionsProps) {
<a
href="https://forms.gle/RZDEx8ScyZNguDoC8"
className={styles.feedback}
title="Share your thoughts about tracing in Grafana."
title={t(
'explore.trace-page-actions.title-share-thoughts-about-tracing-grafana',
'Share your thoughts about tracing in Grafana.'
)}
target="_blank"
rel="noreferrer noopener"
>
Give feedback
<Trans i18nKey="explore.trace-page-actions.give-feedback">Give feedback</Trans>
</a>
</div>
)}
@@ -21,6 +21,7 @@ import { GrafanaTheme2 } from '@grafana/data';
import { config, reportInteraction } from '@grafana/runtime';
import { Icon, PopoverContent, Tooltip, useTheme2 } from '@grafana/ui';
import { getButtonStyles } from '@grafana/ui/internal';
import { Trans } from 'app/core/internationalization';
import { Trace } from '../../types';
@@ -146,7 +147,9 @@ export default memo(function NextPrevResult(props: NextPrevResultProps) {
if (spanFilterMatches.size === 0) {
metadata = (
<>
<span>0 matches</span>
<span>
<Trans i18nKey="explore.get-matches-metadata.matches">0 matches</Trans>
</span>
{getTooltip(
'There are 0 span matches for the filters selected. Please try removing some of the selected filters.'
)}
@@ -202,7 +205,7 @@ export default memo(function NextPrevResult(props: NextPrevResultProps) {
role="button"
tabIndex={buttonEnabled ? 0 : -1}
>
Prev
<Trans i18nKey="explore.prev">Prev</Trans>
</div>
<div
aria-label="Next result button"
@@ -212,7 +215,7 @@ export default memo(function NextPrevResult(props: NextPrevResultProps) {
role="button"
tabIndex={buttonEnabled ? 0 : -1}
>
Next
<Trans i18nKey="explore.next">Next</Trans>
</div>
</div>
</>
@@ -18,6 +18,7 @@ import React, { useState, useEffect, memo, useCallback } from 'react';
import { GrafanaTheme2, SelectableValue, toOption } from '@grafana/data';
import { IntervalInput } from '@grafana/o11y-ds-frontend';
import { Collapse, HorizontalGroup, Icon, InlineField, InlineFieldRow, Select, Tooltip, useStyles2 } from '@grafana/ui';
import { t } from 'app/core/internationalization';
import { defaultFilters, SearchProps } from '../../../useSearch';
import { getTraceServiceNames, getTraceSpanNames } from '../../../utils/tags';
@@ -139,21 +140,24 @@ export const SpanFilters = memo((props: SpanFilterProps) => {
<div className={styles.container}>
<Collapse label={collapseLabel} collapsible={true} isOpen={showSpanFilters} onToggle={setShowSpanFilters}>
<InlineFieldRow className={styles.flexContainer}>
<InlineField label="Service Name" labelWidth={16}>
<InlineField label={t('explore.span-filters.label-service-name', 'Service name')} labelWidth={16}>
<HorizontalGroup spacing={'xs'}>
<Select
aria-label="Select service name operator"
aria-label={t(
'explore.span-filters.aria-label-select-service-name-operator',
'Select service name operator'
)}
onChange={(v) => setSpanFiltersSearch({ ...search, serviceNameOperator: v.value! })}
options={[toOption('='), toOption('!=')]}
value={search.serviceNameOperator}
/>
<Select
aria-label="Select service name"
aria-label={t('explore.span-filters.aria-label-select-service-name', 'Select service name')}
isClearable
onChange={(v) => setSpanFiltersSearch({ ...search, serviceName: v?.value || '' })}
onOpenMenu={getServiceNames}
options={serviceNames || (search.serviceName ? [search.serviceName].map(toOption) : [])}
placeholder="All service names"
placeholder={t('explore.span-filters.placeholder-all-service-names', 'All service names')}
value={search.serviceName || null}
defaultValue={search.serviceName || null}
/>
@@ -167,21 +171,21 @@ export const SpanFilters = memo((props: SpanFilterProps) => {
/>
</InlineFieldRow>
<InlineFieldRow>
<InlineField label="Span Name" labelWidth={16}>
<InlineField label={t('explore.span-filters.label-span-name', 'Span name')} labelWidth={16}>
<HorizontalGroup spacing={'xs'}>
<Select
aria-label="Select span name operator"
aria-label={t('explore.span-filters.aria-label-select-span-name-operator', 'Select span name operator')}
onChange={(v) => setSpanFiltersSearch({ ...search, spanNameOperator: v.value! })}
options={[toOption('='), toOption('!=')]}
value={search.spanNameOperator}
/>
<Select
aria-label="Select span name"
aria-label={t('explore.span-filters.aria-label-select-span-name', 'Select span name')}
isClearable
onChange={(v) => setSpanFiltersSearch({ ...search, spanName: v?.value || '' })}
onOpenMenu={getSpanNames}
options={spanNames || (search.spanName ? [search.spanName].map(toOption) : [])}
placeholder="All span names"
placeholder={t('explore.span-filters.placeholder-all-span-names', 'All span names')}
value={search.spanName || null}
/>
</HorizontalGroup>
@@ -189,13 +193,13 @@ export const SpanFilters = memo((props: SpanFilterProps) => {
</InlineFieldRow>
<InlineFieldRow>
<InlineField
label="Duration"
label={t('explore.span-filters.label-duration', 'Duration')}
labelWidth={16}
tooltip="Filter by duration. Accepted units are ns, us, ms, s, m, h"
>
<HorizontalGroup spacing="xs" align="flex-start">
<Select
aria-label="Select min span operator"
aria-label={t('explore.span-filters.aria-label-select-min-span-operator', 'Select min span operator')}
onChange={(v) => setSpanFiltersSearch({ ...search, fromOperator: v.value! })}
options={[toOption('>'), toOption('>=')]}
value={search.fromOperator}
@@ -212,7 +216,7 @@ export const SpanFilters = memo((props: SpanFilterProps) => {
/>
</div>
<Select
aria-label="Select max span operator"
aria-label={t('explore.span-filters.aria-label-select-max-span-operator', 'Select max span operator')}
onChange={(v) => setSpanFiltersSearch({ ...search, toOperator: v.value! })}
options={[toOption('<'), toOption('<=')]}
value={search.toOperator}
@@ -230,7 +234,11 @@ export const SpanFilters = memo((props: SpanFilterProps) => {
</InlineField>
</InlineFieldRow>
<InlineFieldRow className={styles.tagsRow}>
<InlineField label="Tags" labelWidth={16} tooltip="Filter by tags, process tags or log fields in your spans.">
<InlineField
label={t('explore.span-filters.label-tags', 'Tags')}
labelWidth={16}
tooltip="Filter by tags, process tags or log fields in your spans."
>
<SpanFiltersTags
search={search}
setSearch={setSpanFiltersSearch}
@@ -5,6 +5,7 @@ import { useMount } from 'react-use';
import { GrafanaTheme2, SelectableValue, toOption } from '@grafana/data';
import { AccessoryButton } from '@grafana/plugin-ui';
import { Input, Select, Stack, useStyles2 } from '@grafana/ui';
import { t } from 'app/core/internationalization';
import { randomId, SearchProps, Tag } from '../../../useSearch';
import { getTraceTagKeys, getTraceTagValues } from '../../../utils/tags';
@@ -102,19 +103,19 @@ export const SpanFiltersTags = ({ search, trace, setSearch, tagKeys, setTagKeys,
<Stack gap={0} width={'auto'} justifyContent={'flex-start'} alignItems={'center'}>
<div>
<Select
aria-label="Select tag key"
aria-label={t('explore.span-filters-tags.aria-label-select-tag-key', 'Select tag key')}
isClearable
key={tag.key}
onChange={(v) => onTagChange(tag, v)}
onOpenMenu={getTagKeys}
options={tagKeys || (tag.key ? [tag.key].map(toOption) : [])}
placeholder="Select tag"
placeholder={t('explore.span-filters-tags.placeholder-select-tag', 'Select tag')}
value={tag.key || null}
/>
</div>
<div>
<Select
aria-label="Select tag operator"
aria-label={t('explore.span-filters-tags.aria-label-select-tag-operator', 'Select tag operator')}
onChange={(v) => {
setSearch({
...search,
@@ -131,7 +132,7 @@ export const SpanFiltersTags = ({ search, trace, setSearch, tagKeys, setTagKeys,
<span className={styles.tagValues}>
{(tag.operator === '=' || tag.operator === '!=') && (
<Select
aria-label="Select tag value"
aria-label={t('explore.span-filters-tags.aria-label-select-tag-value', 'Select tag value')}
isClearable
key={tag.value}
onChange={(v) => {
@@ -143,13 +144,13 @@ export const SpanFiltersTags = ({ search, trace, setSearch, tagKeys, setTagKeys,
});
}}
options={tagValues[tag.id] ? tagValues[tag.id] : tag.value ? [tag.value].map(toOption) : []}
placeholder="Select value"
placeholder={t('explore.span-filters-tags.placeholder-select-value', 'Select value')}
value={tag.value}
/>
)}
{(tag.operator === '=~' || tag.operator === '!~') && (
<Input
aria-label="Input tag value"
aria-label={t('explore.span-filters-tags.aria-label-input-tag-value', 'Input tag value')}
onChange={(v) => {
setSearch({
...search,
@@ -158,7 +159,7 @@ export const SpanFiltersTags = ({ search, trace, setSearch, tagKeys, setTagKeys,
}),
});
}}
placeholder="Tag value"
placeholder={t('explore.span-filters-tags.placeholder-tag-value', 'Tag value')}
width={18}
value={tag.value || ''}
/>
@@ -166,21 +167,21 @@ export const SpanFiltersTags = ({ search, trace, setSearch, tagKeys, setTagKeys,
</span>
{(tag.key || tag.value || search.tags.length > 1) && (
<AccessoryButton
aria-label="Remove tag"
aria-label={t('explore.span-filters-tags.aria-label-remove-tag', 'Remove tag')}
variant="secondary"
icon="times"
onClick={() => removeTag(tag.id)}
tooltip="Remove tag"
tooltip={t('explore.span-filters-tags.tooltip-remove-tag', 'Remove tag')}
/>
)}
{(tag.key || tag.value) && i === search.tags.length - 1 && (
<span className={styles.addTag}>
<AccessoryButton
aria-label="Add tag"
aria-label={t('explore.span-filters-tags.aria-label-add-tag', 'Add tag')}
variant="secondary"
icon="plus"
onClick={addTag}
tooltip="Add tag"
tooltip={t('explore.span-filters-tags.tooltip-add-tag', 'Add tag')}
/>
</span>
)}
@@ -18,6 +18,7 @@ import * as React from 'react';
import { GrafanaTheme2 } from '@grafana/data';
import { withTheme2, stylesFactory, Button } from '@grafana/ui';
import { Trans } from 'app/core/internationalization';
import { autoColor } from '../../Theme';
import { TUpdateViewRangeTimeFunction, ViewRange, ViewRangeTimeUpdate, TNil } from '../../index';
@@ -354,7 +355,7 @@ export class UnthemedViewingLayer extends React.PureComponent<ViewingLayerProps,
type="button"
variant="secondary"
>
Reset Selection
<Trans i18nKey="explore.unthemed-viewing-layer.reset-selection">Reset selection</Trans>
</Button>
)}
<svg
@@ -17,6 +17,7 @@ import * as React from 'react';
import { Field, GrafanaTheme2, LinkModel } from '@grafana/data';
import { Icon, useStyles2 } from '@grafana/ui';
import { Trans } from 'app/core/internationalization';
import { autoColor } from '../../Theme';
import { TraceSpanReference } from '../../types/trace';
@@ -218,7 +219,9 @@ const AccordianReferences = ({
<HeaderComponent className={styles.AccordianReferencesHeader} {...headerProps}>
{arrow}
<strong>
<span>References</span>
<span>
<Trans i18nKey="explore.accordian-references.references">References</Trans>
</span>
</strong>{' '}
({data.length})
</HeaderComponent>
@@ -16,6 +16,7 @@ import { FlameGraph } from '@grafana/flamegraph';
import { TraceToProfilesOptions } from '@grafana/o11y-ds-frontend';
import { config, DataSourceWithBackend, getTemplateSrv } from '@grafana/runtime';
import { useStyles2 } from '@grafana/ui';
import { Trans } from 'app/core/internationalization';
import { getDatasourceSrv } from 'app/features/plugins/datasource_srv';
import { Query } from 'app/plugins/datasource/grafana-pyroscope-datasource/types';
@@ -174,7 +175,9 @@ export default function SpanFlameGraph(props: SpanFlameGraphProps) {
return (
<div className={styles.flameGraph} ref={sizeRef}>
<div className={styles.flameGraphTitle}>Flame graph</div>
<div className={styles.flameGraphTitle}>
<Trans i18nKey="explore.span-flame-graph.flame-graph">Flame graph</Trans>
</div>
<FlameGraph
data={traceFlameGraphs[profileTagValue]}
getTheme={() => config.theme2}
@@ -216,13 +216,13 @@ describe('<SpanDetail>', () => {
it('renders the span tags', async () => {
render(<SpanDetail {...(props as unknown as SpanDetailProps)} />);
await userEvent.click(screen.getByRole('switch', { name: /Span Attributes/ }));
await userEvent.click(screen.getByRole('switch', { name: /Span attributes/ }));
expect(props.tagsToggle).toHaveBeenLastCalledWith(span.spanID);
});
it('renders the process tags', async () => {
render(<SpanDetail {...(props as unknown as SpanDetailProps)} />);
await userEvent.click(screen.getByRole('switch', { name: /Resource Attributes/ }));
await userEvent.click(screen.getByRole('switch', { name: /Resource attributes/ }));
expect(props.processToggle).toHaveBeenLastCalledWith(span.spanID);
});
@@ -29,6 +29,7 @@ import {
import { TraceToProfilesOptions } from '@grafana/o11y-ds-frontend';
import { TimeZone } from '@grafana/schema';
import { Divider, Icon, TextArea, useStyles2 } from '@grafana/ui';
import { t, Trans } from 'app/core/internationalization';
import { pyroscopeProfileIdTagKey } from '../../../createSpanLink';
import { autoColor } from '../../Theme';
@@ -321,7 +322,7 @@ export default function SpanDetail(props: SpanDetailProps) {
<div>
<AccordianKeyValues
data={tags}
label="Span Attributes"
label={t('explore.span-detail.label-span-attributes', 'Span attributes')}
linksGetter={linksGetter}
isOpen={isTagsOpen}
onToggle={() => tagsToggle(spanID)}
@@ -330,7 +331,7 @@ export default function SpanDetail(props: SpanDetailProps) {
<AccordianKeyValues
className={styles.AccordianKeyValuesItem}
data={process.tags}
label="Resource Attributes"
label={t('explore.span-detail.label-resource-attributes', 'Resource attributes')}
linksGetter={linksGetter}
isOpen={isProcessOpen}
onToggle={() => processToggle(spanID)}
@@ -352,7 +353,11 @@ export default function SpanDetail(props: SpanDetailProps) {
<AccordianText
className={styles.AccordianWarnings}
headerClassName={styles.AccordianWarningsHeader}
label={<span className={styles.AccordianWarningsLabel}>Warnings</span>}
label={
<span className={styles.AccordianWarningsLabel}>
<Trans i18nKey="explore.span-detail.warnings">Warnings</Trans>
</span>
}
data={warnings}
isOpen={isWarningsOpen}
onToggle={() => warningsToggle(spanID)}
@@ -360,7 +365,7 @@ export default function SpanDetail(props: SpanDetailProps) {
)}
{stackTraces?.length ? (
<AccordianText
label="Stack trace"
label={t('explore.span-detail.label-stack-trace', 'Stack trace')}
data={stackTraces}
isOpen={isStackTracesOpen}
TextComponent={(textComponentProps) => {
@@ -35,8 +35,8 @@ describe('TimelineCollapser test', () => {
setup();
expect(screen.getByTestId('TimelineCollapser')).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Expand All' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Collapse All' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Expand all' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Collapse all' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Expand +1' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Collapse +1' })).toBeInTheDocument();
});
@@ -15,6 +15,7 @@
import { css } from '@emotion/css';
import { IconButton, useStyles2 } from '@grafana/ui';
import { t } from 'app/core/internationalization';
const getStyles = () => ({
TimelineCollapser: css({
@@ -38,17 +39,29 @@ export function TimelineCollapser(props: CollapserProps) {
const styles = useStyles2(getStyles);
return (
<div className={styles.TimelineCollapser} data-testid="TimelineCollapser">
<IconButton tooltip="Expand +1" size="xl" tooltipPlacement="top" name="angle-down" onClick={onExpandOne} />
<IconButton tooltip="Collapse +1" size="xl" tooltipPlacement="top" name="angle-right" onClick={onCollapseOne} />
<IconButton
tooltip="Expand All"
tooltip={t('explore.timeline-collapser.tooltip-expand', 'Expand +1')}
size="xl"
tooltipPlacement="top"
name="angle-down"
onClick={onExpandOne}
/>
<IconButton
tooltip={t('explore.timeline-collapser.tooltip-collapse', 'Collapse +1')}
size="xl"
tooltipPlacement="top"
name="angle-right"
onClick={onCollapseOne}
/>
<IconButton
tooltip={t('explore.timeline-collapser.tooltip-expand-all', 'Expand all')}
size="xl"
tooltipPlacement="top"
name="angle-double-down"
onClick={onExpandAll}
/>
<IconButton
tooltip="Collapse All"
tooltip={t('explore.timeline-collapser.tooltip-collapse-all', 'Collapse all')}
size="xl"
tooltipPlacement="top"
name="angle-double-right"
@@ -51,8 +51,8 @@ describe('TimelineHeaderRow', () => {
it('renders the collapser controls', () => {
setup();
expect(screen.getByRole('button', { name: 'Expand All' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Collapse All' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Expand all' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Collapse all' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Expand +1' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Collapse +1' })).toBeInTheDocument();
});
@@ -23,6 +23,7 @@ import { TraceToProfilesOptions } from '@grafana/o11y-ds-frontend';
import { config, reportInteraction } from '@grafana/runtime';
import { TimeZone } from '@grafana/schema';
import { stylesFactory, withTheme2, ToolbarButton } from '@grafana/ui';
import { t } from 'app/core/internationalization';
import { PEER_SERVICE } from '../constants/tag-keys';
import { CriticalPathSection, SpanBarOptions, SpanLinkFunc, TNil } from '../types';
@@ -655,7 +656,7 @@ export class UnthemedVirtualizedTraceView extends React.Component<VirtualizedTra
<ToolbarButton
className={styles.scrollToTopButton}
onClick={this.scrollToTop}
title="Scroll to top"
title={t('explore.unthemed-virtualized-trace-view.title-scroll-to-top', 'Scroll to top')}
icon="arrow-up"
></ToolbarButton>
)}
@@ -67,8 +67,8 @@ describe('<TraceTimelineViewer>', () => {
const expandOne = screen.getByRole('button', { name: 'Expand +1' });
const collapseOne = screen.getByRole('button', { name: 'Collapse +1' });
const expandAll = screen.getByRole('button', { name: 'Expand All' });
const collapseAll = screen.getByRole('button', { name: 'Collapse All' });
const expandAll = screen.getByRole('button', { name: 'Expand all' });
const collapseAll = screen.getByRole('button', { name: 'Collapse all' });
expect(expandOne).toBeInTheDocument();
expect(collapseOne).toBeInTheDocument();
@@ -15,6 +15,7 @@
import * as React from 'react';
import { IconButton, Input } from '@grafana/ui';
import { t } from 'app/core/internationalization';
type Props = {
value: string | undefined;
@@ -34,13 +35,21 @@ export default class SearchBarInput extends React.PureComponent<Props> {
const { value } = this.props;
const suffix = (
<>{value && value.length && <IconButton name="times" onClick={this.clearUiFind} tooltip="Clear input" />}</>
<>
{value && value.length && (
<IconButton
name="times"
onClick={this.clearUiFind}
tooltip={t('explore.search-bar-input.suffix.tooltip-clear-input', 'Clear input')}
/>
)}
</>
);
return (
<div style={{ width: '200px' }}>
<Input
placeholder="Find..."
placeholder={t('explore.search-bar-input.placeholder-find', 'Find...')}
onChange={(e) => this.props.onChange(e.currentTarget.value)}
suffix={suffix}
value={value}
@@ -9,6 +9,7 @@ import {
} from '@grafana/data';
import { ConfigDescriptionLink, ConfigSubSection } from '@grafana/plugin-ui';
import { InlineField, InlineFieldRow, Input, Select, useStyles2 } from '@grafana/ui';
import { t } from 'app/core/internationalization';
export interface SpanBarOptions {
type?: string;
@@ -32,7 +33,12 @@ export default function SpanBarSettings({ options, onOptionsChange }: Props) {
return (
<div className={css({ width: '100%' })}>
<InlineFieldRow className={styles.row}>
<InlineField label="Label" labelWidth={26} tooltip="Default: duration" grow>
<InlineField
label={t('explore.span-bar-settings.label-label', 'Label')}
labelWidth={26}
tooltip={t('explore.span-bar-settings.tooltip-default-duration', 'Default: duration')}
grow
>
<Select
inputId="label"
options={selectOptions}
@@ -43,7 +49,7 @@ export default function SpanBarSettings({ options, onOptionsChange }: Props) {
type: v?.value ?? '',
});
}}
placeholder="Duration"
placeholder={t('explore.span-bar-settings.placeholder-duration', 'Duration')}
isClearable
aria-label={'select-label-name'}
width={40}
@@ -53,13 +59,13 @@ export default function SpanBarSettings({ options, onOptionsChange }: Props) {
{options.jsonData.spanBar?.type === TAG && (
<InlineFieldRow className={styles.row}>
<InlineField
label="Tag key"
label={t('explore.span-bar-settings.label-tag-key', 'Tag key')}
labelWidth={26}
tooltip="Tag key which will be used to get the tag value. A span's attributes and resources will be searched for the tag key"
>
<Input
type="text"
placeholder="Enter tag key"
placeholder={t('explore.span-bar-settings.placeholder-enter-tag-key', 'Enter tag key')}
onChange={(v) =>
updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'spanBar', {
...options.jsonData.spanBar,
@@ -82,7 +88,7 @@ export const SpanBarSection = ({ options, onOptionsChange }: DataSourcePluginOpt
return (
<ConfigSubSection
title="Span bar"
title={t('explore.span-bar-section.title-span-bar', 'Span bar')}
description={
<ConfigDescriptionLink
description="Add additional info next to the service and operation on a span bar row in the trace view."
@@ -14,6 +14,8 @@
import { PureComponent } from 'react';
import { Trans } from 'app/core/internationalization';
import { TNil } from '../../../types';
import DividerDemo from './DividerDemo';
@@ -47,9 +49,13 @@ export default class DraggableManagerDemo extends PureComponent<{}, DraggableMan
const { dividerPosition, regionCursor, regionDragging } = this.state;
return (
<div className="DraggableManagerDemo">
<h1>DraggableManager demo</h1>
<h1>
<Trans i18nKey="explore.draggable-manager-demo.draggable-manager-demo">DraggableManager demo</Trans>
</h1>
<section className="DraggableManagerDemo--scenario">
<h2>Dragging a Divider</h2>
<h2>
<Trans i18nKey="explore.draggable-manager-demo.dragging-a-divider">Dragging a divider</Trans>
</h2>
<p>Click and drag the gray divider in the colored area, below.</p>
<p>Value: {dividerPosition.toFixed(3)}</p>
<div className="DraggableManagerDemo--realm">
@@ -57,8 +63,14 @@ export default class DraggableManagerDemo extends PureComponent<{}, DraggableMan
</div>
</section>
<section className="DraggableManagerDemo--scenario">
<h2>Dragging a Sub-Region</h2>
<p>Click and drag horizontally somewhere in the colored area, below.</p>
<h2>
<Trans i18nKey="explore.draggable-manager-demo.dragging-a-sub-region">Dragging a sub-region</Trans>
</h2>
<p>
<Trans i18nKey="explore.draggable-manager-demo.click-horizontally-somewhere-colored-below">
Click and drag horizontally somewhere in the colored area, below.
</Trans>
</p>
<p>Value: {regionDragging && regionDragging.map((n) => n.toFixed(3)).join(', ')}</p>
<div className="DraggableManagerDemo--realm">
<RegionDemo regionCursor={regionCursor} regionDragging={regionDragging} updateState={this._updateState} />
@@ -22,6 +22,7 @@ import { PromQuery } from '@grafana/prometheus';
import { getTemplateSrv } from '@grafana/runtime';
import { DataQuery } from '@grafana/schema';
import { Icon } from '@grafana/ui';
import { t } from 'app/core/internationalization';
import { getDatasourceSrv } from 'app/features/plugins/datasource_srv';
import { LokiQuery } from '../../../plugins/datasource/loki/types';
@@ -247,7 +248,15 @@ function legacyCreateSpanLinkFactory(
href: link.href,
title: 'Related logs',
onClick: link.onClick,
content: <Icon name="gf-logs" title="Explore the logs for this in split view" />,
content: (
<Icon
name="gf-logs"
title={t(
'explore.legacy-create-span-link-factory.title-explore-split',
'Explore the logs for this in split view'
)}
/>
),
field,
type: SpanLinkType.Logs,
});
@@ -308,7 +317,15 @@ function legacyCreateSpanLinkFactory(
title: query?.name,
href: link.href,
onClick: link.onClick,
content: <Icon name="chart-line" title="Explore metrics for this span" />,
content: (
<Icon
name="chart-line"
title={t(
'explore.legacy-create-span-link-factory.title-explore-metrics-for-this-span',
'Explore metrics for this span'
)}
/>
),
field,
type: SpanLinkType.Metrics,
});
@@ -359,7 +376,12 @@ function legacyCreateSpanLinkFactory(
links.push({
title: 'Session for this span',
href: feO11yLink,
content: <Icon name="frontend-observability" title="Session for this span" />,
content: (
<Icon
name="frontend-observability"
title={t('explore.legacy-create-span-link-factory.title-session-for-this-span', 'Session for this span')}
/>
),
field,
type: SpanLinkType.Session,
});
@@ -3,6 +3,7 @@ import { ReactElement } from 'react';
import { locationUtil } from '@grafana/data';
import { locationService } from '@grafana/runtime';
import { Button, Modal, Stack } from '@grafana/ui';
import { Trans } from 'app/core/internationalization';
type Props = {
onDismiss: () => void;
@@ -25,13 +26,13 @@ export function ConfirmNavigationModal(props: Props): ReactElement {
</Stack>
<Modal.ButtonRow>
<Button onClick={onDismiss} fill="outline" variant="secondary">
Cancel
<Trans i18nKey="explore.confirm-navigation-modal.cancel">Cancel</Trans>
</Button>
<Button type="submit" variant="secondary" onClick={openInNewTab} icon="external-link-alt">
Open in new tab
<Trans i18nKey="explore.confirm-navigation-modal.open-in-new-tab">Open in new tab</Trans>
</Button>
<Button type="submit" variant="primary" onClick={openInCurrentTab} icon="apps">
Open
<Trans i18nKey="explore.confirm-navigation-modal.open">Open</Trans>
</Button>
</Modal.ButtonRow>
</Modal>
@@ -1,6 +1,7 @@
import { lazy, Suspense } from 'react';
import { Dropdown, ToolbarButton } from '@grafana/ui';
import { t } from 'app/core/internationalization';
import { contextSrv } from 'app/core/services/context_srv';
import { AccessControlAction } from 'app/types/accessControl';
@@ -38,7 +39,12 @@ export function BasicExtensions(props: ExtensionDropdownProps) {
return (
<>
<Dropdown onVisibleChange={setIsModalOpen} placement="bottom-start" overlay={menu}>
<ToolbarButton aria-label="Add" disabled={!Boolean(noQueriesInPane)} variant="canvas" isOpen={isModalOpen}>
<ToolbarButton
aria-label={t('explore.basic-extensions.aria-label-add', 'Add')}
disabled={!Boolean(noQueriesInPane)}
variant="canvas"
isOpen={isModalOpen}
>
<Trans i18nKey="explore.toolbar.add-to-extensions">Add</Trans>
</ToolbarButton>
</Dropdown>
@@ -1,6 +1,7 @@
import { first } from 'lodash';
import { Dropdown, ToolbarButton } from '@grafana/ui';
import { t } from 'app/core/internationalization';
import { Trans } from '../../../../core/internationalization';
import { ToolbarExtensionPointMenu } from '../ToolbarExtensionPointMenu';
@@ -29,7 +30,7 @@ export function QuerylessAppsExtensions(props: ExtensionDropdownProps) {
<>
<Dropdown onVisibleChange={setIsModalOpen} placement="bottom-start" overlay={menu}>
<ToolbarButton
aria-label="Go Queryless"
aria-label={t('explore.queryless-apps-extensions.aria-label-go-queryless', 'Go queryless')}
disabled={!Boolean(noQueriesInPane)}
variant="canvas"
isOpen={isModalOpen}
@@ -34,6 +34,7 @@ import {
import { DataSourceRef } from '@grafana/schema';
import { AppChrome } from 'app/core/components/AppChrome/AppChrome';
import { GrafanaContext } from 'app/core/context/GrafanaContext';
import { t } from 'app/core/internationalization';
import { GrafanaRoute } from 'app/core/navigation/GrafanaRoute';
import { Echo } from 'app/core/services/echo/Echo';
import { setLastUsedDatasourceUID } from 'app/core/utils/explore';
@@ -292,7 +293,7 @@ export function makeDatasourceSetup({
return (
<div>
<input
aria-label="query"
aria-label={t('explore.make-datasource-setup.aria-label-query', 'query')}
defaultValue={props.query.expr}
onChange={(event) => {
props.onChange({ ...props.query, expr: event.target.value });
+299
View File
@@ -878,8 +878,38 @@
}
},
"api-keys": {
"api-keys-action-bar": {
"placeholder-search-keys": "Search keys"
},
"api-keys-page-unconnected": {
"label-include-expired-keys": "Include expired keys"
},
"api-keys-table": {
"aria-label-delete-api-key": "Delete API key",
"expires": "Expires",
"last-used-at": "Last used at",
"migrate-to-service-account": "Migrate to service account",
"name": "Name",
"role": "Role"
},
"empty-state": {
"message": "No API keys found"
},
"migrate-to-service-accounts-card": {
"docs-link": {
"about-migration": "Find out more about the migration here."
},
"migrate-all-service-accounts": "Migrate all service accounts",
"migration-box-desc": {
"migrating": "Migrating all API keys will hide the API keys tab."
},
"title-no-api-keys-found": "No API keys found",
"title-switch-service-accounts": "Switch from API keys to service accounts"
},
"migration-summary": {
"close": "Close",
"migration-successful": "Migration Successful!",
"title-migration-summary": "Migration summary"
}
},
"app-chrome": {
@@ -893,6 +923,37 @@
"trace-id": "Trace ID: {{traceId}}"
}
},
"auth-config": {
"auth-config-page-unconnected": {
"auth-settings": "Auth settings"
},
"auth-drawer-unconnected": {
"advanced-auth": "Advanced Auth",
"enable-insecure-email-lookup": "Enable insecure email lookup",
"reset": "Reset",
"title-auth-settings": "Auth settings"
},
"configure-auth-cta": {
"authentication-configuration-created-moment": "You have no authentication configuration created at the moment.",
"configuration-required": "Configuration required",
"refer-documentation-configure-authentication": "Refer to the documentation on how to configure authentication"
},
"provider-config-form": {
"additional-actions-menu": {
"label-reset-to-default-values": "Reset to default values"
},
"discard": "Discard",
"label-enabled": "Enabled",
"reset-configuration": "Are you sure you want to reset this configuration?",
"title-more-actions": "More actions",
"title-reset": "Reset",
"tooltip-more-actions": "More actions"
},
"server-discovery-modal": {
"label-the-wellknownopenidconfiguration-endpoint-for-your-id-p": "The .well-known/openid-configuration endpoint for your IdP",
"title-open-id-connect-discovery-url": "OpenID Connect Discovery URL"
}
},
"bookmarks-page": {
"empty": {
"message": "It looks like you haven’t created any bookmarks yet",
@@ -1069,7 +1130,16 @@
"request-data-source": "Request a new data source",
"roadmap": "View roadmap"
},
"connections-redirect-notice": {
"aria-label-link-to-connections": "Link to Connections",
"go-to-connections": "Go to connections"
},
"no-access-modal": {
"connection-contact-grafana-admin": "To add a new connection, contact your Grafana admin.",
"okay": "Okay"
},
"search": {
"aria-label-search-all": "Search all",
"placeholder": "Search all"
}
},
@@ -1880,12 +1950,97 @@
}
},
"explore": {
"accordian-references": {
"references": "References"
},
"add-to-dashboard": "Add to dashboard",
"basic-extensions": {
"aria-label-add": "Add"
},
"confirm-navigation-modal": {
"cancel": "Cancel",
"open": "Open",
"open-in-new-tab": "Open in new tab"
},
"content-outline-item-button": {
"body": {
"aria-label-content-outline-item-collapse-button": "Content outline item collapse button"
}
},
"correlation-editor-mode-bar": {
"exit-correlation-editor": "Exit correlation editor",
"save": "Save"
},
"correlation-helper": {
"add-transformation": "Add transformation",
"aria-label-delete-transformation": "Delete transformation",
"aria-label-edit-transformation": "Edit transformation",
"label-description": "Description",
"label-label": "Label",
"title-correlation-details": "Correlation details"
},
"correlation-transformation-add-modal": {
"aria-label-field": "Field",
"aria-label-type": "Type",
"cancel": "Cancel",
"label-expression": "Expression",
"label-field": "Field",
"label-type": "Type",
"label-variable-name": "Variable name"
},
"correlation-unsaved-changes-modal": {
"cancel": "Cancel",
"continue-without-saving": "Continue without saving",
"save-correlation": "Save correlation"
},
"draggable-manager-demo": {
"click-horizontally-somewhere-colored-below": "Click and drag horizontally somewhere in the colored area, below.",
"draggable-manager-demo": "DraggableManager demo",
"dragging-a-divider": "Dragging a divider",
"dragging-a-sub-region": "Dragging a sub-region"
},
"drilldownInfo": {
"action": "Go to Grafana Drilldown",
"description": "Looking for the Grafana Explore apps? They are now called the Grafana Drilldown apps and can be found under <1>Menu > Drilldown</1>",
"title": "Explore Metrics, Logs, Traces and Profiles have moved!"
},
"explore": {
"title-flame-graph": "Flame graph",
"title-graph": "Graph",
"title-logs": "Logs",
"title-logs-sample": "Logs sample",
"title-node-graph": "Node graph",
"title-queries": "Queries",
"title-raw-prometheus": "Raw Prometheus",
"title-table": "Table",
"title-traces": "Traces"
},
"explore-run-query-button": {
"run-button": {
"aria-label-run-query-options": "Run query options"
}
},
"explore-toolbar": {
"outline": "Outline",
"tooltip-content-outline": "Content outline"
},
"get-matches-metadata": {
"matches": "0 matches"
},
"legacy-create-span-link-factory": {
"title-explore-metrics-for-this-span": "Explore metrics for this span",
"title-explore-split": "Explore the logs for this in split view",
"title-session-for-this-span": "Session for this span"
},
"live-logs": {
"clear-logs": "Clear logs",
"exit-live-mode": "Exit live mode"
},
"live-tail-button": {
"pause-the-live-stream": "Pause the live stream",
"start-live-stream-your-logs": "Start live stream your logs",
"stop-and-exit-the-live-stream": "Stop and exit the live stream"
},
"logs": {
"logs-volume": {
"add-filters": "Add more labels to your query to narrow down your search.",
@@ -1897,6 +2052,63 @@
"scan-for-older-logs": "Scan for older logs",
"stop-scan": "Stop scan"
},
"logs-container": {
"label-logs": "Logs"
},
"logs-meta-row": {
"download": "Download",
"show-original-line": "Show original line"
},
"logs-sample-panel": {
"logs-sample-is-loading": "Logs sample is loading...",
"no-logs-sample-data": "No logs sample data.",
"open-in-split-view-button": {
"open-logs-in-split-view": "Open logs in split view"
},
"title-failed-sample-query": "Failed to load logs sample for this query"
},
"logs-table-empty-fields": {
"no-fields": "No fields"
},
"logs-table-multi-select": {
"fields": "Fields"
},
"logs-table-nav-field": {
"aria-label-drag-and-drop-icon": "Drag and drop icon",
"title-drag-and-drop-to-reorder": "Drag and drop to reorder"
},
"logs-table-wrap": {
"label-select-query": "Select query",
"tooltip-select-query-visualize-table": "Select a query to visualize in the table"
},
"logs-volume-panel-list": {
"label-reload-log-volume": "Reload log volume",
"loading": "Loading...",
"title-failed-volume-query": "Failed to load log volume for this query",
"title-no-logs-volume-available": "No logs volume available",
"title-showing-partial-data": "Showing partial data",
"title-unable-to-show-log-volume": "Unable to show log volume"
},
"make-datasource-setup": {
"aria-label-query": "query"
},
"next": "Next",
"no-data-source-call-to-action": {
"cta-element": {
"add-data-source": "Add data source"
},
"footer": {
"learn-more": "Learn more",
"pro-tip-define-sources-through-configuration-files": " ProTip: You can also define data sources through configuration files. "
}
},
"prev": "Prev",
"queryless-apps-extensions": {
"aria-label-go-queryless": "Go queryless"
},
"raw-list-item": {
"tooltip-copy-to-clipboard": "Copy to clipboard"
},
"rich-history": {
"close-tooltip": "Close query history",
"datasource-a-z": "Data source A-Z",
@@ -2003,6 +2215,12 @@
"run-query-button": "Run query",
"switch-datasource-button": "Switch data source and run query"
},
"search-bar-input": {
"placeholder-find": "Find...",
"suffix": {
"tooltip-clear-input": "Clear input"
}
},
"secondary-actions": {
"add-from-query-library": "Add query from library",
"query-add-button": "Add query",
@@ -2012,11 +2230,66 @@
"query-inspector-button": "Query inspector",
"query-inspector-button-aria-label": "Query inspector"
},
"span-bar-section": {
"title-span-bar": "Span bar"
},
"span-bar-settings": {
"label-label": "Label",
"label-tag-key": "Tag key",
"placeholder-duration": "Duration",
"placeholder-enter-tag-key": "Enter tag key",
"tooltip-default-duration": "Default: duration"
},
"span-detail": {
"label-resource-attributes": "Resource attributes",
"label-span-attributes": "Span attributes",
"label-stack-trace": "Stack trace",
"warnings": "Warnings"
},
"span-filters": {
"aria-label-select-max-span-operator": "Select max span operator",
"aria-label-select-min-span-operator": "Select min span operator",
"aria-label-select-service-name": "Select service name",
"aria-label-select-service-name-operator": "Select service name operator",
"aria-label-select-span-name": "Select span name",
"aria-label-select-span-name-operator": "Select span name operator",
"label-duration": "Duration",
"label-service-name": "Service name",
"label-span-name": "Span name",
"label-tags": "Tags",
"placeholder-all-service-names": "All service names",
"placeholder-all-span-names": "All span names"
},
"span-filters-tags": {
"aria-label-add-tag": "Add tag",
"aria-label-input-tag-value": "Input tag value",
"aria-label-remove-tag": "Remove tag",
"aria-label-select-tag-key": "Select tag key",
"aria-label-select-tag-operator": "Select tag operator",
"aria-label-select-tag-value": "Select tag value",
"placeholder-select-tag": "Select tag",
"placeholder-select-value": "Select value",
"placeholder-tag-value": "Tag value",
"tooltip-add-tag": "Add tag",
"tooltip-remove-tag": "Remove tag"
},
"span-flame-graph": {
"flame-graph": "Flame graph"
},
"supplementary-result-error": {
"show-details": "Show details"
},
"table": {
"no-data": "0 series returned",
"title": "Table",
"title-with-name": "Table - {{name}}"
},
"timeline-collapser": {
"tooltip-collapse": "Collapse +1",
"tooltip-collapse-all": "Collapse all",
"tooltip-expand": "Expand +1",
"tooltip-expand-all": "Expand all"
},
"toolbar": {
"add-to-extensions": "Add",
"add-to-queryless-extensions": "Go queryless",
@@ -2037,6 +2310,32 @@
"split-title": "Split",
"split-tooltip": "Split the pane",
"split-widen": "Widen pane"
},
"trace-page-actions": {
"give-feedback": "Give feedback",
"title-share-thoughts-about-tracing-grafana": "Share your thoughts about tracing in Grafana."
},
"trace-view": {
"no-data": "No data"
},
"trace-view-container": {
"title-trace": "Trace"
},
"unthemed-logs": {
"label-deduplication": "Deduplication",
"label-display-results": "Display results",
"label-prettify-json": "Prettify JSON",
"label-time": "Time",
"label-unique-labels": "Unique labels",
"label-wrap-lines": "Wrap lines",
"title-feedback": "Feedback",
"title-logs-volume": "Logs volume"
},
"unthemed-viewing-layer": {
"reset-selection": "Reset selection"
},
"unthemed-virtualized-trace-view": {
"title-scroll-to-top": "Scroll to top"
}
},
"explore-metrics": {