From fc93d6f795ca5efeb82b9531e0b7f73b7605056e Mon Sep 17 00:00:00 2001
From: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
Date: Mon, 30 Sep 2024 10:57:09 +0200
Subject: [PATCH] Alerting: Update texts in annotations step (#93977)
* Update texts in annotations step
* add translations
---
.betterer.results | 3 +--
.../unified/components/rule-editor/AnnotationsStep.tsx | 10 ++++++++--
public/locales/en-US/grafana.json | 4 ++++
public/locales/pseudo-LOCALE/grafana.json | 4 ++++
4 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/.betterer.results b/.betterer.results
index b58d8b5712b..98a4edf52b4 100644
--- a/.betterer.results
+++ b/.betterer.results
@@ -1894,8 +1894,7 @@ exports[`better eslint`] = {
],
"public/app/features/alerting/unified/components/rule-editor/AnnotationsStep.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 ", "1"]
],
"public/app/features/alerting/unified/components/rule-editor/CloudAlertPreview.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with ", "0"],
diff --git a/public/app/features/alerting/unified/components/rule-editor/AnnotationsStep.tsx b/public/app/features/alerting/unified/components/rule-editor/AnnotationsStep.tsx
index 12c66c2ca01..31c3d1318d3 100644
--- a/public/app/features/alerting/unified/components/rule-editor/AnnotationsStep.tsx
+++ b/public/app/features/alerting/unified/components/rule-editor/AnnotationsStep.tsx
@@ -6,6 +6,7 @@ import { useToggle } from 'react-use';
import { GrafanaTheme2 } from '@grafana/data';
import { Button, Field, Input, Stack, Text, TextArea, useStyles2 } from '@grafana/ui';
+import { t, Trans } from 'app/core/internationalization';
import { DashboardModel } from '../../../../dashboard/state';
import { RuleFormValues } from '../../types/rule-form';
@@ -92,7 +93,7 @@ const AnnotationsStep = () => {
return (
- Add more context in your notification messages.
+ Add more context to your alert notifications.
{
}
return (
-
+
{fields.map((annotationField, index: number) => {
const isUrl = annotations[index]?.key?.toLocaleLowerCase().endsWith('url');
diff --git a/public/locales/en-US/grafana.json b/public/locales/en-US/grafana.json
index 6db3c417c68..85cfb57b5c4 100644
--- a/public/locales/en-US/grafana.json
+++ b/public/locales/en-US/grafana.json
@@ -56,6 +56,10 @@
"pause": "Pause evaluation"
},
"alerting": {
+ "annotations": {
+ "description": "Add more context to your alert notifications.",
+ "title": "Configure notification message"
+ },
"central-alert-history": {
"details": {
"error": "Error loading rule for this event.",
diff --git a/public/locales/pseudo-LOCALE/grafana.json b/public/locales/pseudo-LOCALE/grafana.json
index 42240ab6b0f..adb604efb29 100644
--- a/public/locales/pseudo-LOCALE/grafana.json
+++ b/public/locales/pseudo-LOCALE/grafana.json
@@ -56,6 +56,10 @@
"pause": "Päūşę ęväľūäŧįőʼn"
},
"alerting": {
+ "annotations": {
+ "description": "Åđđ mőřę čőʼnŧęχŧ ŧő yőūř äľęřŧ ʼnőŧįƒįčäŧįőʼnş.",
+ "title": "Cőʼnƒįģūřę ʼnőŧįƒįčäŧįőʼn męşşäģę"
+ },
"central-alert-history": {
"details": {
"error": "Ēřřőř ľőäđįʼnģ řūľę ƒőř ŧĥįş ęvęʼnŧ.",