Make ICU types stricter for inline JSX

This commit is contained in:
Jamie Kyle
2024-05-15 14:48:02 -07:00
committed by GitHub
parent 9e7a6ea8bc
commit 6655bfc576
52 changed files with 220 additions and 200 deletions

View File

@@ -10,7 +10,7 @@ import { missingCaseError } from '../../util/missingCaseError';
import type { Loadable } from '../../util/loadable';
import { LoadingState } from '../../util/loadable';
import { Intl } from '../Intl';
import { I18n } from '../I18n';
import { Spinner } from '../Spinner';
import { QrCode } from '../QrCode';
import { TitlebarDragArea } from '../TitlebarDragArea';
@@ -75,7 +75,7 @@ export function InstallScreenQrCodeNotScannedStep({
<ol>
<li>{i18n('icu:Install__instructions__1')}</li>
<li>
<Intl
<I18n
i18n={i18n}
id="icu:Install__instructions__2"
components={{
@@ -89,7 +89,7 @@ export function InstallScreenQrCodeNotScannedStep({
/>
</li>
<li>
<Intl
<I18n
i18n={i18n}
id="icu:Install__instructions__3"
components={{
@@ -130,7 +130,7 @@ function InstallScreenQrCode(
case LoadingState.LoadFailed:
contents = (
<span className={classNames(getQrCodeClassName('__error-message'))}>
<Intl
<I18n
i18n={i18n}
id="icu:Install__qr-failed-load"
components={{

View File

@@ -15,7 +15,7 @@ import type { UpdatesStateType } from '../../state/ducks/updates';
import { isBeta } from '../../util/version';
import { ConfirmationDialog } from '../ConfirmationDialog';
import { Modal } from '../Modal';
import { Intl } from '../Intl';
import { I18n } from '../I18n';
import { formatFileSize } from '../../util/formatFileSize';
export type PropsType = UpdatesStateType &
@@ -56,7 +56,7 @@ export function InstallScreenUpdateDialog({
noMouseClose
title={i18n('icu:InstallScreenUpdateDialog--unsupported-os__title')}
>
<Intl
<I18n
id="icu:UnsupportedOSErrorDialog__body"
i18n={i18n}
components={{
@@ -85,7 +85,7 @@ export function InstallScreenUpdateDialog({
dialogType === DialogType.FullDownloadReady
) {
actionText = (
<Intl
<I18n
id="icu:InstallScreenUpdateDialog--manual-update__action"
i18n={i18n}
components={{
@@ -159,7 +159,7 @@ export function InstallScreenUpdateDialog({
: PRODUCTION_DOWNLOAD_URL;
const title = i18n('icu:cannotUpdate');
const body = (
<Intl
<I18n
i18n={i18n}
id="icu:InstallScreenUpdateDialog--cannot-update__body"
components={{
@@ -218,7 +218,7 @@ export function InstallScreenUpdateDialog({
useFocusTrap={false}
title={i18n('icu:cannotUpdate')}
>
<Intl
<I18n
components={{
app: <strong key="app">Signal.app</strong>,
folder: <strong key="folder">/Applications</strong>,