aboutsummaryrefslogtreecommitdiff
path: root/module/calp/entry-points
diff options
context:
space:
mode:
Diffstat (limited to 'module/calp/entry-points')
-rw-r--r--module/calp/entry-points/benchmark.scm4
-rw-r--r--module/calp/entry-points/convert.scm14
-rw-r--r--module/calp/entry-points/html.scm22
-rw-r--r--module/calp/entry-points/ical.scm4
-rw-r--r--module/calp/entry-points/import.scm12
-rw-r--r--module/calp/entry-points/server.scm20
-rw-r--r--module/calp/entry-points/terminal.scm4
-rw-r--r--module/calp/entry-points/text.scm6
-rw-r--r--module/calp/entry-points/tidsrapport.scm18
-rw-r--r--module/calp/entry-points/update-zoneinfo.scm4
10 files changed, 54 insertions, 54 deletions
diff --git a/module/calp/entry-points/benchmark.scm b/module/calp/entry-points/benchmark.scm
index 31ea958a..709d2bea 100644
--- a/module/calp/entry-points/benchmark.scm
+++ b/module/calp/entry-points/benchmark.scm
@@ -17,9 +17,9 @@
(define opt-spec
`((enable-output (single-char #\o)
(description
- ,(_ "Output is by default supressed, since many fields contain way to much data to read. This turns it on again.")
+ ,(G_ "Output is by default supressed, since many fields contain way to much data to read. This turns it on again.")
))
- (help (single-char #\h) (description ,(_ "Print this help.")))))
+ (help (single-char #\h) (description ,(G_ "Print this help.")))))
(define (main args)
diff --git a/module/calp/entry-points/convert.scm b/module/calp/entry-points/convert.scm
index 707414e5..0835b3d6 100644
--- a/module/calp/entry-points/convert.scm
+++ b/module/calp/entry-points/convert.scm
@@ -12,12 +12,12 @@
(define opt-spec
`((from (single-char #\f) (value (options "xcal" "ical"))
- (description ,(xml->sxml (_ "<group>Input format (otherwise infered from <i>infile</i>)</group>"))))
+ (description ,(xml->sxml (G_ "<group>Input format (otherwise infered from <i>infile</i>)</group>"))))
(to (single-char #\t) (value (options "xcal" "ical"))
- (description ,(xml->sxml (_ "<group>Output format (otherwise infered from <i>outfile</i>)</group>"))))
- (infile (value #t) (single-char #\i) (description ,(_ "Input file")))
- (outfile (value #t) (single-char #\o) (description ,(_ "Output file")))
- (help (single-char #\h) (description ,(_ "Print this help.")))))
+ (description ,(xml->sxml (G_ "<group>Output format (otherwise infered from <i>outfile</i>)</group>"))))
+ (infile (value #t) (single-char #\i) (description ,(G_ "Input file")))
+ (outfile (value #t) (single-char #\o) (description ,(G_ "Output file")))
+ (help (single-char #\h) (description ,(G_ "Print this help.")))))
(define (filename-to-type filename)
@@ -71,7 +71,7 @@
;; TODO strip *TOP*
xml->sxml)]
[else (scm-error 'misc-error "convert-main"
- (_ "Unexpected parser type: ~a")
+ (G_ "Unexpected parser type: ~a")
(list from) #f)]
))
@@ -90,7 +90,7 @@
component)
port))]
[else (scm-error 'misc-error "convert-main"
- (_ "Unexpected writer type: ~a")
+ (G_ "Unexpected writer type: ~a")
(list to) #f)]))
diff --git a/module/calp/entry-points/html.scm b/module/calp/entry-points/html.scm
index 2aa7e0e2..de229533 100644
--- a/module/calp/entry-points/html.scm
+++ b/module/calp/entry-points/html.scm
@@ -31,21 +31,21 @@
(define opt-spec
`((from (value #t) (single-char #\F)
- (description ,(_ "Start date of output."))
+ (description ,(G_ "Start date of output."))
)
(count (value #t)
- (description ,(xml->sxml (_ "<group>How many pages should be rendered.
+ (description ,(xml->sxml (G_ "<group>How many pages should be rendered.
If --style=<b>week</b> and --from=<b>2020-04-27</b>;
then --count=<b>4</b> would render the four pages
2020-04-27, 2020-05-04, 2020-05-11, and 2020-05-25.
Defaults to 12 to give a whole year when --style=<b>month</b></group>"))))
(target (single-char #\t) (value #t)
- (description ,(xml->sxml (_ "<group>Directory where html files should end up. Default to <b>./html</b></group>"))))
+ (description ,(xml->sxml (G_ "<group>Directory where html files should end up. Default to <b>./html</b></group>"))))
(style (value #t) (predicate ,(lambda (v) (memv (string->symbol v)
'(small wide week table))))
- (description ,(xml->sxml (_ "<group>How the body of the HTML page should be layed out.
+ (description ,(xml->sxml (G_ "<group>How the body of the HTML page should be layed out.
<br/><b>week</b>
gives a horizontally scrolling page with 7 elements, where each has events
graphically laid out hour by hour.
@@ -56,10 +56,10 @@ given day, in order of start time. They are however not graphically sized.
is the same as week, but gives a full month.</group>"))))
(standalone
- (description ,(xml->sxml (_ "<group>Creates a standalone document instead of an HTML fragment
+ (description ,(xml->sxml (G_ "<group>Creates a standalone document instead of an HTML fragment
for embedding in a larger page. Currently only applies to the <i>small</i> style</group>"))))
- (help (single-char #\h) (description ,(_ "Print this help.")))))
+ (help (single-char #\h) (description ,(G_ "Print this help.")))))
@@ -81,9 +81,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 (G_ "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 (G_ "~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.
@@ -113,7 +113,7 @@ for embedding in a larger page. Currently only applies to the <i>small</i> style
(stream-for-each
(lambda (start-date)
(define fname (path-append target-directory (date->string start-date "~1.xml")))
- (format (current-error-port) (_ "Writing to [~a]~%") fname)
+ (format (current-error-port) (G_ "Writing to [~a]~%") fname)
(with-output-to-file fname
(lambda () (sxml->xml (re-root-static
(apply html-generate
@@ -178,7 +178,7 @@ for embedding in a larger page. Currently only applies to the <i>small</i> style
pre-start: (start-of-week start)
post-end: (end-of-week (end-of-month start)))]
[else
- (scm-error 'misc-error "html-main" (_ "Unknown html style: ~a") (list style) #f)])
+ (scm-error 'misc-error "html-main" (G_ "Unknown html style: ~a") (list style) #f)])
- ((@ (calp util time) report-time!) (_ "all done"))
+ ((@ (calp util time) report-time!) (G_ "all done"))
)
diff --git a/module/calp/entry-points/ical.scm b/module/calp/entry-points/ical.scm
index e164c340..3720d8db 100644
--- a/module/calp/entry-points/ical.scm
+++ b/module/calp/entry-points/ical.scm
@@ -12,9 +12,9 @@
(define opt-spec
`((from (value #t) (single-char #\F))
(to (value #t) (single-char #\T)
- (description ,(_ "Returns all elements between these two dates.")))
+ (description ,(G_ "Returns all elements between these two dates.")))
(help (single-char #\h)
- (description ,(_ "Print this help.")))))
+ (description ,(G_ "Print this help.")))))
(define (main args)
(define opts (getopt-long args (getopt-opt opt-spec)))
diff --git a/module/calp/entry-points/import.scm b/module/calp/entry-points/import.scm
index 00edc0d8..ecf8b939 100644
--- a/module/calp/entry-points/import.scm
+++ b/module/calp/entry-points/import.scm
@@ -16,11 +16,11 @@
(define options
`((calendar (value #t) (single-char #\c)
- (description ,(_ "Name of calendar to import into")))
+ (description ,(G_ "Name of calendar to import into")))
(file (value #t) (single-char #\f)
- (description ,(_ "ics file to import")))
+ (description ,(G_ "ics file to import")))
(help (single-char #\h)
- (description ,(_ "Print this help.")))))
+ (description ,(G_ "Print this help.")))))
(define (main args)
(define opts (getopt-long args (getopt-opt options)))
@@ -39,18 +39,18 @@
(get-calendars global-event-object)))))
(unless calendar
- (format (current-error-port) (_ "No calendar named ~s~%") cal-name)
+ (format (current-error-port) (G_ "No calendar named ~s~%") cal-name)
(throw 'return))
(let ((new-events (parse-cal-path fname)))
- (format #t (_ "About to import the following ~a events into ~a~%")
+ (format #t (G_ "About to import the following ~a events into ~a~%")
(length (children new-events))
(prop calendar 'NAME))
(format #t "~{~a~^~%~}~%"
(map (extract 'SUMMARY) (children new-events)))
- (format #t (_ "Continue? [Y/n] "))
+ (format #t (G_ "Continue? [Y/n] "))
(let loop ((line (read-line)))
(case (if (string-null? line) 'yes (yes-no-check line))
diff --git a/module/calp/entry-points/server.scm b/module/calp/entry-points/server.scm
index 903d085d..08c9d43a 100644
--- a/module/calp/entry-points/server.scm
+++ b/module/calp/entry-points/server.scm
@@ -17,22 +17,22 @@
(define options
`((port (value #t) (single-char #\p)
- (description ,(xml->sxml (_ "<group>Bind to TCP port, defaults to <i>8080</i>.
+ (description ,(xml->sxml (G_ "<group>Bind to TCP port, defaults to <i>8080</i>.
<br/>Can also be set through the config variable
<i>port</i>.</group>"))))
(addr (value #t)
- (description ,(xml->sxml (_ "<group>Address to use, defaults to <i>0.0.0.0</i> for IPv4,
+ (description ,(xml->sxml (G_ "<group>Address to use, defaults to <i>0.0.0.0</i> for IPv4,
and <i>[::]</i> for IPv6</group>"))))
;; numbers as single-char doesn't work.
- (six (description ,(_ "Use IPv6.")))
- (four (description ,(_ "Use IPv4.")))
- (sigusr (description ,(_ "Reload events on SIGUSR1")))
+ (six (description ,(G_ "Use IPv6.")))
+ (four (description ,(G_ "Use IPv4.")))
+ (sigusr (description ,(G_ "Reload events on SIGUSR1")))
(help (single-char #\h)
- (description ,(_ "Print this help.")))))
+ (description ,(G_ "Print this help.")))))
(define-config port 8080
- description: (_ "Port to which the web server should bind."))
+ description: (G_ "Port to which the web server should bind."))
(define (main args)
@@ -59,12 +59,12 @@ and <i>[::]</i> for IPv6</group>"))))
"::" "0.0.0.0")))
(when (option-ref opts 'sigusr #f)
- (format (current-error-port) (_ "Listening for SIGUSR1~%"))
+ (format (current-error-port) (G_ "Listening for SIGUSR1~%"))
;; NOTE this uses the main thread, and does therefore block HTTP requests
;; while reloading. However, it appears to not cause any race conditions.
(sigaction SIGUSR1
(lambda _
- (format (current-error-port) (_ "Received SIGUSR1, reloading calendars~%"))
+ (format (current-error-port) (G_ "Received SIGUSR1, reloading calendars~%"))
((@ (vcomponent util instance) reload)))))
@@ -74,7 +74,7 @@ and <i>[::]</i> for IPv6</group>"))))
;; Port which we listen to
;; PID of this process
;; PWD of this process
- (format #t (_ "Starting server on ~a:~a~%I'm ~a, runing from ~a~%")
+ (format #t (G_ "Starting server on ~a:~a~%I'm ~a, runing from ~a~%")
addr port%
(getpid) (getcwd))
diff --git a/module/calp/entry-points/terminal.scm b/module/calp/entry-points/terminal.scm
index dd35b8f3..9a1b8b00 100644
--- a/module/calp/entry-points/terminal.scm
+++ b/module/calp/entry-points/terminal.scm
@@ -11,8 +11,8 @@
(define options
`((date (value #t) (single-char #\d)
- (description ,(_ "Which date to start on.")))
- (help (single-char #\t) (description ,(_ "Print this help.")))
+ (description ,(G_ "Which date to start on.")))
+ (help (single-char #\t) (description ,(G_ "Print this help.")))
))
(define (main args)
diff --git a/module/calp/entry-points/text.scm b/module/calp/entry-points/text.scm
index 775245eb..127798ce 100644
--- a/module/calp/entry-points/text.scm
+++ b/module/calp/entry-points/text.scm
@@ -12,11 +12,11 @@
(define options
`((width (value #t) (single-char #\w)
- (description ,(_ "Width of written text, defaults to 70 chars.")))
+ (description ,(G_ "Width of written text, defaults to 70 chars.")))
(file (value #t) (single-char #\f)
- (description ,(xml->sxml (_ "<group>Read from <i>file</i> instead of standard input.</group>"))))
+ (description ,(xml->sxml (G_ "<group>Read from <i>file</i> instead of standard input.</group>"))))
(help (single-char #\h)
- (description ,(_ "Prints this help.")))))
+ (description ,(G_ "Prints this help.")))))
(define (main args)
(define opts (getopt-long args (getopt-opt options)))
diff --git a/module/calp/entry-points/tidsrapport.scm b/module/calp/entry-points/tidsrapport.scm
index a50f0659..b5b9564f 100644
--- a/module/calp/entry-points/tidsrapport.scm
+++ b/module/calp/entry-points/tidsrapport.scm
@@ -165,19 +165,19 @@ trailer
(define opt-spec
`((pdf (value #t)
- (description ,(_ "Input pdf file")))
+ (description ,(G_ "Input pdf file")))
(output (single-char #\o) (value optional)
- (description ,(_ "Output file")))
+ (description ,(G_ "Output file")))
(data (value optional)
- (description ,(_ "Static data to fill fields with"))
+ (description ,(G_ "Static data to fill fields with"))
)
(template (value optional)
- (description ,(xml->sxml (_ "<group>Map between real field names and human readable names.<br/>
+ (description ,(xml->sxml (G_ "<group>Map between real field names and human readable names.<br/>
If data is given, but not trans, then data is assumed to be in a correct format</group>"))))
(search (value #t)
(description
- ,(_ "Search term for dynamic filling. Supports basic globbing")))))
+ ,(G_ "Search term for dynamic filling. Supports basic globbing")))))
(define (parse-search str)
(cond [(string-match "\\{(.*)\\}" str)
@@ -203,7 +203,7 @@ If data is given, but not trans, then data is assumed to be in a correct format<
(define template
(call-with-input-file
(or (option-ref opts 'template #f)
- (error (_ "Template required")))
+ (error (G_ "Template required")))
read))
(define prepared-data
@@ -231,9 +231,9 @@ If data is given, but not trans, then data is assumed to be in a correct format<
(define days
(let ((days (assoc-ref group 'days)))
(cond ((not (list? days))
- (error (_ "Needs list, not pair")))
+ (error (G_ "Needs list, not pair")))
((null? days)
- (error (_ "Need more days")))
+ (error (G_ "Need more days")))
((and (list? (car days)) (eqv? '- (caar days)))
(map (lambda (s) (string-append prefix (->string s)))
(iota (1+ (- (list-ref (car days) 2)
@@ -249,7 +249,7 @@ If data is given, but not trans, then data is assumed to be in a correct format<
,@(build-alist work-hours days)
(,sum ,(apply + work-hours))))
(or (assoc-ref template 'groups)
- (error (_ "Groups required in template")))
+ (error (G_ "Groups required in template")))
search)))
(define report
diff --git a/module/calp/entry-points/update-zoneinfo.scm b/module/calp/entry-points/update-zoneinfo.scm
index b565faeb..c6be1af3 100644
--- a/module/calp/entry-points/update-zoneinfo.scm
+++ b/module/calp/entry-points/update-zoneinfo.scm
@@ -14,7 +14,7 @@
:use-module (calp translation))
(define opt-spec
- `((help (single-char #\h) (description ,(_ "Print this help.")))))
+ `((help (single-char #\h) (description ,(G_ "Print this help.")))))
(define (main args)
(define opts (getopt-long args (getopt-opt opt-spec)))
@@ -27,7 +27,7 @@
(path-append (xdg-data-home) "tzget")))
(filename (or (find file-exists? locations)
(scm-error 'missing-helper "update-zoneinfo"
- (_ "tzget not installed, please put it in one of ~a")
+ (G_ "tzget not installed, please put it in one of ~a")
(list locations)
(list "tzget" locations))))