summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--desktop/packages/mullvad-vpn/src/renderer/components/views/app-upgrade/components/upgrade-label/components/upgrade-error/hooks/useMessage.ts56
1 files changed, 27 insertions, 29 deletions
diff --git a/desktop/packages/mullvad-vpn/src/renderer/components/views/app-upgrade/components/upgrade-label/components/upgrade-error/hooks/useMessage.ts b/desktop/packages/mullvad-vpn/src/renderer/components/views/app-upgrade/components/upgrade-label/components/upgrade-error/hooks/useMessage.ts
index fbfa1765c1..597edc9db3 100644
--- a/desktop/packages/mullvad-vpn/src/renderer/components/views/app-upgrade/components/upgrade-label/components/upgrade-error/hooks/useMessage.ts
+++ b/desktop/packages/mullvad-vpn/src/renderer/components/views/app-upgrade/components/upgrade-label/components/upgrade-error/hooks/useMessage.ts
@@ -16,38 +16,36 @@ export const useMessage = () => {
switch (error) {
case 'DOWNLOAD_FAILED':
- return [
- // TRANSLATORS: Label displayed when an error occurred due to the download failing
- messages.pgettext(
- 'app-upgrade-view',
- 'Unable to download update. Check your connection and/or firewall then try again. If this problem persists, please contact support.',
- ),
- ];
+ // TRANSLATORS: Label displayed when an error occurred due to the download failing
+ return messages.pgettext(
+ 'app-upgrade-view',
+ 'Unable to download update. Check your connection and/or firewall then try again. If this problem persists, please contact support.',
+ );
+ case 'INSTALLER_FAILED':
+ // TRANSLATORS: Label displayed when an error occurred within the installer
+ return messages.pgettext(
+ 'app-upgrade-view',
+ 'Installer encountered an error. Try again. If this problem persists, please contact support.',
+ );
case 'START_INSTALLER_AUTOMATIC_FAILED':
case 'START_INSTALLER_FAILED':
- return [
- // TRANSLATORS: Label displayed when an error occurred due to the installer failing to start
- // TRANSLATORS: and the suggested resolution is to download the update again.
- messages.pgettext(
- 'app-upgrade-view',
- 'Could not start the update installer, try downloading it again. If this problem persists, please contact support.',
- ),
- ];
+ // TRANSLATORS: Label displayed when an error occurred due to the installer failing to start
+ // TRANSLATORS: and the suggested resolution is to download the update again.
+ return messages.pgettext(
+ 'app-upgrade-view',
+ 'Could not start the update installer, try downloading it again. If this problem persists, please contact support.',
+ );
case 'VERIFICATION_FAILED':
- return [
- // TRANSLATORS: Label displayed when an error occurred due to the installer failed verification
- messages.pgettext(
- 'app-upgrade-view',
- 'Verification failed. Try again. If this problem persists, please contact support.',
- ),
- ];
+ // TRANSLATORS: Label displayed when an error occurred due to the installer failed verification
+ return messages.pgettext(
+ 'app-upgrade-view',
+ 'Verification failed. Try again. If this problem persists, please contact support.',
+ );
default:
- return [
- // TRANSLATORS: Label displayed when an unknown error occurred
- messages.pgettext(
- 'app-upgrade-view',
- 'An unknown error occurred. Please try again. If this problem persists, please contact support.',
- ),
- ];
+ // TRANSLATORS: Label displayed when an unknown error occurred
+ return messages.pgettext(
+ 'app-upgrade-view',
+ 'An unknown error occurred. Please try again. If this problem persists, please contact support.',
+ );
}
};