Merge branch 'croatian_translation'
This commit is contained in:
commit
671eab1697
4 changed files with 19 additions and 20 deletions
|
@ -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 ()
|
||||
|]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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!
|
||||
|
|
Loading…
Reference in a new issue