diff --git a/messages/uniworx/categories/avs/de-de-formal.msg b/messages/uniworx/categories/avs/de-de-formal.msg index 19c6684c4..fd790cef2 100644 --- a/messages/uniworx/categories/avs/de-de-formal.msg +++ b/messages/uniworx/categories/avs/de-de-formal.msg @@ -4,7 +4,9 @@ AvsPersonInfo: AVS Personendaten AvsPersonId: AVS Personen Id AvsPersonNo: AVS Personennummer +AvsPersonNoNotId: AVS Personennummer dient zur menschlichen Kommunikation mit der Ausweisstelle und darf nicht verwechselt werden mit der maschinell verwendeten AVS Personen Id AvsPersonNoMismatch: AVS Personennummer hat sich geändert und wurde in FRADrive noch nicht aktualisiert +AvsPersonNoDiffers: Es sind derzeit zwei verschiedene AVS Personennummern zugeordnet. Bitte einen Administrator kontaktieren. AvsCardNo: Ausweiskartennummer AvsFirstName: Vorname AvsLastName: Nachname @@ -15,7 +17,6 @@ AvsQueryNeeded: Benötigt Verbindung zum AVS. AvsQueryEmpty: Bitte mindestens ein Anfragefeld ausfüllen! AvsQueryStatusInvalid t@Text: Nur numerische IDs eingeben, durch Komma getrennt! Erhalten: #{show t} AvsLicence: Fahrberechtigung -AvsPersonNoNotId: AVS Personennummer dient zur menschlichen Kommunikation mit der Ausweisstelle und darf nicht verwechselt werden mit der maschinell verwendeten AVS Personen Id AvsTitleLicenceSynch: Abgleich Fahrberechtigungen zwischen AVS und FRADrive BtnAvsRevokeUnknown: Fahrberechtigungen im AVS sofort entziehen BtnAvsImportUnknown: AVS Daten unbekannter Personen importieren @@ -45,6 +46,7 @@ AvsCardColorBlue: Blau AvsCardColorRed: Rot AvsCardColorYellow: Gelb LastAvsSynchronisation: Letzte AVS-Synchronisation +LastAvsSyncedBefore: Letzte AVS-Synchronisation vor LastAvsSynchError: Letzte AVS-Fehlermeldung AvsInterfaceUnavailable: AVS Schnittstelle nicht richtig konfiguriert oder antwortet nicht diff --git a/messages/uniworx/categories/avs/en-eu.msg b/messages/uniworx/categories/avs/en-eu.msg index f42c75318..787d38a16 100644 --- a/messages/uniworx/categories/avs/en-eu.msg +++ b/messages/uniworx/categories/avs/en-eu.msg @@ -4,7 +4,9 @@ AvsPersonInfo: AVS person info AvsPersonId: AVS person id AvsPersonNo: AVS person number +AvsPersonNoNotId: AVS person number is used in human communication only and must not be mistaken for the AVS personen id used in machine communications AvsPersonNoMismatch: AVS person number has changed and was not yet updated in FRADrive +AvsPersonNoDiffers: There are currently two differing AVS person numbers associated with this user. Please contact an administrator to resolve this. AvsCardNo: Card number AvsFirstName: First name AvsLastName: Last name @@ -15,7 +17,7 @@ AvsQueryNeeded: AVS connection required. AvsQueryEmpty: At least one query field must be filled! AvsQueryStatusInvalid t: Numeric IDs only, comma seperated! #{show t} AvsLicence: Driving Licence -AvsPersonNoNotId: AVS person number is used in human communication only and must not be mistaken for the AVS personen id used in machine communications + AvsTitleLicenceSynch: Synchronisation driving licences between AVS and FRADrive BtnAvsRevokeUnknown: Revoke AVS driving licences for unknown persons immediately BtnAvsImportUnknown: Import AVS data for unknown persons @@ -45,6 +47,7 @@ AvsCardColorBlue: Blue AvsCardColorRed: Red AvsCardColorYellow: Yellow LastAvsSynchronisation: Last AVS synchronisation +LastAvsSyncedBefore: Last AVS synchronisation before LastAvsSynchError: Last AVS Error AvsInterfaceUnavailable: AVS interface was not configured correctly or does not respond diff --git a/messages/uniworx/categories/settings/personal_settings/de-de-formal.msg b/messages/uniworx/categories/settings/personal_settings/de-de-formal.msg index cc01e920d..9512318eb 100644 --- a/messages/uniworx/categories/settings/personal_settings/de-de-formal.msg +++ b/messages/uniworx/categories/settings/personal_settings/de-de-formal.msg @@ -25,10 +25,14 @@ PersonalInfoTutorialsWip: Die Anzeige von Kurse, zu denen Sie angemeldet sind wi ProfileGroupSubmissionDates: Bei Gruppenabgaben wird kein Datum angezeigt, wenn Sie die Gruppenabgabe nie selbst hochgeladen haben. ProfileCorrectorRemark: Die oberhalb angezeigte Tabelle zeigt nur prinzipielle Einteilungen als Korrektor zu einem Übungsblatt. Auch ohne Einteilung können Korrekturen einzeln zugewiesen werden, welche hier dann nicht aufgeführt werden. ProfileCorrections: Auflistung aller zugewiesenen Korrekturen -Remarks: Hinweise +Remarks: Hinweis: -ProfileSupervisor: Übergeordnete Ansprechpartner -ProfileSupervisee: Ist Ansprechpartner für +ProfileNoSupervisor: Keine übergeordneten Ansprechpartner vorhanden +ProfileSupervisor n@Int m@Int: #{n} #{pluralDE n "übergeordneter" "übergeordnete"} Ansprechpartner#{noneMoreDE m "" (", davon " <> tshow m <> " mit Benachrichtigungsumleitung")} +ProfileSupervisorRemark n@Int m@Int l@Int: #{m}/#{n} #{pluralDE m "übergeordneter" "übergeordnete"} Ansprechpartner mit Benachrichtigungsumleitung#{noneMoreDE l "" (", davon " <> tshow l <> " mit postalischer Benachrichtigung")} +ProfileNoSupervisee: Ist kein Ansprechpartner für irgendjemand +ProfileSupervisee n@Int m@Int: Ist Ansprechpartner für #{n} #{pluralDE n "Person" "Personen"}#{noneMoreDE m "" (", davon " <> tshow m <> " mit Benachrichtigungsumleitung")} +ProfileSuperviseeRemark n@Int m@Int: Dieser Nutzer ist Ansprechpartner für #{n} #{pluralDE n "Person" "Personen"}#{noneMoreDE m "" (", davon " <> tshow m <> " mit Benachrichtigungsumleitung")} UserTelephone: Telefon UserMobile: Mobiltelefon diff --git a/messages/uniworx/categories/settings/personal_settings/en-eu.msg b/messages/uniworx/categories/settings/personal_settings/en-eu.msg index b61ac5678..3bbb8cec4 100644 --- a/messages/uniworx/categories/settings/personal_settings/en-eu.msg +++ b/messages/uniworx/categories/settings/personal_settings/en-eu.msg @@ -25,10 +25,14 @@ PersonalInfoTutorialsWip: The feature to display courses you have registered for ProfileGroupSubmissionDates: No date is shown for group submissions if you have never uploaded the submission yourself. ProfileCorrectorRemark: The table above only shows registration as a corrector in principle. Even without registration corrections can be assigned individually and are not listed. ProfileCorrections: List of all assigned corrections -Remarks: Remarks +Remarks: Remark: -ProfileSupervisor: Supervised by -ProfileSupervisee: Supervises +ProfileNoSupervisor: Is not supervised by anynone +ProfileSupervisor n m: #{pluralENsN n "supervisor"} #{noneMoreEN m "" ("with " <> tshow m <> " active notification rerouting")} +ProfileSupervisorRemark n@Int m@Int l@Int: #{m}/#{n} #{pluralENs m "supervisor"} with active notification rerouting#{noneMoreEN l "" (", and " <> tshow l <> "of these prefer postal notifications")} +ProfileNoSupervisee: Does not supervise anynone +ProfileSupervisee n m: Supervises #{pluralENsN n "person"} #{noneMoreEN m "" ("with " <> tshow m <> " active notification rerouting")} +ProfileSuperviseeRemark n m: This person supervises #{pluralENsN n "person"}#{noneMoreEN m "" (" with " <> tshow m <> " having active notifications rerouting to this user")} UserTelephone: Phone UserMobile: Mobile diff --git a/src/Foundation/I18n.hs b/src/Foundation/I18n.hs index b1ac4ce01..9eab3e2da 100644 --- a/src/Foundation/I18n.hs +++ b/src/Foundation/I18n.hs @@ -39,7 +39,7 @@ module Foundation.I18n , StudyDegreeTerm(..) , ShortStudyFieldType(..) , StudyDegreeTermType(..) - , ErrorResponseTitle(..) + , ErrorResponseTitle(..) , UniWorXMessages(..) , uniworxMessages , unRenderMessage, unRenderMessage', unRenderMessageLenient @@ -88,15 +88,14 @@ pluralDE num singularForm pluralForm | otherwise = pluralForm pluralDEx :: (Eq a, Num a) => Char -> a -> Text -> Text --- ^ @pluralENs n "Monat" = pluralEN n "Monat" "Monate"@ pluralDEx c n t = pluralDE n t $ t `snoc` c --- | like `pluralDEe` but also prefixes with the number +-- | like `pluralDEx` but also prefixes with the number pluralDExN :: (Eq a, Num a, Show a) => Char -> a -> Text -> Text pluralDExN c n t = tshow n <> cons ' ' (pluralDEx c n t) pluralDEe :: (Eq a, Num a) => a -> Text -> Text --- ^ @pluralENs n "Monat" = pluralEN n "Monat" "Monate"@ +-- ^ @pluralDEe n "Monat" = pluralDEe n "Monat" "Monate"@ pluralDEe = pluralDEx 'e' -- | like `pluralDEe` but also prefixes with the number @@ -105,7 +104,7 @@ pluralDEeN = pluralDExN 'e' -- | postfix plural with an 'n' pluralDEn :: (Eq a, Num a) => a -> Text -> Text --- ^ @pluralENs n "Monat" = pluralEN n "Monat" "Monate"@ +-- ^ @pluralENs n "Monat" = pluralEN n "Monat" "Monate"@ pluralDEn = pluralDEx 'n' -- | like `pluralDEn` but also prefixes with the number @@ -124,14 +123,14 @@ noneOneMoreDE num noneText singularForm pluralForm | num == 1 = singularForm | otherwise = pluralForm --- noneMoreDE :: (Eq a, Num a) --- => a -- ^ Count --- -> Text -- ^ None --- -> Text -- ^ Some --- -> Text --- noneMoreDE num noneText someText --- | num == 0 = noneText --- | otherwise = someText +noneMoreDE :: (Eq a, Num a) + => a -- ^ Count + -> Text -- ^ None + -> Text -- ^ Some + -> Text +noneMoreDE num noneText someText + | num == 0 = noneText + | otherwise = someText pluralEN :: (Eq a, Num a) => a -- ^ Count @@ -146,7 +145,7 @@ pluralENs :: (Eq a, Num a) => a -- ^ Count -> Text -- ^ Singular -> Text --- ^ @pluralENs n "foo" = pluralEN n "foo" "foos"@ +-- ^ @pluralENs n "foo" = pluralEN n "foo" "foos"@ pluralENs n t = pluralEN n t $ t `snoc` 's' -- | like `pluralENs` but also prefixes with the number @@ -164,14 +163,14 @@ noneOneMoreEN num noneText singularForm pluralForm | num == 1 = singularForm | otherwise = pluralForm --- noneMoreEN :: (Eq a, Num a) --- => a -- ^ Count --- -> Text -- ^ None --- -> Text -- ^ Some --- -> Text --- noneMoreEN num noneText someText --- | num == 0 = noneText --- | otherwise = someText +noneMoreEN :: (Eq a, Num a) + => a -- ^ Count + -> Text -- ^ None + -> Text -- ^ Some + -> Text +noneMoreEN num noneText someText + | num == 0 = noneText + | otherwise = someText _ordinalEN :: ToMessage a => a @@ -191,20 +190,20 @@ notEN :: Bool -> Text notEN = bool "not" "" {- -- TODO: use this is message eventually --- Commonly used plurals +-- Commonly used plurals data Thing = Person | Examinee deriving (Eq) -thingDE :: Int -> Thing -> Text +thingDE :: Int -> Thing -> Text thingDE num = (tshow num <>) . Text.cons ' ' . thing - where + where thing :: Thing -> Text thing Person = pluralDE num "Person" "Personen" thing Examinee = pluralDE num "Prüfling" "Prüflinge" - -thingEN :: Int -> Thing -> Text + +thingEN :: Int -> Thing -> Text thingEN num t = tshow num <> Text.cons ' ' (thing t) - where + where thing :: Thing -> Text thing Person = pluralENs num "person" thing Examinee = pluralENs num "examinee" @@ -282,7 +281,7 @@ mkMessageAddition ''UniWorX "Avs" "messages/uniworx/categories/avs" "de-de-forma embedRenderMessage ''UniWorX ''LmsStatus (uncurry ((<>) . (<> "Status")) . Text.splitAt 3) -newtype SomeMessages master = SomeMessages [SomeMessage master] +newtype SomeMessages master = SomeMessages [SomeMessage master] deriving newtype (Semigroup, Monoid) instance master ~ master' => RenderMessage master (SomeMessages master') where @@ -621,6 +620,6 @@ unRenderMessageLenient = unRenderMessage' cmp instance Default DateTimeFormatter where def = mkDateTimeFormatter (getTimeLocale' []) def appTZ -instance RenderMessage UniWorX Address where +instance RenderMessage UniWorX Address where renderMessage s l a@Address{addressName = Just aname} = aname <> cons ' ' (renderMessage s l a{addressName=Nothing}) renderMessage _ _ Address{addressEmail = mail} = "<" <> mail <> ">" diff --git a/src/Handler/Admin/Avs.hs b/src/Handler/Admin/Avs.hs index 65705b218..b8c0926fc 100644 --- a/src/Handler/Admin/Avs.hs +++ b/src/Handler/Admin/Avs.hs @@ -159,7 +159,7 @@ postAdminAvsR = do $nothing AVS nicht konfiguriert! |] - + ((presult, pwidget), penctype) <- runFormPost $ makeAvsPersonForm Nothing let procFormPerson :: AvsQueryPerson -> Handler (Maybe (Maybe Widget, Maybe AvsPersonId)) @@ -168,7 +168,7 @@ postAdminAvsR = do try (avsQuery fr) >>= \case Left err -> return $ Just (Just $ exceptionWgt err, Nothing) Right (AvsResponsePerson pns) -> do - let mapid = case Set.toList pns of + let mapid = case Set.toList pns of [AvsDataPerson{avsPersonPersonID=apid}] -> Just apid _ -> Nothing wgt = [whamlet| @@ -178,12 +178,12 @@ postAdminAvsR = do |] --
  • #{decodeUtf8 (Pretty.encodePretty (toJSON p))} return $ Just (toMaybe (notNull pns) wgt, mapid) (mbPerson,mapid) <- fromMaybe (Nothing,Nothing) <$> formResultMaybe presult procFormPerson - + ((sresult', swidget), senctype) <- runFormPost $ makeAvsStatusForm mapid let sresult = sresult' <|> maybe FormMissing (FormSuccess . AvsQueryStatus . Set.singleton) mapid -- use unique AvsId from PersonSearch for convenience, if form was empty procFormStatus fr = do addMessage Info $ text2Html $ "Status Query: " <> tshow (toJSON fr) - tryShow $ do + tryShow $ do AvsResponseStatus pns <- avsQuery fr return [whamlet|