From e9d6798e9cf79d54f64171eda6fa9102fffe1f30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Mon, 11 Sep 2023 20:45:45 +0200 Subject: Document text modules. --- module/text/markup.scm | 1 + module/text/numbers.scm | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'module/text') diff --git a/module/text/markup.scm b/module/text/markup.scm index a7a905df..62f93b0c 100644 --- a/module/text/markup.scm +++ b/module/text/markup.scm @@ -65,6 +65,7 @@ (map (lambda (line) (sxml->ansi-text `(group (ws (@ (minwidth 4))) ,line (br)))) (flow-text (string-concatenate (map sxml->ansi-text body)) + ;; TODO shouldn't this use (- width 4)? width: 66)))] [(ws) (make-string (aif (assoc-ref args 'minwidth) (car it) 1) diff --git a/module/text/numbers.scm b/module/text/numbers.scm index c45016bc..7909573b 100644 --- a/module/text/numbers.scm +++ b/module/text/numbers.scm @@ -2,10 +2,16 @@ :use-module (srfi srfi-88) :export (number->string-cardinal number->string-ordinal + resolve-language each-string)) (define (get mod-symb proc-symb) - (module-ref (resolve-interface `(text numbers ,mod-symb)) + (module-ref (catch 'misc-error + (lambda () (resolve-interface `(text numbers ,mod-symb))) + (lambda (err proc fmt args data) + ;; Possibly check if the err message starts with + ;; "no code for module" + (resolve-interface '(text numbers en)))) proc-symb)) ;; "sv_SE.UTF-8" -- cgit v1.2.3