aboutsummaryrefslogtreecommitdiff
path: root/src/server/Model
diff options
context:
space:
mode:
authorJoris2016-08-21 14:30:40 +0200
committerJoris2016-08-21 14:30:40 +0200
commit75804df1cb231033f94183e41cdf79d36d8f6710 (patch)
tree48b7932285091fdbdaba6d77586859c1e1750ce0 /src/server/Model
parent3889d21ab58fbbc0134854b95013196a82e8d510 (diff)
Show a message if there is an error during a server request
Diffstat (limited to 'src/server/Model')
-rw-r--r--src/server/Model/Message/Key.hs10
-rw-r--r--src/server/Model/Message/Translations.hs37
2 files changed, 47 insertions, 0 deletions
diff --git a/src/server/Model/Message/Key.hs b/src/server/Model/Message/Key.hs
index 9126b61..8deca69 100644
--- a/src/server/Model/Message/Key.hs
+++ b/src/server/Model/Message/Key.hs
@@ -115,6 +115,16 @@ data Key =
| SmallerIntThan
| GreaterIntThan
+ -- Errors
+
+ | CreatePaymentError
+ | EditPaymentError
+ | DeletePaymentError
+ | CreateIncomeError
+ | EditIncomeError
+ | DeleteIncomeError
+ | SignOutError
+
-- Dialog
| Confirm
diff --git a/src/server/Model/Message/Translations.hs b/src/server/Model/Message/Translations.hs
index 4b698d7..994a56c 100644
--- a/src/server/Model/Message/Translations.hs
+++ b/src/server/Model/Message/Translations.hs
@@ -446,6 +446,43 @@ m l GreaterIntThan =
English -> "Integer smaller than {1} or equal required"
French -> "Entier inférieur ou égal à {1} requis"
+-- Errors
+
+m l CreatePaymentError =
+ case l of
+ English -> "Error at payment creation"
+ French -> "Erreur lors de la création du paiement"
+
+m l EditPaymentError =
+ case l of
+ English -> "Error at payment edition"
+ French -> "Erreur lors de la modification du paiement"
+
+m l DeletePaymentError =
+ case l of
+ English -> "Error at payment deletion"
+ French -> "Erreur lors de la suppression du paiement"
+
+m l CreateIncomeError =
+ case l of
+ English -> "Error at income creation"
+ French -> "Erreur lors de la création du revenu"
+
+m l EditIncomeError =
+ case l of
+ English -> "Error at income edition"
+ French -> "Erreur lors de la modification du revenu"
+
+m l DeleteIncomeError =
+ case l of
+ English -> "Error at income deletion"
+ French -> "Erreur lors de la suppression du revenu"
+
+m l SignOutError =
+ case l of
+ English -> "Error at sign out"
+ French -> "Erreur lors de la déconnexion"
+
-- Dialog
m l Confirm =