aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-04-08 00:40:50 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-04-11 19:02:33 +0200
commit3f1846959712e899d35de01bff251204484c0e59 (patch)
treee157d84bda0393940a0af102b5bf32f50e2980ca
parentMerge branch 'translation' (diff)
downloadcalp-3f1846959712e899d35de01bff251204484c0e59.tar.gz
calp-3f1846959712e899d35de01bff251204484c0e59.tar.xz
Fixup translatable strings.
-rw-r--r--module/calp/entry-points/convert.scm8
-rw-r--r--module/calp/entry-points/html.scm4
-rw-r--r--module/calp/html/caltable.scm2
-rw-r--r--module/calp/html/vcomponent.scm6
-rw-r--r--module/calp/html/view/calendar/shared.scm3
-rw-r--r--module/calp/server/routes.scm4
-rw-r--r--module/vcomponent/formats/vdir/save-delete.scm1
7 files changed, 17 insertions, 11 deletions
diff --git a/module/calp/entry-points/convert.scm b/module/calp/entry-points/convert.scm
index d416b004..b1321f55 100644
--- a/module/calp/entry-points/convert.scm
+++ b/module/calp/entry-points/convert.scm
@@ -69,7 +69,9 @@
(@ (vcomponent formats xcal parse) sxcal->vcomponent)
;; TODO strip *TOP*
xml->sxml)]
- [else (scm-error 'misc-error "convert-main" "Unexpected parser type: ~a" (list from) #f)]
+ [else (scm-error 'misc-error "convert-main"
+ (_ "Unexpected parser type: ~a")
+ (list from) #f)]
))
(define writer
@@ -86,7 +88,9 @@
(sxml->xml ((@ (vcomponent formats xcal output) vcomponent->sxcal)
component)
port))]
- [else (scm-error 'misc-error "convert-main" "Unexpected writer type: ~a" (list to) #f)]))
+ [else (scm-error 'misc-error "convert-main"
+ (_ "Unexpected writer type: ~a")
+ (list to) #f)]))
(call-with-output-file outfile
diff --git a/module/calp/entry-points/html.scm b/module/calp/entry-points/html.scm
index 8478aa6c..68665ce3 100644
--- a/module/calp/entry-points/html.scm
+++ b/module/calp/entry-points/html.scm
@@ -80,9 +80,9 @@ for embedding in a larger page. Currently only applies to the <i>small</i> style
((= errno EEXIST)
(let ((st (lstat link)))
(cond ((not (eq? 'symlink (stat:type st)))
- (warning "File ~s exists, but isn't a symlink" link))
+ (warning (_ "File ~s exists, but isn't a symlink") link))
((not (string=? target (readlink link)))
- (warning "~s is a symlink, but points to ~s instead of expected ~s"
+ (warning (_ "~s is a symlink, but points to ~s instead of expected ~s")
link (readlink link) target))))
;; else, file exists as a symlink, and points where we want,
;; which is expected. Do nothing and be happy.
diff --git a/module/calp/html/caltable.scm b/module/calp/html/caltable.scm
index 77580844..52a18833 100644
--- a/module/calp/html/caltable.scm
+++ b/module/calp/html/caltable.scm
@@ -47,7 +47,7 @@
`(div (@ (class "small-calendar"))
;; Cell 0, 0. The letter v. for week number
- (div (@ (class "column-head row-head")) "v.")
+ (div (@ (class "column-head row-head")) (_ "v."))
;; top row, names of week days
,@(map (lambda (d) `(div (@ (class "column-head"))
diff --git a/module/calp/html/vcomponent.scm b/module/calp/html/vcomponent.scm
index 5c92e1e7..16189dff 100644
--- a/module/calp/html/vcomponent.scm
+++ b/module/calp/html/vcomponent.scm
@@ -44,10 +44,10 @@
(configuration-error
(lambda (key subr msg args data)
(format (current-error-port)
- "Error retrieving configuration, ~?~%" msg args)))
+ (_ "Error retrieving configuration, ~?~%") msg args)))
(#t ; for errors when running the filter
(lambda (err . args)
- (warning "~a on formatting description, ~s" err args)
+ (warning (_ "~a on formatting description, ~s") err args)
str))))
;; used by search view
@@ -510,7 +510,7 @@
; "20:56"
))
(div (@ (class "fields"))
- (div (b ,("Location: "))
+ (div (b ,(_ "Location: "))
(div (@ (class "location")
(data-property "location"))
; "Alsättersgatan 13"
diff --git a/module/calp/html/view/calendar/shared.scm b/module/calp/html/view/calendar/shared.scm
index e333dc4a..108f3b9a 100644
--- a/module/calp/html/view/calendar/shared.scm
+++ b/module/calp/html/view/calendar/shared.scm
@@ -14,6 +14,7 @@
:use-module ((calp html vcomponent)
:select (make-block format-summary))
:use-module (ice-9 format)
+ :use-module (calp translation)
)
@@ -33,7 +34,7 @@
(unless event-length-key
(scm-error 'wrong-type-arg "fix-event-widths!"
- "event-length-key is required"
+ (_ "event-length-key is required")
#f #f))
;; @var{x} is how for left in the container we are.
diff --git a/module/calp/server/routes.scm b/module/calp/server/routes.scm
index d05451eb..e3237914 100644
--- a/module/calp/server/routes.scm
+++ b/module/calp/server/routes.scm
@@ -131,7 +131,7 @@
(GET "/" ()
(return '((content-type text/html))
(sxml->html-string
- '(body (a (@ (href "/today")) ,(_ "Go to Today"))
+ `(body (a (@ (href "/today")) ,(_ "Go to Today"))
(script "window.onload = function() {
document.getElementsByTagName('a')[0].click();}")))))
@@ -443,7 +443,7 @@
'((content-type text/html))
(sxml->html-string
`(html
- (head (title "Calp directory listing for " path)
+ (head (title (_ "Calp directory listing for ") path)
,((@ (calp html components) include-css) "/static/directory-listing.css"))
(body ,(directory-table (static-dir) path))))))
(lambda (err proc fmt fmt-args data)
diff --git a/module/vcomponent/formats/vdir/save-delete.scm b/module/vcomponent/formats/vdir/save-delete.scm
index 01d34f9f..ee97f331 100644
--- a/module/vcomponent/formats/vdir/save-delete.scm
+++ b/module/vcomponent/formats/vdir/save-delete.scm
@@ -15,6 +15,7 @@
:use-module ((hnh util path) :select (path-append))
:use-module (vcomponent formats ical output)
:use-module (vcomponent)
+ :use-module (calp translation)
:use-module ((hnh util io) :select (with-atomic-output-to-file))
)