Skip to content
Snippets Groups Projects
Unverified Commit e63cf28f authored by Tasso Evangelista's avatar Tasso Evangelista Committed by GitHub
Browse files

regression: Broken translation in `UrlChangeModal` at setup wizard (#33415)

parent 7cddedea
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,8 @@ type UrlChangeModalProps = {
};
const UrlChangeModal = ({ onConfirm, siteUrl, currentUrl, onClose }: UrlChangeModalProps): ReactElement => {
const { t } = useTranslation();
const { t } = useTranslation('core');
return (
<GenericModal variant='warning' title={t('Warning')} onConfirm={onConfirm} onClose={onClose} onCancel={onClose} confirmText={t('Yes')}>
<Box
......@@ -26,7 +27,14 @@ const UrlChangeModal = ({ onConfirm, siteUrl, currentUrl, onClose }: UrlChangeMo
}),
}}
/>
<p dangerouslySetInnerHTML={{ __html: t('Do_you_want_to_change_to_s_question', currentUrl) }} />
<p
dangerouslySetInnerHTML={{
__html: t('Do_you_want_to_change_to_s_question', {
postProcess: 'sprintf',
sprintf: [currentUrl],
}),
}}
/>
</GenericModal>
);
};
......
......@@ -23,6 +23,7 @@ export const SetupWizardRoute = (): ReactElement | null => {
}
return (
// FIXME: setting the defaultNS here is problematic for components/hooks expecting it to be 'core'
<I18nextProvider i18n={i18n} defaultNS='onboarding'>
<SetupWizardProvider>
<DarkModeProvider.default>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment