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

View file

@ -17,11 +17,14 @@ import Data.String (fromString)
import qualified Data.Text as T import qualified Data.Text as T
import Text.Printf (printf)
-- internal imports -- internal imports
import Types import Types
import Model import Model
import Control.Role import Control.Role
import Util
userNew userNew
:: UserSubmit :: UserSubmit
@ -161,12 +164,12 @@ userNotify (Just (auid, method)) boughtItems (PurchaseResult flag missing) = do
) )
boughtItems boughtItems
let messageText = mconcat $ map (<> "\n") $ 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 throwError $ err501
{ errBody = "userNotify: Not implemented yet" { errBody = "userNotify: Not implemented yet"

View file

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