diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-02-22 11:19:19 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-02-22 21:08:41 +0100 |
commit | 093ef72e6489d96fb6ffae8d58d7cb1cb7ff77ee (patch) | |
tree | d164e37c20e562588700d86379cfda1b0ca3c596 /module/vcomponent/datetime | |
parent | Datetime restrict imports. (diff) | |
download | calp-093ef72e6489d96fb6ffae8d58d7cb1cb7ff77ee.tar.gz calp-093ef72e6489d96fb6ffae8d58d7cb1cb7ff77ee.tar.xz |
Prepare code for translation.
Diffstat (limited to 'module/vcomponent/datetime')
-rw-r--r-- | module/vcomponent/datetime/output.scm | 11 |
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 |