diff --git a/.betterer.results b/.betterer.results index e1485ba6b40..c8e5de020b3 100644 --- a/.betterer.results +++ b/.betterer.results @@ -967,10 +967,6 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] ], - "public/app/features/alerting/unified/RedirectToRuleViewer.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] - ], "public/app/features/alerting/unified/components/AnnotationDetailsField.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], @@ -988,18 +984,6 @@ exports[`better eslint`] = { "public/app/features/alerting/unified/components/alert-groups/GroupBy.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], - "public/app/features/alerting/unified/components/alert-groups/MatcherFilter.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] - ], - "public/app/features/alerting/unified/components/export/FileExportPreview.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] - ], - "public/app/features/alerting/unified/components/receivers/TemplateDataDocs.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] - ], "public/app/features/alerting/unified/components/receivers/form/ChannelOptions.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"], @@ -1029,158 +1013,23 @@ exports[`better eslint`] = { "public/app/features/alerting/unified/components/rule-editor/AnnotationKeyInput.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], - "public/app/features/alerting/unified/components/rule-editor/DashboardAnnotationField.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] - ], - "public/app/features/alerting/unified/components/rule-editor/DashboardPicker.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] - ], "public/app/features/alerting/unified/components/rule-editor/ExpressionEditor.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], "public/app/features/alerting/unified/components/rule-editor/PreviewRule.tsx:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], - "public/app/features/alerting/unified/components/rule-editor/PreviewRuleResult.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] - ], - "public/app/features/alerting/unified/components/rule-editor/QueryOptions.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] - ], "public/app/features/alerting/unified/components/rule-editor/QueryRows.tsx:5381": [ - [0, 0, 0, "Do not use any type assertions.", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] - ], - "public/app/features/alerting/unified/components/rule-editor/QueryWrapper.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] - ], - "public/app/features/alerting/unified/components/rule-editor/RecordingRuleEditor.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] + [0, 0, 0, "Do not use any type assertions.", "0"] ], "public/app/features/alerting/unified/components/rule-editor/RuleInspector.tsx:5381": [ - [0, 0, 0, "Do not use any type assertions.", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] - ], - "public/app/features/alerting/unified/components/rule-editor/alert-rule-form/AlertRuleForm.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] - ], - "public/app/features/alerting/unified/components/rule-editor/alert-rule-form/simplifiedRouting/route-settings/RouteSettings.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] - ], - "public/app/features/alerting/unified/components/rule-editor/notificaton-preview/NotificationRoute.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] - ], - "public/app/features/alerting/unified/components/rule-editor/notificaton-preview/NotificationRouteDetailsModal.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] - ], - "public/app/features/alerting/unified/components/rule-editor/query-and-alert-condition/QueryAndExpressionsStep.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] - ], - "public/app/features/alerting/unified/components/rule-editor/query-and-alert-condition/SmartAlertTypeDetector.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "2"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "3"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "4"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "5"] - ], - "public/app/features/alerting/unified/components/rule-editor/rule-types/GrafanaManagedAlert.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] - ], - "public/app/features/alerting/unified/components/rule-editor/rule-types/MimirOrLokiAlert.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] - ], - "public/app/features/alerting/unified/components/rule-editor/rule-types/MimirOrLokiRecordingRule.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] - ], - "public/app/features/alerting/unified/components/rule-editor/rule-types/RuleTypePicker.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] - ], - "public/app/features/alerting/unified/components/rule-viewer/FederatedRuleWarning.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] - ], - "public/app/features/alerting/unified/components/rule-viewer/PausedBadge.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] - ], - "public/app/features/alerting/unified/components/rule-viewer/RuleViewer.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] - ], - "public/app/features/alerting/unified/components/rules/AlertStateTag.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] - ], - "public/app/features/alerting/unified/components/rules/CloneRule.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] - ], - "public/app/features/alerting/unified/components/rules/Filter/RulesFilter.v1.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] - ], - "public/app/features/alerting/unified/components/rules/RuleConfigStatus.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] - ], - "public/app/features/alerting/unified/components/rules/RuleDetailsMatchingInstances.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] - ], - "public/app/features/alerting/unified/components/rules/RuleListErrors.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "2"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "3"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "4"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "5"] - ], - "public/app/features/alerting/unified/components/rules/RuleState.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] - ], - "public/app/features/alerting/unified/components/rules/RulesGroup.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] - ], - "public/app/features/alerting/unified/components/rules/state-history/LogRecordViewer.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] - ], - "public/app/features/alerting/unified/components/rules/state-history/LokiStateHistory.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] - ], - "public/app/features/alerting/unified/components/rules/state-history/StateHistory.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] - ], - "public/app/features/alerting/unified/components/silences/SilencedAlertsTableRow.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] - ], - "public/app/features/alerting/unified/components/silences/SilencedInstancesPreview.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] + [0, 0, 0, "Do not use any type assertions.", "0"] ], "public/app/features/alerting/unified/components/silences/SilencesEditor.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], "public/app/features/alerting/unified/components/silences/SilencesFilter.tsx:5381": [ - [0, 0, 0, "Do not use any type assertions.", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] - ], - "public/app/features/alerting/unified/components/silences/SilencesTable.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] - ], - "public/app/features/alerting/unified/home/Insights.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] - ], - "public/app/features/alerting/unified/home/PluginIntegrations.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] + [0, 0, 0, "Do not use any type assertions.", "0"] ], "public/app/features/alerting/unified/hooks/useAlertmanagerConfig.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] @@ -1189,12 +1038,7 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], "public/app/features/alerting/unified/insights/InsightsMenuButton.tsx:5381": [ - [0, 0, 0, "Do not use any type assertions.", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] - ], - "public/app/features/alerting/unified/rule-list/RuleList.v1.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] + [0, 0, 0, "Do not use any type assertions.", "0"] ], "public/app/features/alerting/unified/types/receiver-form.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], diff --git a/eslint.config.js b/eslint.config.js index 6bc4b27d7d3..96189d749c8 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -256,6 +256,7 @@ module.exports = [ plugins: { unicorn: unicornPlugin, react: reactPlugin, + '@grafana': grafanaPlugin, }, files: ['public/app/features/alerting/**/*.{ts,tsx,js,jsx}'], rules: { @@ -268,6 +269,18 @@ module.exports = [ 'unicorn/no-unused-properties': 'error', }, }, + { + // Sections of codebase that have all translation markup issues fixed + name: 'grafana/i18n-overrides', + plugins: { + '@grafana': grafanaPlugin, + }, + files: ['public/app/features/alerting/**/*.{ts,tsx,js,jsx}'], + ignores: ['**/*.{spec,test}.tsx'], + rules: { + '@grafana/no-untranslated-strings': 'error', + }, + }, { name: 'grafana/alerting-test-overrides', plugins: { diff --git a/public/app/features/alerting/unified/RedirectToRuleViewer.tsx b/public/app/features/alerting/unified/RedirectToRuleViewer.tsx index bd48031816f..2f961b0b11e 100644 --- a/public/app/features/alerting/unified/RedirectToRuleViewer.tsx +++ b/public/app/features/alerting/unified/RedirectToRuleViewer.tsx @@ -6,7 +6,7 @@ import { useLocation } from 'react-use'; import { GrafanaTheme2 } from '@grafana/data'; import { config, isFetchError } from '@grafana/runtime'; import { Alert, Card, Icon, LoadingPlaceholder, useStyles2 } from '@grafana/ui'; -import { t } from 'app/core/internationalization'; +import { Trans, t } from 'app/core/internationalization'; import { AlertLabels } from './components/AlertLabels'; import { RuleViewerLayout } from './components/rule-viewer/RuleViewerLayout'; @@ -110,8 +110,10 @@ export function RedirectToRuleViewer(): JSX.Element | null { return (
- No rules in {sourceName} matched the name{' '} - {name} + + No rules in {'{{sourceName}}'} matched the name{' '} + {'{{name}}'} +
); @@ -120,8 +122,10 @@ export function RedirectToRuleViewer(): JSX.Element | null { return (
- Several rules in {sourceName} matched the name{' '} - {name}, please select the rule you want to view. + + Several rules in {'{{sourceName}}'} matched the name{' '} + {'{{name}}'}, please select the rule you want to view. +
{rules.map((rule, index) => { diff --git a/public/app/features/alerting/unified/components/alert-groups/MatcherFilter.tsx b/public/app/features/alerting/unified/components/alert-groups/MatcherFilter.tsx index e294e2208e6..f1c84bee90a 100644 --- a/public/app/features/alerting/unified/components/alert-groups/MatcherFilter.tsx +++ b/public/app/features/alerting/unified/components/alert-groups/MatcherFilter.tsx @@ -54,14 +54,18 @@ export const MatcherFilter = ({ onFilterChange, defaultQueryString }: Props) => - Filter alerts using label querying without spaces, ex: + + Filter alerts using label querying without spaces, ex: +
{`{severity="critical", instance=~"cluster-us-.+"}`}
- Invalid use of spaces: + Invalid use of spaces:
{`{severity= "critical"}`}
{`{severity ="critical"}`}
- Valid use of spaces: + Valid use of spaces:
{`{severity=" critical"}`}
- Filter alerts using label querying without braces, ex: + + Filter alerts using label querying without braces, ex: +
{`severity="critical", instance=~"cluster-us-.+"`}
} diff --git a/public/app/features/alerting/unified/components/export/FileExportPreview.tsx b/public/app/features/alerting/unified/components/export/FileExportPreview.tsx index f19986088c7..b00a78f3113 100644 --- a/public/app/features/alerting/unified/components/export/FileExportPreview.tsx +++ b/public/app/features/alerting/unified/components/export/FileExportPreview.tsx @@ -98,43 +98,43 @@ function FileExportInlineDocumentation({ exportProvider }: { exportProvider: Exp file: { title: 'File-provisioning format', component: ( - <> - {name} format is only valid for File Provisioning.{' '} + + {{ name }} format is only valid for File Provisioning.{' '} Read more in the docs. - + ), }, api: { title: 'API-provisioning format', component: ( - <> - {name} format is only valid for API Provisioning.{' '} + + {{ name }} format is only valid for API Provisioning.{' '} Read more in the docs. - + ), }, terraform: { title: 'Terraform-provisioning format', component: ( - <> - {name} format is only valid for Terraform Provisioning.{' '} + + {{ name }} format is only valid for Terraform Provisioning.{' '} Read more in the docs. - + ), }, }; diff --git a/public/app/features/alerting/unified/components/receivers/TemplateDataDocs.tsx b/public/app/features/alerting/unified/components/receivers/TemplateDataDocs.tsx index e24eec32b25..311b609c8c8 100644 --- a/public/app/features/alerting/unified/components/receivers/TemplateDataDocs.tsx +++ b/public/app/features/alerting/unified/components/receivers/TemplateDataDocs.tsx @@ -2,7 +2,7 @@ import { css } from '@emotion/css'; import * as React from 'react'; import { GrafanaTheme2 } from '@grafana/data'; -import { Stack, useStyles2 } from '@grafana/ui'; +import { Stack, Text, useStyles2 } from '@grafana/ui'; import { Trans } from 'app/core/internationalization'; import { PopupCard } from '../HoverCard'; @@ -21,9 +21,18 @@ export function TemplateDataDocs() { const AlertTemplateDataTable = ( - Alert template data Available only when in the context of an Alert (e.g. inside .Alerts loop) - + <> + + + Alert template data + + + + + Available only when in the context of an Alert (e.g. inside .Alerts loop) + + + } dataItems={AlertTemplateData} /> @@ -33,9 +42,16 @@ export function TemplateDataDocs() { - Notification template data Available in the context of a notification.{' '} - + <> + + Notification template data + + + + Available in the context of a notification. + + + } dataItems={GlobalTemplateData} typeRenderer={(type) => @@ -56,15 +72,7 @@ export function TemplateDataDocs() { ); } -export const getTemplateDataDocsStyles = (theme: GrafanaTheme2) => ({ - header: css({ - color: theme.colors.text.primary, - - span: { - color: theme.colors.text.secondary, - fontSize: theme.typography.bodySmall.fontSize, - }, - }), +const getTemplateDataDocsStyles = (theme: GrafanaTheme2) => ({ interactiveType: css({ color: theme.colors.text.link, }), diff --git a/public/app/features/alerting/unified/components/rule-editor/DashboardAnnotationField.tsx b/public/app/features/alerting/unified/components/rule-editor/DashboardAnnotationField.tsx index 94a7ce84ba2..abe1a56a64d 100644 --- a/public/app/features/alerting/unified/components/rule-editor/DashboardAnnotationField.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/DashboardAnnotationField.tsx @@ -1,7 +1,8 @@ import { css } from '@emotion/css'; import { GrafanaTheme2 } from '@grafana/data'; -import { Icon, useStyles2 } from '@grafana/ui'; +import { Icon, Text, useStyles2 } from '@grafana/ui'; +import { Trans } from 'app/core/internationalization'; import { DashboardDataDTO } from 'app/types'; import { makeDashboardLink, makePanelLink } from '../../utils/misc'; @@ -41,7 +42,13 @@ const DashboardAnnotationField = ({ )} - {!dashboard && Dashboard {dashboardUid} } + {!dashboard && ( + + + Dashboard {{ dashboardUid }} + + + )} {panel && ( @@ -49,7 +56,16 @@ const DashboardAnnotationField = ({ )} - {!panel && - Panel {panelId}} + {!panel && ( + <> + - + + + Panel {{ panelId }} + + + + )} {(dashboard || panel) && ( <> diff --git a/public/app/features/alerting/unified/components/rule-editor/DashboardPicker.tsx b/public/app/features/alerting/unified/components/rule-editor/DashboardPicker.tsx index ed91aa6dc5f..62782920142 100644 --- a/public/app/features/alerting/unified/components/rule-editor/DashboardPicker.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/DashboardPicker.tsx @@ -166,6 +166,8 @@ export const DashboardPicker = ({ dashboardUid, panelId, isOpen, onChange, onDis ); }; + const fallbackDashboardsString = t('alerting.dashboard-picker.fallback-dashboards-string', 'Dashboards'); + return (
- Dashboard: {dashboardModel.title} ({dashboardModel.uid}) in folder{' '} - {dashboardModel.meta?.folderTitle ?? 'Dashboards'} + + Dashboard: {'{{dashboardTitle}}'} ({'{{ dashboardUid }}'}) in folder {'{{ folderTitle }}'} +
{currentPanel && (
- Panel: {currentPanel.title} ({currentPanel.id}) + + Panel: {'{{ panelTitle }}'} ({'{{ panelId }}'}) +
)} diff --git a/public/app/features/alerting/unified/components/rule-editor/PreviewRuleResult.tsx b/public/app/features/alerting/unified/components/rule-editor/PreviewRuleResult.tsx index 263f2b38132..f6294d07aa5 100644 --- a/public/app/features/alerting/unified/components/rule-editor/PreviewRuleResult.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/PreviewRuleResult.tsx @@ -5,7 +5,7 @@ import AutoSizer from 'react-virtualized-auto-sizer'; import { FieldConfigSource, FieldMatcherID, GrafanaTheme2, LoadingState } from '@grafana/data'; import { PanelRenderer } from '@grafana/runtime'; import { TableCellDisplayMode, useStyles2 } from '@grafana/ui'; -import { Trans } from 'app/core/internationalization'; +import { Trans, t } from 'app/core/internationalization'; import { PreviewRuleResponse } from '../../types/preview'; import { RuleFormType } from '../../types/rule-form'; @@ -47,16 +47,23 @@ export function PreviewRuleResult(props: Props): React.ReactElement | null { if (data.state === LoadingState.Error) { return (
- {data.error ? messageFromError(data.error) : 'Failed to preview alert rule'} + {data.error + ? messageFromError(data.error) + : t('alerting.preview-rule-result.preview-failed', 'Failed to preview alert rule')}
); } + return (
- - Preview based on the result of running the query, for this moment.{' '} - {ruleType === RuleFormType.grafana ? 'Configuration for `no data` and `error handling` is not applied.' : null} - + + Preview based on the result of running the query, for this moment. + + {ruleType === RuleFormType.grafana && ( + + Configuration for `no data` and `error handling` is not applied. + + )}
{({ width, height }) => ( diff --git a/public/app/features/alerting/unified/components/rule-editor/QueryOptions.tsx b/public/app/features/alerting/unified/components/rule-editor/QueryOptions.tsx index 8bc640e3a02..d81598b7312 100644 --- a/public/app/features/alerting/unified/components/rule-editor/QueryOptions.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/QueryOptions.tsx @@ -3,7 +3,7 @@ import { useState } from 'react'; import { GrafanaTheme2, RelativeTimeRange, dateTime, getDefaultRelativeTimeRange, rangeUtil } from '@grafana/data'; import { Icon, InlineField, RelativeTimeRangePicker, Toggletip, clearButtonStyles, useStyles2 } from '@grafana/ui'; -import { t } from 'app/core/internationalization'; +import { Trans, t } from 'app/core/internationalization'; import { AlertQuery } from 'app/types/unified-alerting-dto'; import { AlertQueryOptions, MaxDataPointsOption, MinIntervalOption } from './QueryWrapper'; @@ -29,6 +29,8 @@ export const QueryOptions = ({ const timeRange = query.relativeTimeRange ? rangeUtil.relativeToTimeRange(query.relativeTimeRange) : undefined; + const separator = , ; + return ( <>
{dateTime(timeRange?.from).locale('en').fromNow(true)} - {queryOptions.maxDataPoints && , MD = {queryOptions.maxDataPoints}} - {queryOptions.minInterval && , Min. Interval = {queryOptions.minInterval}} + + {queryOptions.maxDataPoints && ( + <> + {separator} + + MD = {'{{maxDataPoints}}'} + + + )} + {queryOptions.minInterval && ( + <> + {separator} + + Min. Interval = {'{{minInterval}}'} + + + )}
); diff --git a/public/app/features/alerting/unified/components/rule-editor/QueryRows.tsx b/public/app/features/alerting/unified/components/rule-editor/QueryRows.tsx index b420381de43..db34d514e00 100644 --- a/public/app/features/alerting/unified/components/rule-editor/QueryRows.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/QueryRows.tsx @@ -290,7 +290,9 @@ const DatasourceNotFound = ({ index, onUpdateDatasource, onRemoveQuery, model }: - The datasource for this query was not found, it was either removed or is not installed correctly. + + The datasource for this query was not found, it was either removed or is not installed correctly. + diff --git a/public/app/features/alerting/unified/components/rule-editor/QueryWrapper.tsx b/public/app/features/alerting/unified/components/rule-editor/QueryWrapper.tsx index be6de4326b3..8bc7dc0fcd8 100644 --- a/public/app/features/alerting/unified/components/rule-editor/QueryWrapper.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/QueryWrapper.tsx @@ -19,7 +19,7 @@ import { import { config } from '@grafana/runtime'; import { DataQuery } from '@grafana/schema'; import { GraphThresholdsStyleMode, Icon, InlineField, Input, Stack, Tooltip, useStyles2 } from '@grafana/ui'; -import { t } from 'app/core/internationalization'; +import { Trans, t } from 'app/core/internationalization'; import { logInfo } from 'app/features/alerting/unified/Analytics'; import { QueryEditorRow } from 'app/features/query/components/QueryEditorRow'; import { AlertDataQuery, AlertQuery } from 'app/types/unified-alerting-dto'; @@ -123,10 +123,10 @@ export const QueryWrapper = ({
+ Not finding the data source you want? Some data sources are not supported for alerting. Click on the icon for more information. - + } > + Interval sent to the data source. Recommended to be set to write frequency, for example 1m if your data is written every minute. - + } > = ({ if (error || !dataSource || !dataSource?.components?.QueryEditor || !dsi) { const errorMessage = error?.message || 'Data source plugin does not export any Query Editor component'; - return
Could not load query editor due to: {errorMessage}
; + return ( +
+ + Could not load query editor due to: {{ errorMessage }} + +
+ ); } const QueryEditor = dataSource.components.QueryEditor; diff --git a/public/app/features/alerting/unified/components/rule-editor/RuleInspector.tsx b/public/app/features/alerting/unified/components/rule-editor/RuleInspector.tsx index bc0ba0c6827..a0058fd44bf 100644 --- a/public/app/features/alerting/unified/components/rule-editor/RuleInspector.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/RuleInspector.tsx @@ -5,7 +5,7 @@ import { useFormContext } from 'react-hook-form'; import AutoSizer from 'react-virtualized-auto-sizer'; import { GrafanaTheme2 } from '@grafana/data'; -import { Button, CodeEditor, Drawer, Icon, Tab, TabsBar, Tooltip, useStyles2 } from '@grafana/ui'; +import { Button, CodeEditor, Drawer, Icon, Tab, TabsBar, TextLink, Tooltip, useStyles2 } from '@grafana/ui'; import { Trans, t } from 'app/core/internationalization'; import { RulerRuleDTO } from '../../../../../types/unified-alerting-dto'; @@ -132,15 +132,13 @@ const InspectorYamlTab = ({ onSubmit }: YamlTabProps) => { function YamlContentInfo() { return (
- The YAML content in the editor only contains alert rule configuration
- To configure Prometheus, you need to provide the rest of the{' '} - - configuration file content. - + + The YAML content in the editor only contains alert rule configuration
+ To configure Prometheus, you need to provide the rest of the{' '} + + configuration file content. + +
); } diff --git a/public/app/features/alerting/unified/components/rule-editor/alert-rule-form/AlertRuleForm.tsx b/public/app/features/alerting/unified/components/rule-editor/alert-rule-form/AlertRuleForm.tsx index 0eb4ddb3b65..a1c3dea3c79 100644 --- a/public/app/features/alerting/unified/components/rule-editor/alert-rule-form/AlertRuleForm.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/alert-rule-form/AlertRuleForm.tsx @@ -278,7 +278,7 @@ export const AlertRuleForm = ({ existing, prefill, isManualRestore }: Props) => disabled={isSubmitting} > {isSubmitting && } - Save rule + Save rule )} diff --git a/public/app/features/alerting/unified/components/rule-editor/query-and-alert-condition/SmartAlertTypeDetector.tsx b/public/app/features/alerting/unified/components/rule-editor/query-and-alert-condition/SmartAlertTypeDetector.tsx index 9b7474a52e8..f5fe77493dd 100644 --- a/public/app/features/alerting/unified/components/rule-editor/query-and-alert-condition/SmartAlertTypeDetector.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/query-and-alert-condition/SmartAlertTypeDetector.tsx @@ -115,9 +115,12 @@ export function SmartAlertTypeDetector({

- Grafana-managed alert rules allow you to create alerts that can act on data from any of our supported - data sources, including having multiple data sources in the same rule. You can also add expressions to - transform your data and set alert conditions. Using images in alert notifications is also supported. + + Grafana-managed alert rules allow you to create alerts that can act on data from any of our + supported data sources, including having multiple data sources in the same rule. You can also add + expressions to transform your data and set alert conditions. Using images in alert notifications is + also supported. +

@@ -125,8 +128,11 @@ export function SmartAlertTypeDetector({

- Data source-managed alert rules can be used for Grafana Mimir or Grafana Loki data sources which have - been configured to support rule creation. The use of expressions or multiple queries is not supported. + + Data source-managed alert rules can be used for Grafana Mimir or Grafana Loki data sources which + have been configured to support rule creation. The use of expressions or multiple queries is not + supported. +

} @@ -146,7 +152,11 @@ export function SmartAlertTypeDetector({ /> {/* editing an existing rule, we just show "cannot be changed" */} {editingExistingRule && ( - The alert rule type cannot be changed for an existing rule. + + + The alert rule type cannot be changed for an existing rule. + + )} {/* in regular alert creation we tell the user what options they have when using a cloud data source */} {!editingExistingRule && ( @@ -154,11 +164,21 @@ export function SmartAlertTypeDetector({ {canSwitch ? ( {ruleFormType === RuleFormType.grafana - ? 'The data source selected in your query supports alert rule management. Switch to data source-managed if you want the alert rule to be managed by the data source instead of Grafana.' - : 'Switch to Grafana-managed to use expressions, multiple queries, images in notifications and various other features.'} + ? t( + 'alerting.smart-alert-type-detector.switch-to-data-source-managed', + 'The data source selected in your query supports alert rule management. Switch to data source-managed if you want the alert rule to be managed by the data source instead of Grafana.' + ) + : t( + 'alerting.smart-alert-type-detector.switch-to-grafana-managed', + 'Switch to Grafana-managed to use expressions, multiple queries, images in notifications and various other features.' + )} ) : ( - Based on the selected data sources this alert rule will be Grafana-managed. + + + Based on the selected data sources this alert rule will be Grafana-managed. + + )} )} diff --git a/public/app/features/alerting/unified/components/rule-editor/rule-types/GrafanaManagedAlert.tsx b/public/app/features/alerting/unified/components/rule-editor/rule-types/GrafanaManagedAlert.tsx index 49443375d5f..1082af39e63 100644 --- a/public/app/features/alerting/unified/components/rule-editor/rule-types/GrafanaManagedAlert.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/rule-types/GrafanaManagedAlert.tsx @@ -1,3 +1,4 @@ +import { Trans } from '../../../../../../core/internationalization'; import { RuleFormType } from '../../../types/rule-form'; import { RuleType, SharedProps } from './RuleType'; @@ -8,9 +9,11 @@ const GrafanaManagedRuleType = ({ selected = false, disabled, onClick }: SharedP name="Grafana managed alert" description={ - Supports multiple data sources of any kind. -
- Transform data with expressions. + + Supports multiple data sources of any kind. +
+ Transform data with expressions. +
} image="public/img/grafana_icon.svg" diff --git a/public/app/features/alerting/unified/components/rule-editor/rule-types/MimirOrLokiAlert.tsx b/public/app/features/alerting/unified/components/rule-editor/rule-types/MimirOrLokiAlert.tsx index e1c1adb3981..ff17689288c 100644 --- a/public/app/features/alerting/unified/components/rule-editor/rule-types/MimirOrLokiAlert.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/rule-types/MimirOrLokiAlert.tsx @@ -1,3 +1,4 @@ +import { Trans } from '../../../../../../core/internationalization'; import { RuleFormType } from '../../../types/rule-form'; import { DisabledTooltip } from './DisabledTooltip'; @@ -14,9 +15,11 @@ const MimirFlavoredType = ({ selected = false, disabled = false, onClick }: Prop name="Mimir or Loki alert" description={ - Use a Mimir, Loki or Cortex datasource. -
- Expressions are not supported. + + Use a Mimir, Loki or Cortex datasource. +
+ Expressions are not supported. +
} image="public/img/alerting/mimir_logo.svg" diff --git a/public/app/features/alerting/unified/components/rule-editor/rule-types/MimirOrLokiRecordingRule.tsx b/public/app/features/alerting/unified/components/rule-editor/rule-types/MimirOrLokiRecordingRule.tsx index de899b0a690..226083ce922 100644 --- a/public/app/features/alerting/unified/components/rule-editor/rule-types/MimirOrLokiRecordingRule.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/rule-types/MimirOrLokiRecordingRule.tsx @@ -1,3 +1,4 @@ +import { Trans } from '../../../../../../core/internationalization'; import { RuleFormType } from '../../../types/rule-form'; import { DisabledTooltip } from './DisabledTooltip'; @@ -10,9 +11,11 @@ const RecordingRuleType = ({ selected = false, disabled = false, onClick }: Shar name="Mimir or Loki recording rule" description={ - Precompute expressions. -
- Should be combined with an alert rule. + + Precompute expressions. +
+ Should be combined with an alert rule. +
} image="public/img/alerting/mimir_logo_recording.svg" diff --git a/public/app/features/alerting/unified/components/rule-editor/rule-types/RuleTypePicker.tsx b/public/app/features/alerting/unified/components/rule-editor/rule-types/RuleTypePicker.tsx index 17cbdcfcd6e..a3164793495 100644 --- a/public/app/features/alerting/unified/components/rule-editor/rule-types/RuleTypePicker.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/rule-types/RuleTypePicker.tsx @@ -4,6 +4,7 @@ import { isEmpty } from 'lodash'; import { GrafanaTheme2 } from '@grafana/data'; import { Stack, useStyles2 } from '@grafana/ui'; +import { Trans } from '../../../../../../core/internationalization'; import { useRulesSourcesWithRuler } from '../../../hooks/useRuleSourcesWithRuler'; import { RuleFormType } from '../../../types/rule-form'; @@ -41,8 +42,10 @@ const RuleTypePicker = ({ selected, onChange, enabledTypes }: RuleTypePickerProp {enabledTypes.includes(RuleFormType.grafana) && ( - Select “Grafana managed” unless you have a Mimir, Loki or Cortex data source with the Ruler API - enabled. + + Select “Grafana managed” unless you have a Mimir, Loki or Cortex data source with the Ruler API + enabled. + )} diff --git a/public/app/features/alerting/unified/components/rule-viewer/FederatedRuleWarning.tsx b/public/app/features/alerting/unified/components/rule-viewer/FederatedRuleWarning.tsx index 2bdd6d429fe..fd23ef05d99 100644 --- a/public/app/features/alerting/unified/components/rule-viewer/FederatedRuleWarning.tsx +++ b/public/app/features/alerting/unified/components/rule-viewer/FederatedRuleWarning.tsx @@ -10,7 +10,9 @@ export function FederatedRuleWarning() { topSpacing={2} > - Federated rule groups are currently an experimental feature. + + Federated rule groups are currently an experimental feature. + )} @@ -122,7 +149,9 @@ const ErrorSummaryButton: FC = ({ count, onClick }) => {
@@ -139,5 +168,6 @@ const getStyles = (theme: GrafanaTheme2) => ({ }), dsLink: css({ fontWeight: theme.typography.fontWeightBold, + color: theme.colors.text.link, }), }); diff --git a/public/app/features/alerting/unified/components/rules/RuleState.tsx b/public/app/features/alerting/unified/components/rules/RuleState.tsx index 89c3187f44a..1b4096edf8e 100644 --- a/public/app/features/alerting/unified/components/rules/RuleState.tsx +++ b/public/app/features/alerting/unified/components/rules/RuleState.tsx @@ -50,14 +50,20 @@ export const RuleState = ({ rule, isDeleting, isCreating, isPaused }: Props) => if (firstActiveAt) { return ( - for{' '} - {intervalToAbbreviatedDurationString( - { - start: firstActiveAt, - end: new Date(), - }, - false - )} + + for {'{{duration}}'} + {' '} ); } diff --git a/public/app/features/alerting/unified/components/rules/RulesGroup.tsx b/public/app/features/alerting/unified/components/rules/RulesGroup.tsx index 32ef405e56a..dcb9bc44cb3 100644 --- a/public/app/features/alerting/unified/components/rules/RulesGroup.tsx +++ b/public/app/features/alerting/unified/components/rules/RulesGroup.tsx @@ -4,7 +4,7 @@ import React, { useEffect, useState } from 'react'; import { GrafanaTheme2 } from '@grafana/data'; import { selectors } from '@grafana/e2e-selectors'; import { Badge, Icon, Spinner, Stack, Tooltip, useStyles2 } from '@grafana/ui'; -import { t } from 'app/core/internationalization'; +import { Trans, t } from 'app/core/internationalization'; import { CombinedRuleGroup, CombinedRuleNamespace, RulesSource } from 'app/types/unified-alerting'; import { useFolder } from '../../hooks/useFolder'; @@ -78,7 +78,7 @@ export const RulesGroup = React.memo(({ group, namespace, expandAll, viewMode }: actionIcons.push( - deleting + Deleting ); } else if (rulesSource === GRAFANA_RULES_SOURCE_NAME) { diff --git a/public/app/features/alerting/unified/components/rules/state-history/LogRecordViewer.tsx b/public/app/features/alerting/unified/components/rules/state-history/LogRecordViewer.tsx index 8286e3523e8..3ea521ff3ab 100644 --- a/public/app/features/alerting/unified/components/rules/state-history/LogRecordViewer.tsx +++ b/public/app/features/alerting/unified/components/rules/state-history/LogRecordViewer.tsx @@ -5,7 +5,7 @@ import { Fragment, memo, useEffect } from 'react'; import { GrafanaTheme2, dateTimeFormat } from '@grafana/data'; import { Icon, Stack, TagList, useStyles2 } from '@grafana/ui'; -import { t } from 'app/core/internationalization'; +import { Trans, t } from 'app/core/internationalization'; import { Label } from '../../Label'; import { AlertStateTag } from '../AlertStateTag'; @@ -151,7 +151,11 @@ const Timestamp = ({ time }: TimestampProps) => { {dateTimeFormat(dateTime)} - ({formatDistanceToNowStrict(dateTime)} ago) + + + ({'{{time}}'} ago) + +
); diff --git a/public/app/features/alerting/unified/components/rules/state-history/LokiStateHistory.tsx b/public/app/features/alerting/unified/components/rules/state-history/LokiStateHistory.tsx index 84935770da6..e4769d5f293 100644 --- a/public/app/features/alerting/unified/components/rules/state-history/LokiStateHistory.tsx +++ b/public/app/features/alerting/unified/components/rules/state-history/LokiStateHistory.tsx @@ -92,7 +92,9 @@ const LokiStateHistory = ({ ruleUID }: Props) => { )} severity="error" > - {error instanceof Error ? error.message : 'Unable to fetch alert state history'} + {error instanceof Error + ? error.message + : t('alerting.loki-state-history.error-unable-to-fetch', 'Unable to fetch alert state history')} ); } @@ -202,8 +204,12 @@ const SearchFieldInput = React.forwardRef - Use label matcher expression (like {'{foo=bar}'}) or click on an instance label to - filter instances + + Use label matcher expression or click on an instance label to filter instances, for example: + +
+ {'{foo=bar}'} +
} > diff --git a/public/app/features/alerting/unified/components/rules/state-history/StateHistory.tsx b/public/app/features/alerting/unified/components/rules/state-history/StateHistory.tsx index 4f21ecc3408..e263486c6e0 100644 --- a/public/app/features/alerting/unified/components/rules/state-history/StateHistory.tsx +++ b/public/app/features/alerting/unified/components/rules/state-history/StateHistory.tsx @@ -100,8 +100,13 @@ const StateHistory = ({ ruleUID }: Props) => { - Filter each state history group either by exact match or a regular expression, ex:{' '} - {`region=eu-west-1`} or {`/region=us-.+/`} + + Filter each state history group either by exact match or a regular expression, for example: + +
+ {`region=eu-west-1`} + {`/region=us-.+/`} +
} > diff --git a/public/app/features/alerting/unified/components/silences/SilencedAlertsTableRow.tsx b/public/app/features/alerting/unified/components/silences/SilencedAlertsTableRow.tsx index a867f5a4ed7..01eb06d61f3 100644 --- a/public/app/features/alerting/unified/components/silences/SilencedAlertsTableRow.tsx +++ b/public/app/features/alerting/unified/components/silences/SilencedAlertsTableRow.tsx @@ -3,6 +3,7 @@ import { useState } from 'react'; import { intervalToAbbreviatedDurationString } from '@grafana/data'; import { AlertmanagerAlert } from 'app/plugins/datasource/alertmanager/types'; +import { Trans } from '../../../../../core/internationalization'; import { AlertLabels } from '../AlertLabels'; import { CollapseToggle } from '../CollapseToggle'; @@ -35,7 +36,9 @@ export const SilencedAlertsTableRow = ({ alert, className }: Props) => { - for {duration} + + for {{ duration }} + {alertName} {!isCollapsed && ( diff --git a/public/app/features/alerting/unified/components/silences/SilencedInstancesPreview.tsx b/public/app/features/alerting/unified/components/silences/SilencedInstancesPreview.tsx index 4f1405e4afc..d3c8ec12045 100644 --- a/public/app/features/alerting/unified/components/silences/SilencedInstancesPreview.tsx +++ b/public/app/features/alerting/unified/components/silences/SilencedInstancesPreview.tsx @@ -70,7 +70,9 @@ export const SilencedInstancesPreview = ({ amSourceName, matchers: inputMatchers title={t('alerting.silenced-instances-preview.title-preview-not-available', 'Preview not available')} severity="error" > - Error occurred when generating preview of affected alerts. Are your matchers valid? + + Error occurred when generating preview of affected alerts. Are your matchers valid? + ); } diff --git a/public/app/features/alerting/unified/components/silences/SilencesFilter.tsx b/public/app/features/alerting/unified/components/silences/SilencesFilter.tsx index b28cbdd7b90..3a7b875bb71 100644 --- a/public/app/features/alerting/unified/components/silences/SilencesFilter.tsx +++ b/public/app/features/alerting/unified/components/silences/SilencesFilter.tsx @@ -52,10 +52,16 @@ export const SilencesFilter = () => { Search by matchers - Filter silences by using a comma separated list of matchers, e.g.: + <> +
+ + Filter silences by using a comma separated list of matchers, e.g. + +
+ + {/* eslint-disable-next-line @grafana/no-untranslated-strings */}
severity=critical, env=production
-
+ } > diff --git a/public/app/features/alerting/unified/components/silences/SilencesTable.tsx b/public/app/features/alerting/unified/components/silences/SilencesTable.tsx index 1c4cfb0219a..a911329390e 100644 --- a/public/app/features/alerting/unified/components/silences/SilencesTable.tsx +++ b/public/app/features/alerting/unified/components/silences/SilencesTable.tsx @@ -326,7 +326,14 @@ function useColumns(alertManagerSourceName: string) { id: 'alerts', label: 'Alerts silenced', renderCell: function renderSilencedAlerts({ data: { silencedAlerts } }) { - return {Array.isArray(silencedAlerts) ? silencedAlerts.length : '-'}; + return ( + + {Array.isArray(silencedAlerts) + ? silencedAlerts.length + : // eslint-disable-next-line @grafana/no-untranslated-strings + '-'} + + ); }, size: 2, }, diff --git a/public/app/features/alerting/unified/home/Insights.tsx b/public/app/features/alerting/unified/home/Insights.tsx index 22c283c10bf..afbc89caf16 100644 --- a/public/app/features/alerting/unified/home/Insights.tsx +++ b/public/app/features/alerting/unified/home/Insights.tsx @@ -15,6 +15,7 @@ import { VariableValueSelectors, } from '@grafana/scenes'; import { Icon, Text, Tooltip } from '@grafana/ui'; +import { Trans } from 'app/core/internationalization'; import { getAPINamespace } from '../../../../api/utils'; import { SectionFooter } from '../insights/SectionFooter'; @@ -178,15 +179,19 @@ export function getInsightsScenes() { props: { children: ( - Monitor the status of your system{' '} + Monitor the status of your system{' '} - Alerting insights provides pre-built dashboards to monitor your alerting data. + + Alerting insights provides pre-built dashboards to monitor your alerting data. +

- You can identify patterns in why things go wrong and discover trends in alerting performance within - your organization. + + You can identify patterns in why things go wrong and discover trends in alerting performance + within your organization. + } > diff --git a/public/app/features/alerting/unified/home/PluginIntegrations.tsx b/public/app/features/alerting/unified/home/PluginIntegrations.tsx index 4a7d560da38..48faa9ccc19 100644 --- a/public/app/features/alerting/unified/home/PluginIntegrations.tsx +++ b/public/app/features/alerting/unified/home/PluginIntegrations.tsx @@ -3,6 +3,7 @@ import { css } from '@emotion/css'; import { GrafanaTheme2 } from '@grafana/data'; import { Stack, Text, useStyles2 } from '@grafana/ui'; +import { Trans } from '../../../../core/internationalization'; import { useAlertingHomePageExtensions } from '../plugins/useAlertingHomePageExtensions'; export function PluginIntegrations() { @@ -17,7 +18,9 @@ export function PluginIntegrations() { return ( - Speed up your alerts creation now by using one of our tailored apps + + Speed up your alerts creation now by using one of our tailored apps + {components.map((Component, i) => ( diff --git a/public/app/features/alerting/unified/insights/InsightsMenuButton.tsx b/public/app/features/alerting/unified/insights/InsightsMenuButton.tsx index 580c8a8afb3..eb57fab3631 100644 --- a/public/app/features/alerting/unified/insights/InsightsMenuButton.tsx +++ b/public/app/features/alerting/unified/insights/InsightsMenuButton.tsx @@ -85,7 +85,11 @@ const InsightsMenuButtonRenderer = ({ model }: SceneComponentProps
-

Help us improve this page by telling us whether this panel is useful to you!

+

+ + Help us improve this page by telling us whether this panel is useful to you! + +

)} diff --git a/public/locales/en-US/grafana.json b/public/locales/en-US/grafana.json index a3f7fa541c5..7c7a10c6e15 100644 --- a/public/locales/en-US/grafana.json +++ b/public/locales/en-US/grafana.json @@ -410,7 +410,9 @@ "alert-rule-form": { "action-buttons": { "delete": "Delete", - "edit-yaml": "Edit YAML" + "edit-yaml": "Edit YAML", + "save": "Save rule", + "save-exit": "Save rule and exit" }, "title-delete-rule": "Delete rule" }, @@ -443,6 +445,9 @@ "suppressed-the-alert-has-been-silenced": "Suppressed: The alert has been silenced.", "unprocessed-the-alert-is-received": "Unprocessed: The alert is received but its notification has not been processed yet." }, + "alert-state-tag": { + "paused": "Paused" + }, "alert-warning": { "to-rule-list": "To rule list" }, @@ -578,6 +583,10 @@ "tooltip-remove-matcher": "Remove matcher" }, "annotations": { + "dashboard-annotation-field": { + "dashboard": "Dashboard {{dashboardUid}}", + "panel": "Panel {{panelId}}" + }, "description": "Add more context to your alert notifications.", "title": "Configure notification message" }, @@ -796,6 +805,9 @@ }, "dashboard-picker": { "confirm": "Confirm", + "current-selection-dashboard": "Dashboard: {{dashboardTitle}} ({{ dashboardUid }}) in folder {{ folderTitle }}", + "current-selection-panel": "Panel: {{ panelTitle }} ({{ panelId }})", + "fallback-dashboards-string": "Dashboards", "placeholder-search-dashboard": "Search dashboard", "placeholder-search-panel": "Search panel", "select-dashboard-available-panels": "Select a dashboard to get a list of available panels", @@ -810,6 +822,7 @@ "import-to-grafana": "Import to Grafana rules" }, "datasource-not-found": { + "card-description": "The datasource for this query was not found, it was either removed or is not installed correctly.", "remove-query": "Remove query", "show-details": "Show details", "this-datasource-has-been-removed": "This datasource has been removed", @@ -888,9 +901,6 @@ "failed-to-update-your-configuration": "Failed to update your configuration:", "title-something-went-wrong": "Something went wrong" }, - "error-summary-button": { - "error": "1 error" - }, "evaluation-behavior-summary": { "evaluate": "Every {{every}}", "label-evaluate": "Evaluate", @@ -962,9 +972,15 @@ "no-data": "No data" }, "federated-rule-warning": { + "experimental": "Federated rule groups are currently an experimental feature.", "read-documentation": "Read documentation", "title-federated-group": "This rule is part of a federated rule group." }, + "file-export-inline-documentation": { + "api-provisioning": "{{name}} format is only valid for API Provisioning. <3>Read more in the docs.", + "file-provisioning": "{{name}} format is only valid for File Provisioning. <3>Read more in the docs.", + "terraform-provisioning": "{{name}} format is only valid for Terraform Provisioning. <3>Read more in the docs." + }, "file-export-preview": { "copy-code": "Copy code", "download": "Download" @@ -1047,6 +1063,9 @@ "grafana-folder-and-labels-step": { "title-add-folder-and-labels": "Add folder and labels" }, + "grafana-managed-rule-type": { + "description": "Supports multiple data sources of any kind.<1>Transform data with expressions." + }, "grafana-modify-export": { "body-invalid-rule-id": "The rule UID in the page URL is invalid. Please check the URL and try again.", "title-invalid-rule-id": "Invalid rule ID" @@ -1217,8 +1236,14 @@ "label": "Target folder" } }, + "insights": { + "monitor-status-of-system": "Monitor the status of your system", + "monitor-status-system-tooltip": "Alerting insights provides pre-built dashboards to monitor your alerting data.", + "monitor-status-system-tooltip-identify": "You can identify patterns in why things go wrong and discover trends in alerting performance within your organization." + }, "insights-menu-button-renderer": { "aria-label-rate-this-panel": "Rate this panel", + "help-us": "Help us improve this page by telling us whether this panel is useful to you!", "menu": { "label-explore": "Explore", "label-rate-this-panel": "Rate this panel" @@ -1323,6 +1348,7 @@ "loki-state-history": { "clear-filters": "Clear filters", "common-labels": "Common labels", + "error-unable-to-fetch": "Unable to fetch alert state history", "loading": "Loading...", "title-error-fetching-the-state-history": "Error fetching the state history" }, @@ -1331,8 +1357,12 @@ "title": "Manage permissions" }, "matcher-filter": { + "filter-alerts-using-label-querying-without-braces": "Filter alerts using label querying without braces, ex:", + "filter-alerts-using-label-querying-without-spaces": "Filter alerts using label querying without spaces, ex:", + "invalid-use-of-spaces": "Invalid use of spaces:", "search-by-label": "Search by label", - "search-query-input-placeholder-search": "Search" + "search-query-input-placeholder-search": "Search", + "valid-use-of-spaces": "Valid use of spaces:" }, "matchers-field": { "add-matcher": "Add matcher", @@ -1358,8 +1388,12 @@ "migrate-to-gmabutton": { "aria-label-new": "new" }, + "mimir-flavored-type": { + "description": "Use a Mimir, Loki or Cortex datasource.<1>Expressions are not supported." + }, "min-interval-option": { - "label-interval": "Interval" + "label-interval": "Interval", + "tooltip-interval": "Interval sent to the data source. Recommended to be set to write frequency, for example <1>1m if your data is written every minute." }, "modify-export-rule-form": { "action-buttons": { @@ -1499,13 +1533,16 @@ "notification-route-details-modal": { "alert-instances-routed-follows": "Your alert instances are routed as follows.", "close": "Close", + "contact-point": "Contact point", "default-policy": "Default policy", "notification-policy-path": "Notification policy path", + "see-details-link": "See details", "title-routing-details": "Routing details" }, "notification-route-header": { "aria-label-expand-policy-route": "Expand policy route", "delivered-to": "@ Delivered to", + "notification-policy": "Notification policy", "see-details": "See details" }, "notification-templates": { @@ -1548,6 +1585,9 @@ "text-loading-rules": "Loading rules...", "title-dashboard-not-saved": "Dashboard not saved" }, + "paused-badge": { + "paused": "Paused" + }, "payload-editor": { "edit-payload": "Edit payload", "label-add-custom-alert-instance": "Add custom alert instance", @@ -1555,6 +1595,9 @@ "label-use-existing-alert-instances": "Use existing alert instances", "reference": "Reference" }, + "plugin-integrations": { + "tailored-apps": "Speed up your alerts creation now by using one of our tailored apps" + }, "policies": { "aria-label-collapse": "Collapse", "aria-label-expand": "Expand", @@ -1635,7 +1678,10 @@ "title-preview-is-not-available": "Preview is not available" }, "preview-rule-result": { - "loading-preview": "Loading preview..." + "loading-preview": "Loading preview...", + "no-data-error-handling-not-applied": "Configuration for `no data` and `error handling` is not applied.", + "preview-based-on-query-result": "Preview based on the result of running the query, for this moment.", + "preview-failed": "Failed to preview alert rule" }, "preview-summary": { "no-series": "No series" @@ -1664,6 +1710,7 @@ }, "query-and-expressions-step": { "add-query": "Add query", + "body-queries-expressions-configured": "Create at least one query or expression to be alerted on", "expressions": "Expressions", "manipulate-returned-queries-other-operations": "Manipulate data returned from queries with math and other operations.", "title-deactivate-advanced-options": "Deactivate advanced options", @@ -1674,7 +1721,10 @@ "view-in-explore": "View in Explore" }, "query-options": { - "label-time-range": "Time Range" + "button-options": "Options", + "label-time-range": "Time Range", + "max-data-points": "MD = {{maxDataPoints}}", + "min-interval": "Min. Interval = {{minInterval}}" }, "query-preview": { "relative-time-range": "{{from}} to now" @@ -1705,6 +1755,12 @@ "label-export-all": "Export all" } }, + "recording-rule-editor": { + "error-no-query-editor": "Could not load query editor due to: {{errorMessage}}" + }, + "recording-rule-type": { + "description": "Precompute expressions.<1>Should be combined with an alert rule." + }, "recording-rules": { "description-target-data-source": "The Prometheus data source to store recording rules in", "label-target-data-source": "Target data source" @@ -1714,9 +1770,13 @@ "title-add-namespace-and-group": "Add namespace and group" }, "redirect-to-clone-rule": { + "body-evaluation-group": "You will need to set a new evaluation group for the copied rule because the original one has been provisioned and cannot be used for rules created in the UI.", + "body-not-provisioned": "The new rule will <1>not be marked as a provisioned rule.", "title-copy-provisioned-alert-rule": "Copy provisioned alert rule" }, "redirect-to-rule-viewer": { + "no-rules-found": "No rules in <1>{{sourceName}} matched the name <4>{{name}}", + "several-rules-found": "Several rules in <1>{{sourceName}} matched the name <4>{{name}}, please select the rule you want to view.", "text-loading-rule": "Loading rule...", "title-could-not-view-rule": "Could not view rule", "title-failed-to-load": "Failed to load rules from {{sourceName}}" @@ -1745,14 +1805,21 @@ "routing-settings": { "aria-label-group-by": "Group by", "description-group-by": "Combine multiple alerts into a single notification by grouping them by the same label values. If empty, it is inherited from the default notification policy.", + "group-interval": "Group interval: <1>{{groupIntervalValue}}", + "group-wait": "Group wait: <1>{{groupWaitValue}}", + "grouping": "Grouping: <1>{{fields}}", "label-group-by": "Group by", "label-override-grouping": "Override grouping", - "label-override-timings": "Override timings" + "label-override-timings": "Override timings", + "repeat-interval": "Repeat interval: <1>{{repeatIntervalValue}}" }, "rule-actions-buttons": { "title-edit": "Edit", "title-view": "View" }, + "rule-config-status": { + "tooltip-min-interval": "A minimum evaluation interval of <1>{{minInterval}} has been configured in Grafana and will be used instead of the {{ruleInterval}} interval configured for the Rule Group." + }, "rule-details": { "keep-firing-for": "Keep firing for", "label-instances": "Instances", @@ -1775,6 +1842,11 @@ "rule-details-federated-sources": { "label-tenant-sources": "Tenant sources" }, + "rule-details-matching-instances": { + "button-show-all_one": "Show all {{totalItems}} alert instances", + "button-show-all_other": "Show all {{totalItems}} alert instances", + "showing-count": "Showing {{visibleItems}} out of {{totalItems}} instances" + }, "rule-editor": { "get-content": { "sorry-allowed-create-rules": "Sorry! You are not allowed to create rules.", @@ -1933,7 +2005,20 @@ "unknown-rule-type": "Unknown rule type" }, "rule-list-errors": { - "cloud-rulessource-errors-title-errors-loading-rules": "Errors loading rules" + "button-errors_one": "{{count}} error", + "button-errors_other": "{{count}} errors", + "cloud-rulessource-errors-title-errors-loading-rules": "Errors loading rules", + "failed-to-load-grafana-rules-config": "Failed to load Grafana rules config:", + "failed-to-load-grafana-rules-state": "Failed to load Grafana rules state:", + "failed-to-load-rules-config": "Failed to load rules config from <2>{{dataSource}}", + "failed-to-load-rules-state": "Failed to load rules state from <2>{{dataSource}}", + "more-errors_one": "{{count}} more error", + "more-errors_other": "{{count}} more errors", + "unknown-error": "Unknown error." + }, + "rule-list-v1": { + "collapse-all": "Collapse all", + "expand-all": "Expand all" }, "rule-modify-export": { "text-loading-the-rule": "Loading the rule...", @@ -1945,6 +2030,7 @@ "rule-state": { "creating": "Creating", "deleting": "Deleting", + "for": "for {{duration}}", "na": "n/a", "paused": "Paused", "recording-rule": "Recording rule" @@ -1960,6 +2046,9 @@ "recording": "{{recordingStats}} recording", "recovering": "{{recoveringStats}} recovering" }, + "rule-type-picker": { + "grafana-managed": "Select “Grafana managed” unless you have a Mimir, Loki or Cortex data source with the Ruler API enabled." + }, "rule-view": { "query": { "datasources-na": { @@ -1970,6 +2059,7 @@ }, "rule-viewer": { "error-loading": "Something went wrong loading the rule", + "evaluation-interval": "Every {{interval}}", "prometheus-consistency-check": { "alert-message": "Alert rule has been added or updated. Changes may take up to a minute to appear on the Alert rules list view.", "alert-title": "Update in progress" @@ -1995,6 +2085,7 @@ }, "rules-filter": { "clear-filters": "Clear filters", + "configured-alert-rules": "Data sources containing configured alert rules are Mimir or Loki data sources where alert rules are stored and evaluated in the data source itself.", "dashboard": "Dashboard", "data-source-picker-inline-help-title-search-by-data-sources-help": "Search by data sources help", "filter-options": { @@ -2003,6 +2094,7 @@ "label-saved-searches": "Saved searches" }, "health": "Health", + "manage-alerts": "In these data sources, you can select Manage alerts via Alerting UI to be able to manage these alert rules in the Grafana UI as well as in the data source where they were configured.", "placeholder-all-data-sources": "All data sources", "plugin-rules": "Plugin rules", "rule-type": "Rule type", @@ -2014,6 +2106,7 @@ "view-as": "View as" }, "rules-group": { + "deleting": "Deleting", "text-federated": "Federated", "text-provisioned": "Provisioned" }, @@ -2036,11 +2129,13 @@ "search-field-input": { "clear": "Clear", "filter-instances": "Filter instances", + "filter-instances-tooltip": "Use label matcher expression or click on an instance label to filter instances, for example:", "instancesSearchInput-placeholder-filter-instances": "Filter instances" }, "search-query-help": { "expression": "Expression", "filter-type": "Filter type", + "search-syntax": "Search syntax allows to query alert rules by the parameters defined below.", "title-contact-point": "Contact point", "title-dashboard-uid": "Dashboard UID", "title-datasources": "Datasources", @@ -2052,6 +2147,9 @@ "title-state": "State", "title-type": "Type" }, + "selecting-data-source-tooltip": { + "tooltip-content": "Not finding the data source you want? Some data sources are not supported for alerting. Click on the icon for more information." + }, "settings-content": { "add-new-alertmanager": "Add new Alertmanager", "builtin-alertmanager": "Built-in Alertmanager", @@ -2072,7 +2170,11 @@ "label-silence-start-and-end": "Silence start and end", "placeholder-select-time-range": "Select time range" }, + "silenced-alerts-table-row": { + "silenced-for": "for {{duration}}" + }, "silenced-instances-preview": { + "error-generating-preview": "Error occurred when generating preview of affected alerts. Are your matchers valid?", "no-firing-alert-instances-found": "No firing alert instances found", "text-loading-affected-alert-rule-instances": "Loading affected alert rule instances...", "title-preview-not-available": "Preview not available", @@ -2093,6 +2195,7 @@ "saving": "Saving..." }, "silences-filter": { + "search-by-matchers-tooltip": "Filter silences by using a comma separated list of matchers, e.g.", "search-query-input-placeholder-search": "Search" }, "silences-table": { @@ -2111,13 +2214,20 @@ }, "smart-alert-type-detector": { "data-sourcemanaged-alert-rules": "Data source-managed alert rules", + "data-sourcemanaged-alert-rules-description": "Data source-managed alert rules can be used for Grafana Mimir or Grafana Loki data sources which have been configured to support rule creation. The use of expressions or multiple queries is not supported.", "grafanamanaged-alert-rules": "Grafana-managed alert rules", + "grafanamanaged-alert-rules-description": "Grafana-managed alert rules allow you to create alerts that can act on data from any of our supported data sources, including having multiple data sources in the same rule. You can also add expressions to transform your data and set alert conditions. Using images in alert notifications is also supported.", "rule-type": "Rule type", + "rule-type-cannot-be-changed": "The alert rule type cannot be changed for an existing rule.", + "rule-type-grafana-managed": "Based on the selected data sources this alert rule will be Grafana-managed.", "select-where-alert-managed": "Select where the alert rule will be managed.", + "switch-to-data-source-managed": "The data source selected in your query supports alert rule management. Switch to data source-managed if you want the alert rule to be managed by the data source instead of Grafana.", + "switch-to-grafana-managed": "Switch to Grafana-managed to use expressions, multiple queries, images in notifications and various other features.", "title-alert-rule-types": "Alert rule types" }, "state-history": { "filter-group": "Filter group", + "filter-group-tooltip": "Filter each state history group either by exact match or a regular expression, for example:", "placeholder-search": "Search", "text-loading-history": "Loading history...", "title-failed-to-fetch-alert-state-history": "Failed to fetch alert state history" @@ -2137,6 +2247,14 @@ "template-content-and-preview": { "label-template-content": "Template content" }, + "template-data-docs": { + "alert-template-data-table": { + "alert-template-data": "Alert template data", + "only-in-alert": "Available only when in the context of an Alert (e.g. inside .Alerts loop)" + }, + "available-context-notification": "Available in the context of a notification.", + "notification-template-data": "Notification template data" + }, "template-data-table": { "name": "Name", "notes": "Notes", @@ -2212,6 +2330,9 @@ "timestamp": "Timestamp", "value": "Value" }, + "timestamp": { + "time-ago": "({{time}} ago)" + }, "to-gma": { "confirm-modal": { "body": "The target folder is not empty, some rules may be overwritten or removed. Are you sure you want to import these alert rules to Grafana-managed rules?", @@ -2219,6 +2340,9 @@ "title-warning": "Warning" } }, + "type-selector-button": { + "add-expression": "Add expression" + }, "unknown-rule-list-item": { "title-unknown-rule-type": "Unknown rule type" }, @@ -2285,6 +2409,9 @@ "title-alert-rules": "Alert rules", "title-contact-points": "Contact points", "title-notification-policies": "Notification policies" + }, + "yaml-content-info": { + "body": "The YAML content in the editor only contains alert rule configuration <1>To configure Prometheus, you need to provide the rest of the <4>configuration file content." } }, "annotations": {