diff --git a/public/app/features/correlations/CorrelationsFeatureToggle.tsx b/public/app/features/correlations/CorrelationsFeatureToggle.tsx index a2cc7e5ec91..8f4631a3243 100644 --- a/public/app/features/correlations/CorrelationsFeatureToggle.tsx +++ b/public/app/features/correlations/CorrelationsFeatureToggle.tsx @@ -1,13 +1,16 @@ import React from 'react'; import { Page } from 'app/core/components/Page/Page'; +import { Trans } from 'app/core/internationalization'; export default function FeatureTogglePage() { return ( -

Correlations are disabled

- To enable Correlations, add it in the Grafana config: +

+ Correlations are disabled +

+ To enable Correlations, add it in the Grafana config:
             {`[feature_toggles]
diff --git a/public/app/features/correlations/CorrelationsPage.tsx b/public/app/features/correlations/CorrelationsPage.tsx
index ef31dbeff16..0fa75853cf6 100644
--- a/public/app/features/correlations/CorrelationsPage.tsx
+++ b/public/app/features/correlations/CorrelationsPage.tsx
@@ -21,6 +21,7 @@ import {
 import { Page } from 'app/core/components/Page/Page';
 import { contextSrv } from 'app/core/core';
 import { useNavModel } from 'app/core/hooks/useNavModel';
+import { Trans, t } from 'app/core/internationalization';
 import { AccessControlAction } from 'app/types';
 
 import { AddCorrelationForm } from './Forms/AddCorrelationForm';
@@ -100,7 +101,7 @@ export default function CorrelationsPage() {
       return (
         !provisioned && (
           
               handleDelete({ sourceUID, uid }, page.current > 1 && index === 0 && data?.correlations.length === 1)
             }
@@ -123,17 +124,17 @@ export default function CorrelationsPage() {
       },
       {
         id: 'source',
-        header: 'Source',
+        header: t('correlations.list.source', 'Source'),
         cell: DataSourceCell,
         sortType: sortDatasource,
       },
       {
         id: 'target',
-        header: 'Target',
+        header: t('correlations.list.target', 'Target'),
         cell: DataSourceCell,
         sortType: sortDatasource,
       },
-      { id: 'label', header: 'Label', sortType: 'alphanumeric' },
+      { id: 'label', header: t('correlations.list.label', 'Label'), sortType: 'alphanumeric' },
       {
         id: 'actions',
         cell: RowActions,
@@ -148,7 +149,7 @@ export default function CorrelationsPage() {
   const showEmptyListCTA = data?.correlations.length === 0 && !isAdding && !get.error;
   const addButton = canWriteCorrelations && data?.correlations?.length !== 0 && data !== undefined && !isAdding && (
     
   );
 
@@ -157,10 +158,17 @@ export default function CorrelationsPage() {
       navModel={navModel}
       subTitle={
         <>
-          Define how data living in different data sources relates to each other. Read more in the{' '}
-          
-            documentation 
-          
+          
+            Define how data living in different data sources relates to each other. Read more in the{' '}
+            
+              documentation
+              
+            
+          
         
       }
       actions={addButton}
@@ -169,7 +177,7 @@ export default function CorrelationsPage() {
         
{!data && get.loading && (
- +
)} @@ -180,9 +188,16 @@ export default function CorrelationsPage() { { // This error is not actionable, it'd be nice to have a recovery button get.error && ( - + {(isFetchError(get.error) && get.error.data?.message) || - 'An unknown error occurred while fetching correlation data. Please try again.'} + t( + 'correlations.alert.error-message', + 'An unknown error occurred while fetching correlation data. Please try again.' + )} ) } @@ -279,7 +294,7 @@ const InfoCell = memo( const readOnly = props.row.original.provisioned; if (readOnly) { - return ; + return ; } else { return null; } diff --git a/public/locales/de-DE/grafana.json b/public/locales/de-DE/grafana.json index 7b129ff43b8..610a5ecbb6e 100644 --- a/public/locales/de-DE/grafana.json +++ b/public/locales/de-DE/grafana.json @@ -126,6 +126,24 @@ "placeholder": "" } }, + "correlations": { + "add-new": "", + "alert": { + "error-message": "", + "title": "" + }, + "list": { + "delete": "", + "label": "", + "loading": "", + "read-only": "", + "source": "", + "target": "" + }, + "page-content": "", + "page-heading": "", + "sub-title": "" + }, "dashboard": { "add-menu": { "import": "Aus Bibliothek importieren", diff --git a/public/locales/en-US/grafana.json b/public/locales/en-US/grafana.json index 5bfb73ca21f..a4ffe8df640 100644 --- a/public/locales/en-US/grafana.json +++ b/public/locales/en-US/grafana.json @@ -126,6 +126,24 @@ "placeholder": "Search all" } }, + "correlations": { + "add-new": "Add new", + "alert": { + "error-message": "An unknown error occurred while fetching correlation data. Please try again.", + "title": "Error fetching correlation data" + }, + "list": { + "delete": "delete correlation", + "label": "Label", + "loading": "loading...", + "read-only": "Read only", + "source": "Source", + "target": "Target" + }, + "page-content": "To enable Correlations, add it in the Grafana config:", + "page-heading": "Correlations are disabled", + "sub-title": "Define how data living in different data sources relates to each other. Read more in the <2>documentation<1>" + }, "dashboard": { "add-menu": { "import": "Import from library", diff --git a/public/locales/es-ES/grafana.json b/public/locales/es-ES/grafana.json index b40c19bc8ae..1e27bb2efa1 100644 --- a/public/locales/es-ES/grafana.json +++ b/public/locales/es-ES/grafana.json @@ -131,6 +131,24 @@ "placeholder": "" } }, + "correlations": { + "add-new": "", + "alert": { + "error-message": "", + "title": "" + }, + "list": { + "delete": "", + "label": "", + "loading": "", + "read-only": "", + "source": "", + "target": "" + }, + "page-content": "", + "page-heading": "", + "sub-title": "" + }, "dashboard": { "add-menu": { "import": "Importar de la biblioteca", diff --git a/public/locales/fr-FR/grafana.json b/public/locales/fr-FR/grafana.json index 5da4289a1df..c20bebaf745 100644 --- a/public/locales/fr-FR/grafana.json +++ b/public/locales/fr-FR/grafana.json @@ -131,6 +131,24 @@ "placeholder": "" } }, + "correlations": { + "add-new": "", + "alert": { + "error-message": "", + "title": "" + }, + "list": { + "delete": "", + "label": "", + "loading": "", + "read-only": "", + "source": "", + "target": "" + }, + "page-content": "", + "page-heading": "", + "sub-title": "" + }, "dashboard": { "add-menu": { "import": "Importer depuis la bibliothèque", diff --git a/public/locales/pseudo-LOCALE/grafana.json b/public/locales/pseudo-LOCALE/grafana.json index 5d7d813ef9f..ec889d5d3df 100644 --- a/public/locales/pseudo-LOCALE/grafana.json +++ b/public/locales/pseudo-LOCALE/grafana.json @@ -126,6 +126,24 @@ "placeholder": "Ŝęäřčĥ äľľ" } }, + "correlations": { + "add-new": "Åđđ ʼnęŵ", + "alert": { + "error-message": "Åʼn ūʼnĸʼnőŵʼn ęřřőř őččūřřęđ ŵĥįľę ƒęŧčĥįʼnģ čőřřęľäŧįőʼn đäŧä. Pľęäşę ŧřy äģäįʼn.", + "title": "Ēřřőř ƒęŧčĥįʼnģ čőřřęľäŧįőʼn đäŧä" + }, + "list": { + "delete": "đęľęŧę čőřřęľäŧįőʼn", + "label": "Ŀäþęľ", + "loading": "ľőäđįʼnģ...", + "read-only": "Ŗęäđ őʼnľy", + "source": "Ŝőūřčę", + "target": "Ŧäřģęŧ" + }, + "page-content": "Ŧő ęʼnäþľę Cőřřęľäŧįőʼnş, äđđ įŧ įʼn ŧĥę Ğřäƒäʼnä čőʼnƒįģ:", + "page-heading": "Cőřřęľäŧįőʼnş äřę đįşäþľęđ", + "sub-title": "Đęƒįʼnę ĥőŵ đäŧä ľįvįʼnģ įʼn đįƒƒęřęʼnŧ đäŧä şőūřčęş řęľäŧęş ŧő ęäčĥ őŧĥęř. Ŗęäđ mőřę įʼn ŧĥę <2>đőčūmęʼnŧäŧįőʼn<1>" + }, "dashboard": { "add-menu": { "import": "Ĩmpőřŧ ƒřőm ľįþřäřy", diff --git a/public/locales/zh-Hans/grafana.json b/public/locales/zh-Hans/grafana.json index 0396e9de860..d1e6954c488 100644 --- a/public/locales/zh-Hans/grafana.json +++ b/public/locales/zh-Hans/grafana.json @@ -121,6 +121,24 @@ "placeholder": "" } }, + "correlations": { + "add-new": "", + "alert": { + "error-message": "", + "title": "" + }, + "list": { + "delete": "", + "label": "", + "loading": "", + "read-only": "", + "source": "", + "target": "" + }, + "page-content": "", + "page-heading": "", + "sub-title": "" + }, "dashboard": { "add-menu": { "import": "从库导入",