Compare commits

..
Author SHA1 Message Date
95ad3a30cf Release v2.24.1 (#504)
Release — F-Droid repo + Gitea/Codeberg release + Play / detect (push) Successful in 6s
Renovate / renovate (push) Successful in 1m20s
Release — F-Droid repo + Gitea/Codeberg release + Play / release (push) Successful in 19m27s
Release — F-Droid repo + Gitea/Codeberg release + Play / play (push) Successful in 1m58s
- Agenda widget: Cards / Classic style option, opacity slider for all Solid/Tinted widgets (#489)
- Month widget fits events into short week rows (#491)
- Week numbers follow the locale's rules and the row's first day (#493)
- Readable dimmed events in dark widgets, pinned Light/Dark theme matches system colours (#475)
- Dropped unused WorkManager permissions: network state, wake lock, foreground service (#448)
- Weblate translations (#434), incl. the Arabic string from after the 2.24.0 squash
- Version 2.24.1 (2240199), CHANGELOG, What's New in all store locales

#489 deviates from the issue: the classic look comes back as a style option instead of replacing the new design.

Closes #489
Closes #491
Closes #493
Closes #475
Closes #448

Co-authored-by: Jean-Luc Makiola <business@jeanlucmakiola.de>
Co-authored-by: Sup99999 <alelmnour1o234@proton.me>
Co-authored-by: Anonymous <noreply@weblate.org>
Co-authored-by: Louis Leblanc <sandraev@posteo.dk>
Co-authored-by: Dmitri Gabinski <dkgabi@gmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
Reviewed-on: https://codeberg.org/jlmakiola/calendula/pulls/504
2026-11-13 11:17:48 +01:00
Jean-Luc Makiola 8ce4831efa Translations update from Weblate (#434)
Release — F-Droid repo + Gitea/Codeberg release + Play / detect (push) Successful in 12s
Release — F-Droid repo + Gitea/Codeberg release + Play / release (push) Skipped
Release — F-Droid repo + Gitea/Codeberg release + Play / play (push) Skipped
Renovate / renovate (push) Successful in 2m59s
Reviewed-on: https://codeberg.org/jlmakiola/calendula/pulls/434
2026-11-13 11:07:42 +01:00
2 changed files with 30 additions and 9 deletions

No files matched your search

@@ -8,9 +8,9 @@ import java.util.Locale
* out in [locale]'s own order, with the year shown only when [date] falls outside
* [currentYear].
*
* Pass [skeleton] *without* a year field, e.g. "LLLL" for a month. A skeleton
* is a field list, so wanting the year is just asking for one more field; the
* locale still decides where it lands ("July 2026" vs "2026年7月").
* Pass [skeleton] *without* a year field — "LLLL" for a month, "EEEdMMM" for a
* day. A skeleton is a field list, so wanting the year is just asking for one
* more field; the locale still decides where it lands ("July 2026" vs "2026年7月").
*
* Dropping the year in the current year is the one bit of policy here: the title
* sits directly above a grid that already says which year it is, and the year's
@@ -310,6 +310,14 @@ internal enum class TimelineKind(
// A run of days often straddles two weeks, so no single number fits it.
MultiDay(showWeekNumber = false, todayText = R.string.week_today_action, headerBias = 0f),
Day(showWeekNumber = false, todayText = R.string.day_today_action, headerBias = -1f),
;
fun title(start: LocalDate, end: LocalDate, locale: Locale, currentYear: Int, abbreviated: Boolean): String =
if (this == Day) {
formatDayTitle(start, locale, currentYear, abbreviated)
} else {
formatWeekTitle(start, end, locale, currentYear, abbreviated)
}
}
internal val CalendarView.timelineKind: TimelineKind
@@ -484,10 +492,9 @@ private fun PagedTimelineScreen(
val jumpToToday = { jumpToDate(today) }
val locale = currentLocale()
// The day view names the month too: its header already shows weekday and date (#501).
val (title, shortTitle) = remember(weekStart, weekEnd, locale, today.year) {
formatTimelineTitle(weekStart, weekEnd, locale, today.year, abbreviated = false) to
formatTimelineTitle(weekStart, weekEnd, locale, today.year, abbreviated = true)
val (title, shortTitle) = remember(titleKind, weekStart, weekEnd, locale, today.year) {
titleKind.title(weekStart, weekEnd, locale, today.year, abbreviated = false) to
titleKind.title(weekStart, weekEnd, locale, today.year, abbreviated = true)
}
PublishChrome(
ScreenChrome(
@@ -2009,7 +2016,7 @@ private fun minToHm(min: Int, is24Hour: Boolean, locale: java.util.Locale): Stri
formatMinuteOfDay(min, is24Hour, locale)
/**
* Every timeline's title, the day view's included: just the month [weekStart] falls in.
* The week's title: just the month [weekStart] falls in.
*
* The day numbers are already in the column headers directly below, so spelling
* out "13.–19. Jul" restates them in the widest string in the bar. Naming the
@@ -2024,7 +2031,7 @@ private fun minToHm(min: Int, is24Hour: Boolean, locale: java.util.Locale): Stri
* "December" with no year would be actively misleading while the reader is
* looking straight at January dates.
*/
private fun formatTimelineTitle(
private fun formatWeekTitle(
weekStart: LocalDate,
weekEnd: LocalDate,
locale: Locale,
@@ -2039,3 +2046,17 @@ private fun formatTimelineTitle(
forceYear = weekEnd.year != weekStart.year,
)
}
/** The day's title: its weekday and date, abbreviated to the date alone when short of room. */
private fun formatDayTitle(
date: LocalDate,
locale: Locale,
currentYear: Int,
abbreviated: Boolean = false,
): String =
formatCalendarTitle(
date = date.toJavaLocalDate(),
locale = locale,
currentYear = currentYear,
skeleton = if (abbreviated) "dMMM" else "EEEdMMM",
)