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 {
7171 Text(lines[0])
7272 .font(.callout.weight(row.status == .overdue || row.status == .dueSoon ? .semibold : .regular).monospacedDigit())
7373 .foregroundStyle(statusColor)
74 .lineLimit(1)
75 .minimumScaleFactor(0.8)
74 .lineLimit(2)
75 .fixedSize(horizontal: false, vertical: true)
7676 if lines.count > 1 {
7777 Text(lines[1]).font(.caption.monospacedDigit()).foregroundStyle(.secondary)
7878 }
Sources/Orgstar/AgendaView+Toolbar.swift +9 −6
@@ -120,18 +120,21 @@ extension AgendaView {
120120 return shown.isEmpty ? "No folders" : shown.map { ($0 as NSString).lastPathComponent }.joined(separator: ", ")
121121 }
122122
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.
124125 var title: String {
125126 guard isAgenda else { return viewName.replacingOccurrences(of: "…", with: "") }
126127 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"
127130 switch spanKind {
128 case .day: return Self.format(first, "EEEE d MMMM yyyy")
129 case .week: return "Week of " + Self.format(first, "d MMM yyyy")
130 case .month: return Self.format(first, "MMMM yyyy")
131 case .day: return Self.format(first, "EEEE d MMMM" + year)
132 case .week: return "Week of " + Self.format(first, "d MMM" + year)
133 case .month: return Self.format(first, "MMMM" + year)
131134 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) }
133136 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)
135138 }
136139 }
137140
Sources/OrgstarMobile/AgendaScreen.swift +2 −3
@@ -1070,9 +1070,8 @@ struct AgendaRowView: View {
10701070 Text(row.gutter)
10711071 .font(.caption.weight(.medium).monospacedDigit())
10721072 .foregroundStyle(statusColor)
1073 .lineLimit(1)
1074 .allowsTightening(true)
1075 .minimumScaleFactor(0.8)
1073 .lineLimit(2)
1074 .fixedSize(horizontal: false, vertical: true)
10761075 }
10771076 if let symbol = row.symbol {
10781077 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
8787
8888To return to the configured span, choose Agenda from the view menu.
8989
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=.
9191
9292** Moving through days
9393