summaryrefslogtreecommitdiff
path: root/config/locales
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-01 00:24:10 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-01 00:24:10 +0200
commit95955abaa339098755a214cfcadf87c90211fe64 (patch)
treea3ad7a789e71b20c7c760dc1b09f3efcea3f0331 /config/locales
parent51629c5c42270a346885057a441095c964101cc1 (diff)
Add RRULE humanizer and wire events into nodes#showerdgeist-revive-events
- app/models/concerns/rrule_humanizer.rb: new concern included into Event, renders recurring schedule as natural-language German or English from RRULE string; handles WEEKLY/MONTHLY, biweekly (INTERVAL=2), ordinal weekday positions (1TU, -1TH, -2WE), BYMONTH single-month exclusions (December pause convention); gracefully returns nil for COUNT/UNTIL/unrecognized shapes - test/models/concerns/rrule_humanizer_test.rb: 15 tests covering all distinct RRULE shapes found in production data - app/helpers/nodes_helper.rb: add event_schedule_text helper combining humanize_rrule with start_time formatting - app/views/nodes/show.html.erb: add events row, conditionally rendered when node has associated events - config/locales/de.yml, en.yml: add event_schedule_time, event_schedule_unrecognized, event_schedule_none keys
Diffstat (limited to 'config/locales')
-rw-r--r--config/locales/de.yml3
-rw-r--r--config/locales/en.yml3
2 files changed, 6 insertions, 0 deletions
diff --git a/config/locales/de.yml b/config/locales/de.yml
index 5f77d79..0b42dd3 100644
--- a/config/locales/de.yml
+++ b/config/locales/de.yml
@@ -7,6 +7,9 @@ de:
7 sponsors: Sponsoren 7 sponsors: Sponsoren
8 show_tag_headline: "Seiten mit dem Tag:" 8 show_tag_headline: "Seiten mit dem Tag:"
9 old_ccc_de: das alte ccc.de 9 old_ccc_de: das alte ccc.de
10 event_schedule_time: "um %{time} Uhr"
11 event_schedule_unrecognized: "Termin-Regel nicht automatisch lesbar"
12 event_schedule_none: "Kein Termin"
10 date: 13 date:
11 formats: 14 formats:
12 default: "%d.%m.%Y" 15 default: "%d.%m.%Y"
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 2458d4d..93a0d55 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -8,6 +8,9 @@ en:
8 hello: "Hello world" 8 hello: "Hello world"
9 show_tag_headline: "Pages tagged with:" 9 show_tag_headline: "Pages tagged with:"
10 old_ccc_de: the old ccc.de 10 old_ccc_de: the old ccc.de
11 event_schedule_time: "at %{time}"
12 event_schedule_unrecognized: "Schedule not automatically readable"
13 event_schedule_none: "No schedule"
11 14
12 time: 15 time:
13 formats: 16 formats: