summaryrefslogtreecommitdiffhomepage
path: root/gui/src/main/errors.ts
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src/main/errors.ts')
-rw-r--r--gui/src/main/errors.ts20
1 files changed, 17 insertions, 3 deletions
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'),
+ );
}
}