Allow retry when cannot update
This commit is contained in:
parent
909453b20b
commit
4de30786ec
|
@ -1042,12 +1042,20 @@
|
||||||
"description": "Shown in a button when a conversation is unmuted and can be muted"
|
"description": "Shown in a button when a conversation is unmuted and can be muted"
|
||||||
},
|
},
|
||||||
"cannotUpdateDetail": {
|
"cannotUpdateDetail": {
|
||||||
"message": "Signal Desktop failed to update, but there is a new version available. Please go to $url$ and install the new version manually, then either contact support or file a bug about this problem.",
|
"message": "Signal couldn't update. $retry$ or visit $url$ to install it manually. Then, $support$ about this problem",
|
||||||
"description": "Shown if a general error happened while trying to install update package",
|
"description": "Shown if a general error happened while trying to install update package",
|
||||||
"placeholders": {
|
"placeholders": {
|
||||||
|
"retry": {
|
||||||
|
"content": "$2",
|
||||||
|
"example": "retry update"
|
||||||
|
},
|
||||||
"url": {
|
"url": {
|
||||||
"content": "$1",
|
"content": "$2",
|
||||||
"example": "https://signal.org/download"
|
"example": "https://signal.org/download"
|
||||||
|
},
|
||||||
|
"support": {
|
||||||
|
"content": "$3",
|
||||||
|
"example": "contact support"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -2457,6 +2465,12 @@
|
||||||
"autoUpdateNewVersionTitle": {
|
"autoUpdateNewVersionTitle": {
|
||||||
"message": "Update available"
|
"message": "Update available"
|
||||||
},
|
},
|
||||||
|
"autoUpdateRetry": {
|
||||||
|
"message": "Retry update"
|
||||||
|
},
|
||||||
|
"autoUpdateContactSupport": {
|
||||||
|
"message": "contact support"
|
||||||
|
},
|
||||||
"autoUpdateNewVersionMessage": {
|
"autoUpdateNewVersionMessage": {
|
||||||
"message": "Click to restart Signal"
|
"message": "Click to restart Signal"
|
||||||
},
|
},
|
||||||
|
|
|
@ -32,6 +32,11 @@
|
||||||
padding-left: 36px;
|
padding-left: 36px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__retry {
|
||||||
|
@include button-reset;
|
||||||
|
@include font-body-1-bold;
|
||||||
|
}
|
||||||
|
|
||||||
&--clickable {
|
&--clickable {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,13 +12,8 @@ describe('i18n', () => {
|
||||||
assert.equal(i18n('reportIssue'), ['Contact Support']);
|
assert.equal(i18n('reportIssue'), ['Contact Support']);
|
||||||
});
|
});
|
||||||
it('returns message with single substitution', () => {
|
it('returns message with single substitution', () => {
|
||||||
const actual = i18n('cannotUpdateDetail', [
|
const actual = i18n('migratingToSQLCipher', ['45/200']);
|
||||||
'https://signal.org/download',
|
assert.equal(actual, 'Optimizing messages... 45/200 complete.');
|
||||||
]);
|
|
||||||
assert.equal(
|
|
||||||
actual,
|
|
||||||
'Signal Desktop failed to update, but there is a new version available. Please go to https://signal.org/download and install the new version manually, then either contact support or file a bug about this problem.'
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
it('returns message with multiple substitutions', () => {
|
it('returns message with multiple substitutions', () => {
|
||||||
const actual = i18n('theyChangedTheTimer', {
|
const actual = i18n('theyChangedTheTimer', {
|
||||||
|
|
|
@ -68,16 +68,38 @@ export const DialogUpdate = ({
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
<Intl
|
<Intl
|
||||||
components={[
|
components={{
|
||||||
<a
|
retry: (
|
||||||
key="signal-download"
|
<button
|
||||||
href={url}
|
className="LeftPaneDialog__retry"
|
||||||
rel="noreferrer"
|
key="signal-retry"
|
||||||
target="_blank"
|
onClick={startUpdate}
|
||||||
>
|
type="button"
|
||||||
{url}
|
>
|
||||||
</a>,
|
{i18n('autoUpdateRetry')}
|
||||||
]}
|
</button>
|
||||||
|
),
|
||||||
|
url: (
|
||||||
|
<a
|
||||||
|
key="signal-download"
|
||||||
|
href={url}
|
||||||
|
rel="noreferrer"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
{url}
|
||||||
|
</a>
|
||||||
|
),
|
||||||
|
support: (
|
||||||
|
<a
|
||||||
|
key="signal-support"
|
||||||
|
href="https://support.signal.org/hc/en-us/requests/new?desktop"
|
||||||
|
rel="noreferrer"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
{i18n('autoUpdateContactSupport')}
|
||||||
|
</a>
|
||||||
|
),
|
||||||
|
}}
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
id="cannotUpdateDetail"
|
id="cannotUpdateDetail"
|
||||||
/>
|
/>
|
||||||
|
@ -89,12 +111,12 @@ export const DialogUpdate = ({
|
||||||
if (dialogType === DialogType.MacOS_Read_Only) {
|
if (dialogType === DialogType.MacOS_Read_Only) {
|
||||||
return (
|
return (
|
||||||
<LeftPaneDialog
|
<LeftPaneDialog
|
||||||
containerWidthBreakpoint={containerWidthBreakpoint}
|
|
||||||
type="warning"
|
|
||||||
title={i18n('cannotUpdate')}
|
|
||||||
hasXButton
|
|
||||||
closeLabel={i18n('close')}
|
closeLabel={i18n('close')}
|
||||||
|
containerWidthBreakpoint={containerWidthBreakpoint}
|
||||||
|
hasXButton
|
||||||
onClose={dismissDialog}
|
onClose={dismissDialog}
|
||||||
|
title={i18n('cannotUpdate')}
|
||||||
|
type="warning"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
<Intl
|
<Intl
|
||||||
|
|
Loading…
Reference in New Issue