prepare translations

This commit is contained in:
nek0 2021-06-24 06:33:05 +02:00
parent 75e8907f7f
commit 4285fe685a
3 changed files with 15 additions and 5 deletions

View File

@ -20,6 +20,8 @@ category: Web
extra-source-files:
README.md
CHANGELOG.md
translation/*.po
translation/*.pot
flag develop
description: Compile mateamt in developer mode. Authenitcation disabled.
@ -144,6 +146,7 @@ executable mateamt
, case-insensitive
, iproute
, clock
, haskell-gettext
hs-source-dirs: app
default-language: Haskell2010

View File

@ -17,11 +17,14 @@ import Data.String (fromString)
import qualified Data.Text as T
import Text.Printf (printf)
-- internal imports
import Types
import Model
import Control.Role
import Util
userNew
:: UserSubmit
@ -161,12 +164,12 @@ userNotify (Just (auid, method)) boughtItems (PurchaseResult flag missing) = do
)
boughtItems
let messageText = mconcat $ map (<> "\n") $
[ "Hello " <> userDetailsIdent userDetails <> ","
[ printf (__ "Hello %s,") (userDetailsIdent userDetails)
, ""
, printf (__ "Your authentication key with the comment \"%s\"\
\ Just made following purchase:")
(authOverviewComment authOV)
, ""
, "Your " <> ((fromString $ show $ authOverviewMethod authOV) <>
(" with the comment \"" <>
((authOverviewComment authOV) <>
"\" Just made following purchase:")))
]
throwError $ err501
{ errBody = "userNotify: Not implemented yet"

View File

@ -30,3 +30,7 @@ initDB conn = do
execute_ conn initRole
execute_ conn initUserToRole
void $ runInsertInitialRoles conn
-- This is only a dummy function.
-- TODO: Replace with proper translation function(s)!
__ = id