diff --git a/public/app/core/internationalization/index.tsx b/public/app/core/internationalization/index.tsx index 895d7c58627..2d31fc1d708 100644 --- a/public/app/core/internationalization/index.tsx +++ b/public/app/core/internationalization/index.tsx @@ -1,5 +1,6 @@ import i18n, { InitOptions, TFunction } from 'i18next'; import LanguageDetector, { DetectorOptions } from 'i18next-browser-languagedetector'; +import { ReactElement } from 'react'; import { Trans as I18NextTrans, initReactI18next } from 'react-i18next'; // eslint-disable-line no-restricted-imports import { DEFAULT_LANGUAGE, NAMESPACES, VALID_LANGUAGES } from './constants'; @@ -56,7 +57,14 @@ export function changeLanguage(locale: string) { return i18n.changeLanguage(validLocale); } -export const Trans: typeof I18NextTrans = (props) => { +type I18NextTransType = typeof I18NextTrans; +type I18NextTransProps = Parameters[0]; + +interface TransProps extends I18NextTransProps { + i18nKey: string; +} + +export const Trans = (props: TransProps): ReactElement => { return ; }; diff --git a/public/app/features/alerting/unified/components/Provisioning.tsx b/public/app/features/alerting/unified/components/Provisioning.tsx index dd004ce64bf..33f4d866a9d 100644 --- a/public/app/features/alerting/unified/components/Provisioning.tsx +++ b/public/app/features/alerting/unified/components/Provisioning.tsx @@ -41,7 +41,7 @@ export const ProvisioningBadge = ({ if (tooltip) { const provenanceTooltip = ( - + This resource has been provisioned via {{ provenance }} and cannot be edited through the UI ); diff --git a/public/app/features/alerting/unified/components/rule-editor/GrafanaEvaluationBehavior.tsx b/public/app/features/alerting/unified/components/rule-editor/GrafanaEvaluationBehavior.tsx index 35ad15987c1..5d091aa083d 100644 --- a/public/app/features/alerting/unified/components/rule-editor/GrafanaEvaluationBehavior.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/GrafanaEvaluationBehavior.tsx @@ -146,7 +146,7 @@ function FolderGroupAndEvaluationInterval({ {getValues('group') && getValues('evaluateEvery') && ( - + All rules in the selected group are evaluated every {{ evaluateEvery }}. {!isNewGroup && ( diff --git a/public/app/features/dashboard-scene/panel-edit/PanelDataPane/EmptyTransformationsMessage.tsx b/public/app/features/dashboard-scene/panel-edit/PanelDataPane/EmptyTransformationsMessage.tsx index 136e8f17426..d2f6d537559 100644 --- a/public/app/features/dashboard-scene/panel-edit/PanelDataPane/EmptyTransformationsMessage.tsx +++ b/public/app/features/dashboard-scene/panel-edit/PanelDataPane/EmptyTransformationsMessage.tsx @@ -10,10 +10,10 @@ export function EmptyTransformationsMessage(props: EmptyTransformationsProps) { - Start transforming data + Start transforming data - + Transformations allow data to be changed in various ways before your visualization is shown.
This includes joining data together, renaming fields, making calculations, formatting data for display, and diff --git a/public/app/features/trails/ActionTabs/MetricOverviewScene.tsx b/public/app/features/trails/ActionTabs/MetricOverviewScene.tsx index 7e1b9c141ce..b7894ca6d86 100644 --- a/public/app/features/trails/ActionTabs/MetricOverviewScene.tsx +++ b/public/app/features/trails/ActionTabs/MetricOverviewScene.tsx @@ -78,45 +78,39 @@ export class MetricOverviewScene extends SceneObjectBase - Description + Description
{metadata?.help ? (
{metadata?.help}
) : ( - No description available + No description available )}
- Type + Type {metadata?.type ? (
{metadata?.type}
) : ( - Unknown + Unknown )}
- Unit + Unit - {metadata?.unit ? ( -
{metadata?.unit}
- ) : ( - - {unit} - - )} + {metadata?.unit ?
{metadata?.unit}
: {unit}}
- Labels + Labels {labelOptions.length === 0 && 'Unable to fetch labels.'} {labelOptions.map((l) => ( diff --git a/public/locales/en-US/grafana.json b/public/locales/en-US/grafana.json index 10df4dd789a..d1f35a9be67 100644 --- a/public/locales/en-US/grafana.json +++ b/public/locales/en-US/grafana.json @@ -1,6 +1,5 @@ { "_comment": "The code is the source of truth for English phrases. They should be updated in the components directly, and additional plurals specified in this file.", - "{unit}": "{unit}", "access-control": { "add-permission": { "role-label": "Role", @@ -669,7 +668,6 @@ "message": "No data sources found" } }, - "Description": "Description", "explore": { "add-to-dashboard": "Add to dashboard", "add-to-library-modal": { @@ -940,7 +938,6 @@ "refresh": "Refresh" } }, - "Labels": "Labels", "library-panel": { "add-modal": { "cancel": "Cancel", @@ -1541,7 +1538,6 @@ }, "title": "Latest from the blog" }, - "No description available": "No description available", "notifications": { "empty-state": { "description": "Notifications you have received will appear here", @@ -2233,15 +2229,22 @@ "select-search-input": "Type to search (country, city, abbreviation)" } }, + "trails": { + "metric-overview": { + "description-label": "Description", + "labels-label": "Labels", + "no-description": "No description available", + "type-label": "Type", + "unit-label": "Unit", + "unknown-type": "Unknown" + } + }, "transformations": { "empty": { "add-transformation-body": "Transformations allow data to be changed in various ways before your visualization is shown.<1>This includes joining data together, renaming fields, making calculations, formatting data for display, and more.", "add-transformation-header": "Start transforming data" } }, - "Type": "Type", - "Unit": "Unit", - "Unknown": "Unknown", "user-orgs": { "current-org-button": "Current", "name-column": "Name", diff --git a/public/locales/pseudo-LOCALE/grafana.json b/public/locales/pseudo-LOCALE/grafana.json index c067310672a..0ca6f638913 100644 --- a/public/locales/pseudo-LOCALE/grafana.json +++ b/public/locales/pseudo-LOCALE/grafana.json @@ -1,6 +1,5 @@ { "_comment": "Ŧĥę čőđę įş ŧĥę şőūřčę őƒ ŧřūŧĥ ƒőř Ēʼnģľįşĥ pĥřäşęş. Ŧĥęy şĥőūľđ þę ūpđäŧęđ įʼn ŧĥę čőmpőʼnęʼnŧş đįřęčŧľy, äʼnđ äđđįŧįőʼnäľ pľūřäľş şpęčįƒįęđ įʼn ŧĥįş ƒįľę.", - "{unit}": "{ūʼnįŧ}", "access-control": { "add-permission": { "role-label": "Ŗőľę", @@ -669,7 +668,6 @@ "message": "Ńő đäŧä şőūřčęş ƒőūʼnđ" } }, - "Description": "Đęşčřįpŧįőʼn", "explore": { "add-to-dashboard": "Åđđ ŧő đäşĥþőäřđ", "add-to-library-modal": { @@ -940,7 +938,6 @@ "refresh": "Ŗęƒřęşĥ" } }, - "Labels": "Ŀäþęľş", "library-panel": { "add-modal": { "cancel": "Cäʼnčęľ", @@ -1541,7 +1538,6 @@ }, "title": "Ŀäŧęşŧ ƒřőm ŧĥę þľőģ" }, - "No description available": "Ńő đęşčřįpŧįőʼn äväįľäþľę", "notifications": { "empty-state": { "description": "Ńőŧįƒįčäŧįőʼnş yőū ĥävę řęčęįvęđ ŵįľľ äppęäř ĥęřę", @@ -2233,15 +2229,22 @@ "select-search-input": "Ŧypę ŧő şęäřčĥ (čőūʼnŧřy, čįŧy, äþþřęvįäŧįőʼn)" } }, + "trails": { + "metric-overview": { + "description-label": "Đęşčřįpŧįőʼn", + "labels-label": "Ŀäþęľş", + "no-description": "Ńő đęşčřįpŧįőʼn äväįľäþľę", + "type-label": "Ŧypę", + "unit-label": "Ůʼnįŧ", + "unknown-type": "Ůʼnĸʼnőŵʼn" + } + }, "transformations": { "empty": { "add-transformation-body": "Ŧřäʼnşƒőřmäŧįőʼnş äľľőŵ đäŧä ŧő þę čĥäʼnģęđ įʼn väřįőūş ŵäyş þęƒőřę yőūř vįşūäľįžäŧįőʼn įş şĥőŵʼn.<1>Ŧĥįş įʼnčľūđęş ĵőįʼnįʼnģ đäŧä ŧőģęŧĥęř, řęʼnämįʼnģ ƒįęľđş, mäĸįʼnģ čäľčūľäŧįőʼnş, ƒőřmäŧŧįʼnģ đäŧä ƒőř đįşpľäy, äʼnđ mőřę.", "add-transformation-header": "Ŝŧäřŧ ŧřäʼnşƒőřmįʼnģ đäŧä" } }, - "Type": "Ŧypę", - "Unit": "Ůʼnįŧ", - "Unknown": "Ůʼnĸʼnőŵʼn", "user-orgs": { "current-org-button": "Cūřřęʼnŧ", "name-column": "Ńämę",