diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Pie/transformProps.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Pie/transformProps.ts index aeeec088b05c4..cf40ce7e1be94 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Pie/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Pie/transformProps.ts @@ -316,7 +316,7 @@ export default function transformProps( type: 'text', ...getTotalValuePadding({ chartPadding, donut, width, height }), style: { - text: t(`Total: ${numberFormatter(totalValue)}`), + text: t('Total: %s', numberFormatter(totalValue)), fontSize: 16, fontWeight: 'bold', }, diff --git a/superset-frontend/src/dashboard/actions/dashboardLayout.js b/superset-frontend/src/dashboard/actions/dashboardLayout.js index 209db9a39e393..3d0f5eabcfb1d 100644 --- a/superset-frontend/src/dashboard/actions/dashboardLayout.js +++ b/superset-frontend/src/dashboard/actions/dashboardLayout.js @@ -212,7 +212,7 @@ export function handleComponentDrop(dropResult) { destination.id !== rootChildId ) { return dispatch( - addWarningToast(t(`Can not move top level tab into nested tabs`)), + addWarningToast(t('Can not move top level tab into nested tabs')), ); } else if ( destination && diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/Footer/Footer.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/Footer/Footer.tsx index 4c2f774a62758..aed85af3a2500 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/Footer/Footer.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/Footer/Footer.tsx @@ -46,7 +46,7 @@ const Footer: FC = ({ onConfirm={onConfirmCancel} onDismiss={onDismiss} > - {t(`Are you sure you want to cancel?`)} + {t('Are you sure you want to cancel?')} ); } diff --git a/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx b/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx index fb37f47c69b06..48b9c2d5c7847 100644 --- a/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx +++ b/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx @@ -557,7 +557,7 @@ const AlertReportModal: FunctionComponent = ({ return; } - addSuccessToast(t(`${data.type} updated`)); + addSuccessToast(t('%s updated', data.type)); if (onAdd) { onAdd(); @@ -573,7 +573,7 @@ const AlertReportModal: FunctionComponent = ({ return; } - addSuccessToast(t(`${data.type} updated`)); + addSuccessToast(t('%s updated', data.type)); if (onAdd) { onAdd(response); diff --git a/superset-frontend/src/views/CRUD/annotation/AnnotationList.tsx b/superset-frontend/src/views/CRUD/annotation/AnnotationList.tsx index 2096775e9f84f..aa018418802b1 100644 --- a/superset-frontend/src/views/CRUD/annotation/AnnotationList.tsx +++ b/superset-frontend/src/views/CRUD/annotation/AnnotationList.tsx @@ -264,7 +264,7 @@ function AnnotationList({ - {t(`Annotation Layer ${annotationLayerName}`)} + {t('Annotation Layer %s', annotationLayerName)} {hasHistory ? ( Back to all diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx index 583b540579e99..dee6f4dd3f9dc 100644 --- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx +++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx @@ -1035,7 +1035,7 @@ const DatabaseModal: FunctionComponent = ({ } validationMethods={{ onBlur: () => {} }} errorMessage={validationErrors?.password_needed} - label={t(`${database.slice(10)} PASSWORD`)} + label={t('%s PASSWORD', database.slice(10))} css={formScrollableStyles} /> diff --git a/superset-frontend/src/views/CRUD/welcome/EmptyState.tsx b/superset-frontend/src/views/CRUD/welcome/EmptyState.tsx index a86062568d9a8..4209188e79e27 100644 --- a/superset-frontend/src/views/CRUD/welcome/EmptyState.tsx +++ b/superset-frontend/src/views/CRUD/welcome/EmptyState.tsx @@ -123,11 +123,10 @@ export default function EmptyState({ tableName, tab }: EmptyStateProps) { {tableName === 'SAVED_QUERIES' ? t('SQL query') - : t(`${tableName + : tableName .split('') .slice(0, tableName.length - 1) .join('')} - `)} )}