Merge branch 'croatian_translation'

This commit is contained in:
nek0 2017-08-04 07:08:34 +02:00
commit 671eab1697
4 changed files with 19 additions and 20 deletions

View File

@ -47,12 +47,14 @@ postTransferR from to =
((res, _), _) <- runFormPost
$ renderBootstrap3 BootstrapBasicForm transferForm
case res of
FormSuccess amount -> do
if amount < 0
then do
FormSuccess amount
| amount < 0 -> do
setMessageI MsgNegativeTransfer
redirect $ TransferR from to
else do
| userBalance sender < amount -> do
setMessageI MsgNotEnoughFunds
redirect HomeR
| otherwise -> do
runDB $ update from [UserBalance -=. amount]
runDB $ update to [UserBalance +=. amount]
master <- getYesod
@ -71,10 +73,9 @@ transferForm = areq currencyField (bfs MsgValue) (Just 0)
notify :: User -> User -> Int -> App -> IO ()
notify sender rcpt amount master = do
case userEmail sender of
Just email ->
liftIO $ sendMail email "Guthabentransfer beim Matematen"
[stext|
when (isJust $ userEmail sender) $
liftIO $ sendMail (fromJust $ userEmail sender) "Guthabentransfer beim Matematen"
[stext|
Hallo #{userIdent sender}
Du hast gerade #{formatIntCurrency amount}#{appCurrency $ appSettings master} an #{userIdent rcpt} transferiert.
@ -82,13 +83,10 @@ Du hast gerade #{formatIntCurrency amount}#{appCurrency $ appSettings master} an
Viele Grüße,
Dein Matemat
|]
Nothing ->
return ()
case userEmail rcpt of
Just email ->
liftIO $ sendMail email "Guthabentransfer eingetroffen"
[stext|
|]
when (isJust $ userEmail rcpt) $
liftIO $ sendMail (fromJust $ userEmail rcpt) "Guthabentransfer eingetroffen"
[stext|
Hallo #{userIdent rcpt}
Du hast gerade #{formatIntCurrency amount}#{appCurrency $ appSettings master} von #{userIdent sender} erhalten.
@ -96,6 +94,4 @@ Du hast gerade #{formatIntCurrency amount}#{appCurrency $ appSettings master} vo
Viele Grüße,
Dein Matemat
|]
Nothing ->
return ()
|]

View File

@ -146,3 +146,4 @@ UserIdentNotUnique: Uživatelské jméno není jedinečný
Login: Přihlásit
Logout: Odhlásit
CreationBlocked: Nelze vytvořit nové uživatele.
NotEnoughFunds: Nedostatek kreditu

View File

@ -146,3 +146,4 @@ UserIdentNotUnique: Benutzername ist nicht einzigartig
Login: Login
Logout: Logout
CreationBlocked: Es können keine neuen Nutzer angelegt werden.
NotEnoughFunds: Nicht genügen Guthaben

View File

@ -14,7 +14,7 @@ EditFail: Editing failed
Name: Name
Price: Price
CurrentStock: Current stock
AnnouncedStock: Announced stock
AnnouncedStock: Warning limit
DeleteItem: Delete Item
ItemDeleted: Item deleted
UserCreated: User created
@ -111,7 +111,7 @@ BarcodeAdded: barcode succesfully added
BarcodeDuplicate: This barcode is already in use
Transfer: Credit transfer
TransferTo: Transfer credit to
NegativeTransfer: Please do not transfer negative amounts
NegativeTransfer: You can not transfer negative amounts
TransferComplete: Transfer complete
TransferError: Transfer error
PreviousPage: previous page
@ -146,3 +146,4 @@ UserIdentNotUnique: Username is not unique
Login: Login
Logout: Logout
CreationBlocked: New users can not be created.
NotEnoughFunds: Not enough funds!