Commit 2c99274b57

2c99274b57f77c27321364b6b785f7879e8597c2

parent: 7e501c1c3d

Verified · cmc

cmc <hello@cleberg.net> · 2026-11-22 20:54 UTC

German: agenda title and gutter labels

The Mac agenda's title leaves out the year when the days shown are in
the current year, so "22. Nov. – 1. Dez." fits at the default width.
Gutter statuses on the Mac and iOS wrap to a second line instead of
shrinking, so "2d überfällig" has the size of "vor 3d".

Ref #224

Layout: unified · split

Sources/Orgstar/AgendaRowView.swift +2 −2
@@ -71,8 +71,8 @@ struct AgendaRowView: View {
71 Text(lines[0]) 71 Text(lines[0])
72 .font(.callout.weight(row.status == .overdue || row.status == .dueSoon ? .semibold : .regular).monospacedDigit()) 72 .font(.callout.weight(row.status == .overdue || row.status == .dueSoon ? .semibold : .regular).monospacedDigit())
73 .foregroundStyle(statusColor) 73 .foregroundStyle(statusColor)
74 .lineLimit(1) 74 .lineLimit(2)
75 .minimumScaleFactor(0.8) 75 .fixedSize(horizontal: false, vertical: true)
76 if lines.count > 1 { 76 if lines.count > 1 {
77 Text(lines[1]).font(.caption.monospacedDigit()).foregroundStyle(.secondary) 77 Text(lines[1]).font(.caption.monospacedDigit()).foregroundStyle(.secondary)
78 } 78 }
Sources/Orgstar/AgendaView+Toolbar.swift +9 −6
@@ -120,18 +120,21 @@ extension AgendaView {
120 return shown.isEmpty ? "No folders" : shown.map { ($0 as NSString).lastPathComponent }.joined(separator: ", ") 120 return shown.isEmpty ? "No folders" : shown.map { ($0 as NSString).lastPathComponent }.joined(separator: ", ")
121 } 121 }
122 122
123 /// The span shown, as the window's title: `Week of 5 Oct 2026`. 123 /// The span shown, as the window's title: `Week of 5 Oct`, with the year when it isn't
124 /// the current one.
124 var title: String { 125 var title: String {
125 guard isAgenda else { return viewName.replacingOccurrences(of: "…", with: "") } 126 guard isAgenda else { return viewName.replacingOccurrences(of: "…", with: "") }
126 guard let first = agenda.days.first?.day, let last = agenda.days.last?.day else { return "Agenda" } 127 guard let first = agenda.days.first?.day, let last = agenda.days.last?.day else { return "Agenda" }
128 let thisYear = Days.date(agenda.today).year
129 let year = Days.date(first).year == thisYear && Days.date(last).year == thisYear ? "" : " yyyy"
127 switch spanKind { 130 switch spanKind {
128 case .day: return Self.format(first, "EEEE d MMMM yyyy") 131 case .day: return Self.format(first, "EEEE d MMMM" + year)
129 case .week: return "Week of " + Self.format(first, "d MMM yyyy") 132 case .week: return "Week of " + Self.format(first, "d MMM" + year)
130 case .month: return Self.format(first, "MMMM yyyy") 133 case .month: return Self.format(first, "MMMM" + year)
131 case nil: 134 case nil:
132 if first == last { return Self.format(first, "EEEE d MMMM yyyy") } 135 if first == last { return Self.format(first, "EEEE d MMMM" + year) }
133 let sameYear = Days.date(first).year == Days.date(last).year 136 let sameYear = Days.date(first).year == Days.date(last).year
134 return Self.format(first, sameYear ? "d MMM" : "d MMM yyyy") + " – " + Self.format(last, "d MMM yyyy") 137 return Self.format(first, sameYear ? "d MMM" : "d MMM yyyy") + " – " + Self.format(last, "d MMM" + year)
135 } 138 }
136 } 139 }
137 140
Sources/OrgstarMobile/AgendaScreen.swift +2 −3
@@ -1070,9 +1070,8 @@ struct AgendaRowView: View {
1070 Text(row.gutter) 1070 Text(row.gutter)
1071 .font(.caption.weight(.medium).monospacedDigit()) 1071 .font(.caption.weight(.medium).monospacedDigit())
1072 .foregroundStyle(statusColor) 1072 .foregroundStyle(statusColor)
1073 .lineLimit(1) 1073 .lineLimit(2)
1074 .allowsTightening(true) 1074 .fixedSize(horizontal: false, vertical: true)
1075 .minimumScaleFactor(0.8)
1076 } 1075 }
1077 if let symbol = row.symbol { 1076 if let symbol = row.symbol {
1078 Image(systemName: symbol) 1077 Image(systemName: symbol)
docs/manual/guide/07-agenda.org +1 −1
@@ -87,7 +87,7 @@ The Day, Week and Month control in the toolbar, or =v d=, =v w= and =v m=, shows
87 87
88To return to the configured span, choose Agenda from the view menu. 88To return to the configured span, choose Agenda from the view menu.
89 89
90The window's title names the days shown: =Thursday 8 October 2026= for a day, =Week of 5 Oct 2026=, =October 2026=, or the first and last day for the configured span, =5 Oct – 14 Oct 2026=. 90The window's title names the days shown: =Thursday 8 October= for a day, =Week of 5 Oct=, =October=, or the first and last day for the configured span, =5 Oct – 14 Oct=. The year is added when the days aren't all in the current year, as in =28 Dec 2026 – 6 Jan 2027=.
91 91
92** Moving through days 92** Moving through days
93 93