chore: clean up dynamic translation strings (#19641)

This commit is contained in:
Ville Brofeldt 2022-04-11 13:02:20 +03:00 committed by GitHub
parent a6bf041edd
commit f21ba68a30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 8 additions and 9 deletions

View File

@ -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',
},

View File

@ -210,7 +210,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 &&

View File

@ -46,7 +46,7 @@ const Footer: FC<FooterProps> = ({
onConfirm={onConfirmCancel}
onDismiss={onDismiss}
>
{t(`Are you sure you want to cancel?`)}
{t('Are you sure you want to cancel?')}
</CancelConfirmationAlert>
);
}

View File

@ -557,7 +557,7 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
return;
}
addSuccessToast(t(`${data.type} updated`));
addSuccessToast(t('%s updated', data.type));
if (onAdd) {
onAdd();
@ -573,7 +573,7 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
return;
}
addSuccessToast(t(`${data.type} updated`));
addSuccessToast(t('%s updated', data.type));
if (onAdd) {
onAdd(response);

View File

@ -262,7 +262,7 @@ function AnnotationList({
<SubMenu
name={
<StyledHeader>
<span>{t(`Annotation Layer ${annotationLayerName}`)}</span>
<span>{t('Annotation Layer %s', annotationLayerName)}</span>
<span>
{hasHistory ? (
<Link to="/annotationlayermodelview/list/">Back to all</Link>

View File

@ -1035,7 +1035,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
}
validationMethods={{ onBlur: () => {} }}
errorMessage={validationErrors?.password_needed}
label={t(`${database.slice(10)} PASSWORD`)}
label={t('%s PASSWORD', database.slice(10))}
css={formScrollableStyles}
/>
</>

View File

@ -122,11 +122,10 @@ export default function EmptyState({ tableName, tab }: EmptyStateProps) {
<i className="fa fa-plus" />
{tableName === 'SAVED_QUERIES'
? t('SQL query')
: t(`${tableName
: tableName
.split('')
.slice(0, tableName.length - 1)
.join('')}
`)}
</Button>
</ButtonContainer>
)}