Allow retry when cannot update
This commit is contained in:
parent
909453b20b
commit
4de30786ec
4 changed files with 59 additions and 23 deletions
|
@ -1042,12 +1042,20 @@
|
|||
"description": "Shown in a button when a conversation is unmuted and can be muted"
|
||||
},
|
||||
"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",
|
||||
"placeholders": {
|
||||
"retry": {
|
||||
"content": "$2",
|
||||
"example": "retry update"
|
||||
},
|
||||
"url": {
|
||||
"content": "$1",
|
||||
"content": "$2",
|
||||
"example": "https://signal.org/download"
|
||||
},
|
||||
"support": {
|
||||
"content": "$3",
|
||||
"example": "contact support"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2457,6 +2465,12 @@
|
|||
"autoUpdateNewVersionTitle": {
|
||||
"message": "Update available"
|
||||
},
|
||||
"autoUpdateRetry": {
|
||||
"message": "Retry update"
|
||||
},
|
||||
"autoUpdateContactSupport": {
|
||||
"message": "contact support"
|
||||
},
|
||||
"autoUpdateNewVersionMessage": {
|
||||
"message": "Click to restart Signal"
|
||||
},
|
||||
|
|
|
@ -32,6 +32,11 @@
|
|||
padding-left: 36px;
|
||||
}
|
||||
|
||||
&__retry {
|
||||
@include button-reset;
|
||||
@include font-body-1-bold;
|
||||
}
|
||||
|
||||
&--clickable {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
|
|
@ -12,13 +12,8 @@ describe('i18n', () => {
|
|||
assert.equal(i18n('reportIssue'), ['Contact Support']);
|
||||
});
|
||||
it('returns message with single substitution', () => {
|
||||
const actual = i18n('cannotUpdateDetail', [
|
||||
'https://signal.org/download',
|
||||
]);
|
||||
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.'
|
||||
);
|
||||
const actual = i18n('migratingToSQLCipher', ['45/200']);
|
||||
assert.equal(actual, 'Optimizing messages... 45/200 complete.');
|
||||
});
|
||||
it('returns message with multiple substitutions', () => {
|
||||
const actual = i18n('theyChangedTheTimer', {
|
||||
|
|
|
@ -68,16 +68,38 @@ export const DialogUpdate = ({
|
|||
>
|
||||
<span>
|
||||
<Intl
|
||||
components={[
|
||||
<a
|
||||
key="signal-download"
|
||||
href={url}
|
||||
rel="noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
{url}
|
||||
</a>,
|
||||
]}
|
||||
components={{
|
||||
retry: (
|
||||
<button
|
||||
className="LeftPaneDialog__retry"
|
||||
key="signal-retry"
|
||||
onClick={startUpdate}
|
||||
type="button"
|
||||
>
|
||||
{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}
|
||||
id="cannotUpdateDetail"
|
||||
/>
|
||||
|
@ -89,12 +111,12 @@ export const DialogUpdate = ({
|
|||
if (dialogType === DialogType.MacOS_Read_Only) {
|
||||
return (
|
||||
<LeftPaneDialog
|
||||
containerWidthBreakpoint={containerWidthBreakpoint}
|
||||
type="warning"
|
||||
title={i18n('cannotUpdate')}
|
||||
hasXButton
|
||||
closeLabel={i18n('close')}
|
||||
containerWidthBreakpoint={containerWidthBreakpoint}
|
||||
hasXButton
|
||||
onClose={dismissDialog}
|
||||
title={i18n('cannotUpdate')}
|
||||
type="warning"
|
||||
>
|
||||
<span>
|
||||
<Intl
|
||||
|
|
Loading…
Reference in a new issue