Alerting: Fix wrong interpolation in translation (#103514)

fix wrong interpolation in transalation
This commit is contained in:
Sonia Aguilar
2025-04-07 13:41:04 +03:00
committed by GitHub
parent cf5da1d366
commit a05b35a13c
2 changed files with 5 additions and 7 deletions
@@ -1,5 +1,4 @@
import { css } from '@emotion/css'; import { css } from '@emotion/css';
import pluralize from 'pluralize';
import { useMemo } from 'react'; import { useMemo } from 'react';
import { useLocation } from 'react-router-dom-v5-compat'; import { useLocation } from 'react-router-dom-v5-compat';
@@ -68,11 +67,9 @@ export const CloudRules = ({ namespaces, expandAll }: Props) => {
{dataSourcesLoading.length ? ( {dataSourcesLoading.length ? (
<LoadingPlaceholder <LoadingPlaceholder
className={styles.loader} className={styles.loader}
text={t( text={t('alerting.list-view.section.loading-rules', 'Loading rules from {{count}} sources', {
'alerting.list-view.section.loading-rules', count: dataSourcesLoading.length,
'Loading rules from {{numberOfSources}} {{sources}}', })}
{ numberOfSource: dataSourcesLoading.length, sources: pluralize('source', dataSourcesLoading.length) }
)}
/> />
) : ( ) : (
<div /> <div />
+2 -1
View File
@@ -1165,7 +1165,8 @@
"new-recording-rule": "New recording rule", "new-recording-rule": "New recording rule",
"title": "Grafana-managed" "title": "Grafana-managed"
}, },
"loading-rules": "Loading rules from {{numberOfSources}} {{sources}}" "loading-rules_one": "Loading rules from {{count}} source",
"loading-rules_other": "Loading rules from {{count}} sources"
} }
}, },
"log-record-viewer-by-timestamp": { "log-record-viewer-by-timestamp": {