diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2023-04-24 09:29:29 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2023-04-24 09:29:29 +0200 |
| commit | 905a2860b18540fbb39bf0afaaf563fa365ef252 (patch) | |
| tree | 6713fba3e58ce1fe0052113ead42cbb93457def2 | |
| parent | 92c020defc35c755e48c80f4cd61451f6e9d3561 (diff) | |
| parent | 837f960005ee7104cac82c4b7e62deb521b54690 (diff) | |
| download | mullvadvpn-905a2860b18540fbb39bf0afaaf563fa365ef252.tar.xz mullvadvpn-905a2860b18540fbb39bf0afaaf563fa365ef252.zip | |
Merge branch 'translate-error-messages-in-errorsts-des-132'
| -rw-r--r-- | gui/locales/messages.pot | 17 | ||||
| -rw-r--r-- | gui/src/main/errors.ts | 20 |
2 files changed, 31 insertions, 6 deletions
diff --git a/gui/locales/messages.pot b/gui/locales/messages.pot index 79e0b31e40..21e0c2c274 100644 --- a/gui/locales/messages.pot +++ b/gui/locales/messages.pot @@ -675,10 +675,22 @@ msgctxt "login-view" msgid "Failed to create account" msgstr "" +#. Error message shown above login input when trying to login but the app fails +#. to fetch the list of registered devices. +msgctxt "login-view" +msgid "Failed to fetch list of devices" +msgstr "" + msgctxt "login-view" msgid "Finishing upgrade." msgstr "" +#. Error message shown above login input when trying to login with a non-existent +#. account number. +msgctxt "login-view" +msgid "Invalid account number" +msgstr "" + msgctxt "login-view" msgid "Logged in" msgstr "" @@ -705,6 +717,8 @@ msgctxt "login-view" msgid "Please wait" msgstr "" +#. Error message shown above login input when trying to login to an account with +#. too many registered devices. msgctxt "login-view" msgid "Too many devices" msgstr "" @@ -1651,9 +1665,6 @@ msgstr "" msgid "Excluded applications" msgstr "" -msgid "Failed to fetch list of devices" -msgstr "" - msgid "Going to login will unblock the internet on this device." msgstr "" diff --git a/gui/src/main/errors.ts b/gui/src/main/errors.ts index daef671090..86b482f7bd 100644 --- a/gui/src/main/errors.ts +++ b/gui/src/main/errors.ts @@ -1,6 +1,12 @@ +import { messages } from '../shared/gettext'; + export class InvalidAccountError extends Error { constructor() { - super('Invalid account number'); + super( + // TRANSLATORS: Error message shown above login input when trying to login with a non-existent + // TRANSLATORS: account number. + messages.pgettext('login-view', 'Invalid account number'), + ); } } @@ -12,12 +18,20 @@ export class CommunicationError extends Error { export class TooManyDevicesError extends Error { constructor() { - super('Too many devices'); + super( + // TRANSLATORS: Error message shown above login input when trying to login to an account with + // TRANSLATORS: too many registered devices. + messages.pgettext('login-view', 'Too many devices'), + ); } } export class ListDevicesError extends Error { constructor() { - super('Failed to fetch list of devices'); + super( + // TRANSLATORS: Error message shown above login input when trying to login but the app fails + // TRANSLATORS: to fetch the list of registered devices. + messages.pgettext('login-view', 'Failed to fetch list of devices'), + ); } } |
