Fully migrate to ICU

This commit is contained in:
Jamie Kyle 2023-03-29 17:03:25 -07:00 committed by GitHub
parent d4e7177ba6
commit 5e647c55d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
274 changed files with 7948 additions and 1944 deletions

View file

@ -56,8 +56,8 @@ export function InstallScreenChoosingDeviceNameStep({
<div className="module-InstallScreenChoosingDeviceNameStep__contents">
<div className="module-InstallScreenChoosingDeviceNameStep__header">
<h1>{i18n('chooseDeviceName')}</h1>
<h2>{i18n('Install__choose-device-name__description')}</h2>
<h1>{i18n('icu:chooseDeviceName')}</h1>
<h2>{i18n('icu:Install__choose-device-name__description')}</h2>
</div>
<div className="module-InstallScreenChoosingDeviceNameStep__inputs">
<input
@ -66,7 +66,7 @@ export function InstallScreenChoosingDeviceNameStep({
onChange={event => {
setDeviceName(event.target.value);
}}
placeholder={i18n('Install__choose-device-name__placeholder')}
placeholder={i18n('icu:Install__choose-device-name__placeholder')}
ref={focusRef}
spellCheck={false}
value={deviceName}
@ -76,7 +76,7 @@ export function InstallScreenChoosingDeviceNameStep({
variant={ButtonVariant.Primary}
type="submit"
>
{i18n('finishLinkingPhone')}
{i18n('icu:finishLinkingPhone')}
</Button>
</div>
</div>

View file

@ -29,27 +29,27 @@ export function InstallScreenErrorStep({
tryAgain: () => unknown;
}>): ReactElement {
let errorMessage: string;
let buttonText = i18n('installTryAgain');
let buttonText = i18n('icu:installTryAgain');
let onClickButton = () => tryAgain();
let shouldShowQuitButton = false;
switch (error) {
case InstallError.TooManyDevices:
errorMessage = i18n('installTooManyDevices');
errorMessage = i18n('icu:installTooManyDevices');
break;
case InstallError.TooOld:
errorMessage = i18n('installTooOld');
buttonText = i18n('upgrade');
errorMessage = i18n('icu:installTooOld');
buttonText = i18n('icu:upgrade');
onClickButton = () => {
openLinkInWebBrowser('https://signal.org/download');
};
shouldShowQuitButton = true;
break;
case InstallError.ConnectionFailed:
errorMessage = i18n('installConnectionFailed');
errorMessage = i18n('icu:installConnectionFailed');
break;
case InstallError.UnknownError:
errorMessage = i18n('installUnknownError');
errorMessage = i18n('icu:installUnknownError');
break;
default:
throw missingCaseError(error);
@ -61,14 +61,14 @@ export function InstallScreenErrorStep({
<InstallScreenSignalLogo />
<h1>{i18n('installErrorHeader')}</h1>
<h1>{i18n('icu:installErrorHeader')}</h1>
<h2>{errorMessage}</h2>
<div className="module-InstallScreenErrorStep__buttons">
<Button onClick={onClickButton}>{buttonText}</Button>
{shouldShowQuitButton && (
<Button onClick={() => quit()} variant={ButtonVariant.Secondary}>
{i18n('quit')}
{i18n('icu:quit')}
</Button>
)}
</div>

View file

@ -20,8 +20,8 @@ export function InstallScreenLinkInProgressStep({
<InstallScreenSignalLogo />
<Spinner size="50px" svgSize="normal" />
<h1>{i18n('initialSync')}</h1>
<h2>{i18n('initialSync__subtitle')}</h2>
<h1>{i18n('icu:initialSync')}</h1>
<h2>{i18n('icu:initialSync__subtitle')}</h2>
</div>
);
}

View file

@ -67,27 +67,27 @@ export function InstallScreenQrCodeNotScannedStep({
<div className="module-InstallScreenQrCodeNotScannedStep__contents">
<InstallScreenQrCode i18n={i18n} {...provisioningUrl} />
<div className="module-InstallScreenQrCodeNotScannedStep__instructions">
<h1>{i18n('Install__scan-this-code')}</h1>
<h1>{i18n('icu:Install__scan-this-code')}</h1>
<ol>
<li>{i18n('Install__instructions__1')}</li>
<li>{i18n('icu:Install__instructions__1')}</li>
<li>
<Intl
i18n={i18n}
id="Install__instructions__2"
id="icu:Install__instructions__2"
components={{
settings: (
<strong>
{i18n('Install__instructions__2__settings')}
{i18n('icu:Install__instructions__2__settings')}
</strong>
),
linkedDevices: <strong>{i18n('linkedDevices')}</strong>,
linkedDevices: <strong>{i18n('icu:linkedDevices')}</strong>,
}}
/>
</li>
<li>
<Intl
i18n={i18n}
id="Install__instructions__3"
id="icu:Install__instructions__3"
components={{
plusButton: (
<div
@ -95,13 +95,13 @@ export function InstallScreenQrCodeNotScannedStep({
aria-label="+"
/>
),
linkNewDevice: <strong>{i18n('linkNewDevice')}</strong>,
linkNewDevice: <strong>{i18n('icu:linkNewDevice')}</strong>,
}}
/>
</li>
</ol>
<a href="https://support.signal.org/hc/articles/360007320451#desktop_multiple_device">
{i18n('Install__support-link')}
{i18n('icu:Install__support-link')}
</a>
</div>
</div>
@ -138,7 +138,7 @@ function InstallScreenQrCode(
case LoadingState.Loaded:
contents = (
<QrCode
alt={i18n('Install__scan-this-code')}
alt={i18n('icu:Install__scan-this-code')}
className={getQrCodeClassName('__code')}
data={props.value}
/>

View file

@ -76,8 +76,10 @@ export function InstallScreenUpdateDialog({
dialogType === DialogType.FullDownloadReady ||
dialogType === DialogType.DownloadedUpdate
) {
let title = i18n('autoUpdateNewVersionTitle');
let actionText: string | JSX.Element = i18n('autoUpdateRestartButtonLabel');
let title = i18n('icu:autoUpdateNewVersionTitle');
let actionText: string | JSX.Element = i18n(
'icu:autoUpdateRestartButtonLabel'
);
let bodyText = i18n('icu:InstallScreenUpdateDialog--auto-update__body');
if (
dialogType === DialogType.DownloadReady ||
@ -156,7 +158,7 @@ export function InstallScreenUpdateDialog({
const url = isBeta(currentVersion)
? BETA_DOWNLOAD_URL
: PRODUCTION_DOWNLOAD_URL;
const title = i18n('cannotUpdate');
const title = i18n('icu:cannotUpdate');
const body = (
<Intl
i18n={i18n}
@ -181,7 +183,7 @@ export function InstallScreenUpdateDialog({
noDefaultCancelButton
actions={[
{
text: i18n('autoUpdateRetry'),
text: i18n('icu:autoUpdateRetry'),
action: startUpdate,
style: 'affirmative',
autoClose: false,
@ -215,7 +217,7 @@ export function InstallScreenUpdateDialog({
modalName={dialogName}
noMouseClose
useFocusTrap={false}
title={i18n('cannotUpdate')}
title={i18n('icu:cannotUpdate')}
>
<Intl
components={{
@ -223,7 +225,7 @@ export function InstallScreenUpdateDialog({
folder: <strong key="folder">/Applications</strong>,
}}
i18n={i18n}
id="readOnlyVolume"
id="icu:readOnlyVolume"
/>
</Modal>
);