aboutsummaryrefslogtreecommitdiff
path: root/module/vcomponent/datetime/output.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-02-22 11:19:19 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2022-02-22 21:08:41 +0100
commit093ef72e6489d96fb6ffae8d58d7cb1cb7ff77ee (patch)
treed164e37c20e562588700d86379cfda1b0ca3c596 /module/vcomponent/datetime/output.scm
parentDatetime restrict imports. (diff)
downloadcalp-093ef72e6489d96fb6ffae8d58d7cb1cb7ff77ee.tar.gz
calp-093ef72e6489d96fb6ffae8d58d7cb1cb7ff77ee.tar.xz
Prepare code for translation.
Diffstat (limited to 'module/vcomponent/datetime/output.scm')
-rw-r--r--module/vcomponent/datetime/output.scm11
1 files changed, 8 insertions, 3 deletions
diff --git a/module/vcomponent/datetime/output.scm b/module/vcomponent/datetime/output.scm
index fa662286..a0ab9941 100644
--- a/module/vcomponent/datetime/output.scm
+++ b/module/vcomponent/datetime/output.scm
@@ -5,6 +5,7 @@
:use-module (datetime)
:use-module (vcomponent base)
:use-module (text util)
+ :use-module (calp translation)
)
(define-config summary-filter (lambda (_ a) a)
@@ -14,13 +15,14 @@
pre: (ensure procedure?))
;; ev → sxml
+;; TODO translation
(define-public (format-recurrence-rule ev)
- `("Upprepas "
+ `(,(_ "Upprepas ")
,((@ (vcomponent recurrence display) format-recurrence-rule)
(prop ev 'RRULE))
,@(awhen (prop* ev 'EXDATE)
(list
- ", undantaget "
+ (_ ", undantaget ")
(add-enumeration-punctuation
(map (lambda (d)
(if (date? d)
@@ -43,7 +45,10 @@
(define-public (format-description ev str)
(catch #t (lambda () ((get-config 'description-filter) ev str))
(lambda (err . args)
- (warning "~a on formatting description, ~s" err args)
+ ;; Warning message for failure to format description.
+ ;; First argument is name of warning/error,
+ ;; second is error arguments
+ (warning (_ "~a on formatting description, ~s") err args)
str)))
;; Takes an event, and returns a pretty string for the time interval