From a6bc74e67a3a3442533cd46f5e8a8d5f129cea07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Thu, 16 Jun 2022 02:13:21 +0200 Subject: Fix comments being constantly added to po files. xgettext:s comment fetcher doesn't handle the same source string at multiple places, with different comments. Meaning that at those places all comments were copied over each time. This commit remove the problematic comments from the source code. --- module/calp/html/caltable.scm | 3 ++- module/calp/html/vcomponent.scm | 6 +----- module/calp/html/view/calendar.scm | 3 --- module/calp/html/view/calendar/week.scm | 2 -- module/calp/terminal.scm | 2 -- module/vcomponent/datetime/output.scm | 4 +++- po/sv.po | 38 --------------------------------- 7 files changed, 6 insertions(+), 52 deletions(-) diff --git a/module/calp/html/caltable.scm b/module/calp/html/caltable.scm index b6d7f45f..c8a225a1 100644 --- a/module/calp/html/caltable.scm +++ b/module/calp/html/caltable.scm @@ -55,7 +55,8 @@ `(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 069b9a28..4e54de89 100644 --- a/module/calp/html/vcomponent.scm +++ b/module/calp/html/vcomponent.scm @@ -69,9 +69,7 @@ "unknown"))))) (time ,(let ((dt (prop event 'DTSTART))) (if (datetime? dt) - ;; Compact event list date + time (datetime->string dt (_ "~Y-~m-~d ~H:~M")) - ;; Compact event list date only (date->string dt (_ "~Y-~m-~d") )))) (a (@ (href ,(date->string (as-date (prop event 'DTSTART)) "/week/~Y-~m-~d.html"))) ;; Button for viewing calendar, accompanied by a calendar icon @@ -237,9 +235,7 @@ (let ((date (car day)) (events (cdr day))) `(section (@ (class "text-day")) - (header (h2 ,(let ((s (date->string date - ;; Header for sidebar day - (_ "~Y-~m-~d")))) + (header (h2 ,(let ((s (date->string date (_ "~Y-~m-~d")))) `(a (@ (href "#" ,s) (class "hidelink")) ,s)))) ,@(stream->list diff --git a/module/calp/html/view/calendar.scm b/module/calp/html/view/calendar.scm index a6ebdfba..705fa42a 100644 --- a/module/calp/html/view/calendar.scm +++ b/module/calp/html/view/calendar.scm @@ -91,9 +91,7 @@ (content "width=device-width, initial-scale=0.5"))) (meta (@ (name description) (content ,(format #f (_ "Calendar for the dates between ~a and ~a") - ;; start date metainfo (date->string start-date (_ "~Y-~m-~d")) - ;; end date metainfo (date->string end-date (_ "~Y-~m-~d")))))) ;; NOTE this is only for the time actually part of this calendar. ;; overflowing times from pre-start and post-end is currently ignored here. @@ -155,7 +153,6 @@ window.default_calendar='~a';" (footer (@ (style "grid-area: footer")) (span ,(_ "Page generated ") - ;; Generation data ,(date->string (current-date) (_ "~Y-~m-~d"))) (span ,(_ "Current time ") (current-time (@ (interval 1)))) (span (a (@ (href ,(repo-url))) diff --git a/module/calp/html/view/calendar/week.scm b/module/calp/html/view/calendar/week.scm index ed3f00ec..78abcfbf 100644 --- a/module/calp/html/view/calendar/week.scm +++ b/module/calp/html/view/calendar/week.scm @@ -34,7 +34,6 @@ ;; Top left area (div (@ (class "week-indicator")) (span (@ (style "font-size: 50%")) - ;; Week number prefix ,(_ "v.")) ,@(->> (week-number start-date) number->string string->list @@ -48,7 +47,6 @@ ,@(map (lambda (day-date) `(div (@ (class "meta")) (span (@ (class "daydate")) - ;; Week view header format ,(date->string day-date (_ "~Y-~m-~d"))) (span (@ (class "dayname")) ;; TODO translation here? diff --git a/module/calp/terminal.scm b/module/calp/terminal.scm index a0fafd11..7cf354d8 100644 --- a/module/calp/terminal.scm +++ b/module/calp/terminal.scm @@ -157,7 +157,6 @@ (let ((start (prop ev 'DTSTART))) (if (datetime? start) (datetime->string (prop ev 'DTSTART) - ;; Event start date-time terminal view (_ "~Y-~m-~d ~H:~M:~S")) (date->string start)))) (format #t "\x1b[1m~a:\x1b[m ~a~%~%" @@ -165,7 +164,6 @@ (let ((start (prop ev 'DTSTART))) (if (datetime? start) (datetime->string (prop ev 'DTSTART) - ;; Event end date-time terminal view (_ "~Y-~m-~d ~H:~M:~S")) (date->string start)))) (format #t "~a~%" diff --git a/module/vcomponent/datetime/output.scm b/module/vcomponent/datetime/output.scm index f4085bbf..b75fd564 100644 --- a/module/vcomponent/datetime/output.scm +++ b/module/vcomponent/datetime/output.scm @@ -58,8 +58,9 @@ => (lambda (s) (cond [(prop ev 'DTEND) => (lambda (e) + ;; start = end, only return one value (if (date= e (date+ s (date day: 1))) - (_ "~Y-~m-~d") ; start = end, only return one value + (_ "~Y-~m-~d") (values (_ "~Y-~m-~d") (_ "~Y-~m-~d"))))] ;; no end value, just return start @@ -72,6 +73,7 @@ (_ "~H:~M") ;; Note the non-breaking space (_ "~Y-~m-~d ~H:~M")))) + (values fmt-str fmt-str)) ;; Note the non-breaking space (_ "~Y-~m-~d ~H:~M")))])) diff --git a/po/sv.po b/po/sv.po index 28d6ae12..43518cbf 100644 --- a/po/sv.po +++ b/po/sv.po @@ -125,9 +125,6 @@ msgid "Groups required in template" msgstr "Grupper krävs i mallen" #. Week number prefix -#. Cell 0, 0. The letter v. for week number -#. Week number prefix -#. Cell 0, 0. The letter v. for week number msgid "v." msgstr "v." @@ -429,14 +426,6 @@ msgstr "== Dagsvy ==\n" msgid "Start" msgstr "Start" -#. Event start date-time terminal view -#. Event end date-time terminal view -#. Event start date-time terminal view -#. Event end date-time terminal view -#. Event start date-time terminal view -#. Event end date-time terminal view -#. Event start date-time terminal view -#. Event end date-time terminal view msgid "~Y-~m-~d ~H:~M:~S" msgstr "~Y-~m-~d ~H:~M:~S" @@ -816,33 +805,6 @@ msgid "

benchmark module
Runs the procedure 'run-" msgstr "

benchmark modul
Kör proceduren 'run-benchmark' " "från modulen (calp benchmark modul).

" -#. Week view header format -#. start date metainfo -#. end date metainfo -#. Generation data -#. Compact event list date only -#. Header for sidebar day -#. Week view header format -#. start date metainfo -#. end date metainfo -#. Generation data -#. Compact event list date only -#. Header for sidebar day -#. start = end, only return one value -#. Week view header format -#. start date metainfo -#. end date metainfo -#. Generation data -#. Compact event list date only -#. Header for sidebar day -#. start = end, only return one value -#. Week view header format -#. start date metainfo -#. end date metainfo -#. Generation data -#. Compact event list date only -#. Header for sidebar day -#. start = end, only return one value msgid "~Y-~m-~d" msgstr "~Y-~m-~d" -- cgit v1.2.3