From ae66fdfb8aa51cd7f6e6ad4e263e52cd7043abcb Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 7 Feb 2022 23:03:19 +0100 Subject: [PATCH] fix(submissions): notDE, notEN for unambiguous negation --- .../uniworx/categories/courses/submission/de-de-formal.msg | 2 +- messages/uniworx/categories/courses/submission/en-eu.msg | 2 +- src/Foundation/I18n.hs | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/messages/uniworx/categories/courses/submission/de-de-formal.msg b/messages/uniworx/categories/courses/submission/de-de-formal.msg index 7a08fde97..a9a224b43 100644 --- a/messages/uniworx/categories/courses/submission/de-de-formal.msg +++ b/messages/uniworx/categories/courses/submission/de-de-formal.msg @@ -160,7 +160,7 @@ SubmissionDownloadGroups: Mit festen Abgabegruppen CorrAutoSetCorrector: Korrekturen verteilen CorrDelete: Abgaben löschen CorrSetCorrectionsDone: Korrekturen als abgeschlossen markieren -SetCorrectionsDone b@Bool: Korrekturen als #{bool "nicht" "" b} abgeschlossen markiert +SetCorrectionsDone b@Bool: Korrekturen als #{notDE b} abgeschlossen markiert SubmissionCorrected: Korrigiert CorrectionSheets: Übersicht Korrekturen nach Blättern CorrectionCorrectors: Übersicht Korrekturen nach Korrektor:innen diff --git a/messages/uniworx/categories/courses/submission/en-eu.msg b/messages/uniworx/categories/courses/submission/en-eu.msg index bc0585cf8..11164c7b0 100644 --- a/messages/uniworx/categories/courses/submission/en-eu.msg +++ b/messages/uniworx/categories/courses/submission/en-eu.msg @@ -160,7 +160,7 @@ SubmissionDownloadGroups: With registered submission groups CorrAutoSetCorrector: Distribute corrections CorrDelete: Delete submissions CorrSetCorrectionsDone: Set corrections as done -SetCorrectionsDone b: Set corrections as #{bool "not" "" b} done +SetCorrectionsDone b: Set corrections as #{notEN b} done SubmissionCorrected: Marked CorrectionSheets: Corrections by sheet CorrectionCorrectors: Corrections by corrector diff --git a/src/Foundation/I18n.hs b/src/Foundation/I18n.hs index fa357c6f8..8faf5a2bd 100644 --- a/src/Foundation/I18n.hs +++ b/src/Foundation/I18n.hs @@ -142,6 +142,11 @@ ordinalEN (toMessage -> numStr) = case lastChar of where lastChar = last <$> fromNullable numStr +notDE :: Bool -> Text +notDE = bool "nicht" "" + +notEN :: Bool -> Text +notEN = bool "not" "" -- | Convenience function for i18n messages definitions maybeToMessage :: ToMessage m => Text -> Maybe m -> Text -> Text