Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f0fae450d | ||
|
|
2b6a200d6d | ||
|
|
d0b4b04986 | ||
|
|
e3b5f01f7e | ||
|
|
6e2260134a | ||
|
|
d29faf336f | ||
|
|
f3c3f5237f |
No files matched your search
+412
-1448
File diff suppressed because it is too large.
Load diff
@@ -32,8 +32,8 @@ android {
|
||||
// (up to 2.22.3: 2.22.3 -> 22203; from 2.22.4: 2.23.0-beta.1 -> 2230001,
|
||||
// 2.22.4 -> 2220499), and CI fails if the committed one doesn't match.
|
||||
// See docs/RELEASING.md.
|
||||
versionCode = 2250002
|
||||
versionName = "2.25.0-beta.2"
|
||||
versionCode = 2250003
|
||||
versionName = "2.25.0-beta.3"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
@@ -14,13 +14,14 @@ import de.jeanlucmakiola.calendula.data.prefs.SettingsPrefs
|
||||
import de.jeanlucmakiola.calendula.data.prefs.is24Hour
|
||||
import de.jeanlucmakiola.calendula.data.prefs.resolveFirstDay
|
||||
import de.jeanlucmakiola.calendula.domain.reminders.ReminderEventInstance
|
||||
import de.jeanlucmakiola.floret.locale.capitalizeStart
|
||||
import de.jeanlucmakiola.floret.locale.localizedDateFormatter
|
||||
import kotlinx.coroutines.flow.first
|
||||
import kotlinx.datetime.isoDayNumber
|
||||
import kotlinx.datetime.toKotlinLocalDate
|
||||
import java.time.DayOfWeek
|
||||
import java.time.LocalDate
|
||||
import java.time.ZoneId
|
||||
import java.time.format.DateTimeFormatter
|
||||
import java.util.Locale
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
@@ -54,15 +55,12 @@ class DailyDigestNotifier @Inject constructor(
|
||||
val firstDayOfWeek = DayOfWeek.of(settingsPrefs.weekStart.first().resolveFirstDay(locale).isoDayNumber)
|
||||
// The date rides along: the summary stays up into the day it lists,
|
||||
// when "Tomorrow" alone would point at the wrong one.
|
||||
val date = DateTimeFormatter.ofPattern(
|
||||
android.text.format.DateFormat.getBestDateTimePattern(locale, "EEEdMMM"),
|
||||
locale,
|
||||
).format(day)
|
||||
val date = localizedDateFormatter(locale, "EEEdMMM").format(day)
|
||||
val dayLabel = when (day) {
|
||||
today -> context.getString(R.string.digest_day_relative, context.getString(R.string.reminder_day_today), date)
|
||||
today.plusDays(1) ->
|
||||
context.getString(R.string.digest_day_relative, context.getString(R.string.reminder_day_tomorrow), date)
|
||||
else -> date
|
||||
else -> date.capitalizeStart(locale)
|
||||
}
|
||||
val allDay = context.getString(R.string.event_detail_all_day)
|
||||
val lines = listed.map { entry ->
|
||||
|
||||
@@ -2,6 +2,7 @@ package de.jeanlucmakiola.calendula.data.reminders
|
||||
|
||||
import de.jeanlucmakiola.calendula.domain.runsMidnightToMidnight
|
||||
import de.jeanlucmakiola.calendula.ui.common.timeOfDayFormatter
|
||||
import de.jeanlucmakiola.floret.locale.capitalizeStart
|
||||
import java.time.DayOfWeek
|
||||
import java.time.Instant
|
||||
import java.time.LocalDate
|
||||
@@ -121,7 +122,7 @@ private fun relativeDayPrefix(
|
||||
1L -> tomorrowLabel
|
||||
-1L -> yesterdayLabel
|
||||
else -> if (isSameWeek(day, today, firstDayOfWeek)) {
|
||||
day.dayOfWeek.getDisplayName(TextStyle.SHORT, locale)
|
||||
day.dayOfWeek.getDisplayName(TextStyle.SHORT, locale).capitalizeStart(locale)
|
||||
} else {
|
||||
dateFormat.format(day)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package de.jeanlucmakiola.calendula.ui.agenda
|
||||
|
||||
import de.jeanlucmakiola.floret.locale.capitalizeStart
|
||||
import de.jeanlucmakiola.floret.locale.localizedDateFormatter
|
||||
import kotlinx.datetime.DayOfWeek
|
||||
import kotlinx.datetime.LocalDate
|
||||
@@ -118,7 +119,7 @@ fun agendaRangeWindowSummary(
|
||||
val startFmt = if (start.year == end.year) dayMonth else dayMonthYear
|
||||
"${startFmt.format(javaStart)} – ${dayMonthYear.format(javaEnd)}"
|
||||
}
|
||||
}
|
||||
}.capitalizeStart(locale)
|
||||
}
|
||||
|
||||
private const val CUSTOM_PREFIX = "CUSTOM:"
|
||||
@@ -46,6 +46,7 @@ import de.jeanlucmakiola.floret.components.Position
|
||||
import de.jeanlucmakiola.floret.components.positionOf
|
||||
import de.jeanlucmakiola.floret.identity.LocalFloretDarkTheme
|
||||
import de.jeanlucmakiola.floret.identity.animateItemMotion
|
||||
import de.jeanlucmakiola.floret.locale.capitalizeStart
|
||||
import de.jeanlucmakiola.floret.locale.currentLocale
|
||||
import de.jeanlucmakiola.floret.locale.localizedDateFormatter
|
||||
import kotlinx.datetime.DateTimeUnit
|
||||
@@ -212,7 +213,7 @@ private fun formatAgendaDate(date: LocalDate): String {
|
||||
val java = date.toJavaLocalDate()
|
||||
// Weekday + date in the locale's own field order (e.g. "Wed, Jun 17, 2026"
|
||||
// vs "Mi., 17. Juni 2026") rather than a hardcoded day-month-year layout.
|
||||
return localizedDateFormatter(locale, "EEEdMMMy").format(java)
|
||||
return localizedDateFormatter(locale, "EEEdMMMy").format(java).capitalizeStart(locale)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package de.jeanlucmakiola.calendula.ui.common
|
||||
|
||||
import de.jeanlucmakiola.floret.locale.capitalizeStart
|
||||
import de.jeanlucmakiola.floret.locale.localizedDateFormatter
|
||||
import java.util.Locale
|
||||
|
||||
@@ -30,5 +31,5 @@ fun formatCalendarTitle(
|
||||
forceYear: Boolean = false,
|
||||
): String {
|
||||
val fields = if (date.year == currentYear && !forceYear) skeleton else skeleton + "y"
|
||||
return localizedDateFormatter(locale, fields).format(date)
|
||||
return localizedDateFormatter(locale, fields).format(date).capitalizeStart(locale)
|
||||
}
|
||||
@@ -18,6 +18,7 @@ import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import de.jeanlucmakiola.calendula.R
|
||||
import de.jeanlucmakiola.calendula.domain.EventInstance
|
||||
import de.jeanlucmakiola.floret.locale.capitalizeStart
|
||||
import de.jeanlucmakiola.floret.locale.currentLocale
|
||||
import de.jeanlucmakiola.floret.locale.localizedDateFormatter
|
||||
import java.time.ZoneId
|
||||
@@ -92,5 +93,5 @@ private fun formatSelectionWhen(event: EventInstance, use24Hour: Boolean, locale
|
||||
"${day.format(start)} · ${time.format(start)}–${time.format(end)}"
|
||||
} else {
|
||||
"${day.format(start)}, ${time.format(start)} – ${day.format(end)}, ${time.format(end)}"
|
||||
}
|
||||
}.capitalizeStart(locale)
|
||||
}
|
||||
@@ -104,6 +104,7 @@ import de.jeanlucmakiola.calendula.ui.common.rememberFieldCopier
|
||||
import de.jeanlucmakiola.calendula.ui.common.icuTimeZoneRegion
|
||||
import de.jeanlucmakiola.calendula.ui.common.LocalSoftenColors
|
||||
import de.jeanlucmakiola.calendula.ui.common.eventAccent
|
||||
import de.jeanlucmakiola.floret.locale.capitalizeStart
|
||||
import de.jeanlucmakiola.floret.locale.currentLocale
|
||||
import de.jeanlucmakiola.calendula.ui.common.LocalUse24HourFormat
|
||||
import de.jeanlucmakiola.calendula.ui.common.timeOfDayFormatter
|
||||
@@ -849,7 +850,7 @@ private fun formatWhen(
|
||||
val startDate = instance.start.toJavaLocalDateTime(utc).toLocalDate()
|
||||
val lastDate = (instance.end - 1.seconds).toJavaLocalDateTime(utc).toLocalDate()
|
||||
return if (startDate == lastDate) {
|
||||
allDayLabel to dateFull.format(startDate)
|
||||
allDayLabel to dateFull.format(startDate).capitalizeStart(locale)
|
||||
} else {
|
||||
allDayLabel to "${dateMedium.format(startDate)} – ${dateMedium.format(lastDate)}"
|
||||
}
|
||||
@@ -859,7 +860,7 @@ private fun formatWhen(
|
||||
val startTime = withRepeatedHourZone(timeShort.format(startLdt), instance.start, zone, locale)
|
||||
val endTime = withRepeatedHourZone(timeShort.format(endLdt), instance.end, zone, locale)
|
||||
return if (startLdt.toLocalDate() == endLdt.toLocalDate()) {
|
||||
dateFull.format(startLdt.toLocalDate()) to "$startTime – $endTime"
|
||||
dateFull.format(startLdt.toLocalDate()).capitalizeStart(locale) to "$startTime – $endTime"
|
||||
} else {
|
||||
val start = "${dateMedium.format(startLdt.toLocalDate())} $startTime"
|
||||
val end = "${dateMedium.format(endLdt.toLocalDate())} $endTime"
|
||||
|
||||
@@ -31,6 +31,7 @@ import de.jeanlucmakiola.calendula.ui.common.morphEvent
|
||||
import de.jeanlucmakiola.calendula.ui.common.jumpToPage
|
||||
import de.jeanlucmakiola.calendula.ui.common.rememberCalendarPageSpec
|
||||
import de.jeanlucmakiola.floret.identity.LocalFloretDarkTheme
|
||||
import de.jeanlucmakiola.floret.locale.capitalizeStart
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.drop
|
||||
import androidx.compose.animation.ExperimentalSharedTransitionApi
|
||||
@@ -798,7 +799,7 @@ internal fun WeekdayHeader(weekStart: DayOfWeek, showWeekNumbers: Boolean) {
|
||||
val isWeekend = dow == DayOfWeek.SATURDAY || dow == DayOfWeek.SUNDAY
|
||||
val javaDow = dow.toJavaDayOfWeek()
|
||||
Text(
|
||||
text = javaDow.getDisplayName(JavaTextStyle.SHORT, locale),
|
||||
text = javaDow.getDisplayName(JavaTextStyle.SHORT, locale).capitalizeStart(locale),
|
||||
style = MaterialTheme.typography.labelMedium,
|
||||
color = if (isWeekend) MaterialTheme.colorScheme.onSurfaceVariant
|
||||
else MaterialTheme.colorScheme.onSurface,
|
||||
@@ -2842,6 +2843,7 @@ private fun shortMonthName(date: LocalDate): String {
|
||||
return remember(date.month, locale) {
|
||||
date.month.toJavaMonth()
|
||||
.getDisplayName(JavaTextStyle.SHORT, locale)
|
||||
.capitalizeStart(locale)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -88,6 +88,7 @@ import de.jeanlucmakiola.floret.components.Position
|
||||
import de.jeanlucmakiola.floret.components.SnackChip
|
||||
import de.jeanlucmakiola.floret.components.SnackChipHeight
|
||||
import de.jeanlucmakiola.floret.components.SnackChipMargin
|
||||
import de.jeanlucmakiola.floret.locale.capitalizeStart
|
||||
import de.jeanlucmakiola.floret.locale.currentLocale
|
||||
import de.jeanlucmakiola.floret.locale.localizedDateFormatter
|
||||
import de.jeanlucmakiola.calendula.ui.common.EventDimAlpha
|
||||
@@ -470,6 +471,7 @@ private fun monthLabel(month: SearchMonth): String {
|
||||
return remember(month.year, month.monthNumber, locale) {
|
||||
localizedDateFormatter(locale, "LLLLy")
|
||||
.format(java.time.LocalDate.of(month.year, month.monthNumber, 1))
|
||||
.capitalizeStart(locale)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ import de.jeanlucmakiola.floret.components.OptionPicker
|
||||
import de.jeanlucmakiola.floret.components.Position
|
||||
import de.jeanlucmakiola.floret.components.ReorderableColumn
|
||||
import de.jeanlucmakiola.floret.components.ReorderableRowHeight
|
||||
import de.jeanlucmakiola.floret.locale.capitalizeStart
|
||||
import de.jeanlucmakiola.floret.locale.currentLocale
|
||||
import kotlinx.datetime.DayOfWeek
|
||||
import java.time.format.TextStyle as JavaTextStyle
|
||||
@@ -104,7 +105,7 @@ internal fun ViewsScreen(
|
||||
)
|
||||
GroupedRow(
|
||||
title = stringResource(R.string.settings_week_start),
|
||||
summary = weekStartLabel(state.weekStart),
|
||||
summary = weekStartLabel(state.weekStart).capitalizeStart(currentLocale()),
|
||||
position = Position.Middle,
|
||||
onClick = { showWeekStart = true },
|
||||
)
|
||||
|
||||
@@ -14,6 +14,7 @@ import de.jeanlucmakiola.floret.components.FullScreenPicker
|
||||
import de.jeanlucmakiola.floret.components.GroupedHint
|
||||
import de.jeanlucmakiola.floret.components.OptionRows
|
||||
import de.jeanlucmakiola.floret.components.ViewPreviewFrame
|
||||
import de.jeanlucmakiola.floret.locale.capitalizeStart
|
||||
import de.jeanlucmakiola.floret.locale.currentLocale
|
||||
|
||||
/**
|
||||
@@ -55,7 +56,7 @@ internal fun WeekStartPicker(
|
||||
OptionRows(
|
||||
options = options,
|
||||
selected = selected,
|
||||
label = { weekStartLabel(it) },
|
||||
label = { weekStartLabel(it).capitalizeStart(currentLocale()) },
|
||||
onSelect = onSelect,
|
||||
summary = { option ->
|
||||
if (option == WeekStartPref.Auto) {
|
||||
|
||||
@@ -21,6 +21,7 @@ import de.jeanlucmakiola.calendula.ui.common.rememberViewSwitchSpec
|
||||
import de.jeanlucmakiola.calendula.ui.common.jumpToPage
|
||||
import de.jeanlucmakiola.calendula.ui.common.pagedHeight
|
||||
import de.jeanlucmakiola.floret.identity.LocalFloretDarkTheme
|
||||
import de.jeanlucmakiola.floret.locale.capitalizeStart
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.drop
|
||||
import androidx.compose.foundation.background
|
||||
@@ -1106,7 +1107,7 @@ private fun WeekDayHeader(
|
||||
) {
|
||||
// One line, as the gutter cell beside it assumes (see WeekNumberCell).
|
||||
Text(
|
||||
text = javaDow.getDisplayName(JavaTextStyle.SHORT, locale),
|
||||
text = javaDow.getDisplayName(JavaTextStyle.SHORT, locale).capitalizeStart(locale),
|
||||
style = MaterialTheme.typography.labelSmall,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Clip,
|
||||
|
||||
@@ -11,6 +11,7 @@ import de.jeanlucmakiola.calendula.ui.agenda.agendaTimeLabel
|
||||
import de.jeanlucmakiola.calendula.ui.common.formatTimeOfDay
|
||||
import de.jeanlucmakiola.floret.glance.LocalWidgetBackground
|
||||
import de.jeanlucmakiola.floret.glance.WidgetBackground
|
||||
import de.jeanlucmakiola.floret.locale.capitalizeStart
|
||||
import de.jeanlucmakiola.floret.locale.localizedDateFormatter
|
||||
import kotlinx.datetime.DateTimeUnit
|
||||
import kotlinx.datetime.LocalDate
|
||||
|
||||
@@ -55,6 +55,7 @@ import de.jeanlucmakiola.calendula.domain.hasEnded
|
||||
import de.jeanlucmakiola.calendula.ui.agenda.anchorTodayIfMissing
|
||||
import de.jeanlucmakiola.calendula.ui.common.CalendarView
|
||||
import de.jeanlucmakiola.calendula.ui.common.formatCalendarTitle
|
||||
import de.jeanlucmakiola.floret.locale.capitalizeStart
|
||||
import de.jeanlucmakiola.floret.locale.localizedDateFormatter
|
||||
import de.jeanlucmakiola.calendula.widget.widgetEventFill
|
||||
import de.jeanlucmakiola.calendula.ui.common.eventAccent
|
||||
@@ -669,7 +670,7 @@ private fun agendaDayLabel(context: Context, date: LocalDate, today: LocalDate):
|
||||
val java = java.time.LocalDate.of(date.year, date.month.ordinal + 1, date.day)
|
||||
// Weekday + date in the locale's own field order (compact: no year), rather
|
||||
// than a hardcoded day-month layout.
|
||||
val formatted = localizedDateFormatter(locale, if (date.year == today.year) "EEEdMMM" else "EEEdMMMy").format(java)
|
||||
val formatted = localizedDateFormatter(locale, if (date.year == today.year) "EEEdMMM" else "EEEdMMMy").format(java).capitalizeStart(locale)
|
||||
return if (relative != null) "$relative · $formatted" else formatted
|
||||
}
|
||||
|
||||
@@ -680,8 +681,10 @@ private fun monthName(date: LocalDate, today: LocalDate): String = formatCalenda
|
||||
skeleton = "LLLL",
|
||||
)
|
||||
|
||||
private fun weekdayShort(date: LocalDate): String =
|
||||
date.dayOfWeek.toJavaDayOfWeek().getDisplayName(java.time.format.TextStyle.SHORT, widgetLocale())
|
||||
private fun weekdayShort(date: LocalDate): String {
|
||||
val locale = widgetLocale()
|
||||
return date.dayOfWeek.toJavaDayOfWeek().getDisplayName(java.time.format.TextStyle.SHORT, locale).capitalizeStart(locale)
|
||||
}
|
||||
|
||||
private fun eventTimeSummary(
|
||||
context: Context,
|
||||
|
||||
+2
-1
@@ -38,6 +38,7 @@ import de.jeanlucmakiola.floret.components.GroupedRow
|
||||
import de.jeanlucmakiola.floret.components.GroupedSectionHeader
|
||||
import de.jeanlucmakiola.floret.components.Position
|
||||
import de.jeanlucmakiola.floret.components.positionOf
|
||||
import de.jeanlucmakiola.floret.locale.capitalizeStart
|
||||
import de.jeanlucmakiola.floret.locale.currentLocale
|
||||
import de.jeanlucmakiola.floret.locale.localizedDateFormatter
|
||||
import kotlinx.datetime.TimeZone
|
||||
@@ -149,7 +150,7 @@ private fun CountdownEventPicker(
|
||||
val formatter = remember(locale) { localizedDateFormatter(locale, "EEEdMMMy") }
|
||||
LazyColumn(contentPadding = PaddingValues(top = 8.dp, bottom = 24.dp)) {
|
||||
itemsIndexed(matches, key = { _, it -> it.event.eventId }) { index, candidate ->
|
||||
val date = formatter.format(candidate.event.start.toLocalDateTime(candidate.event.dateZone(zone)).date.toJavaLocalDate())
|
||||
val date = formatter.format(candidate.event.start.toLocalDateTime(candidate.event.dateZone(zone)).date.toJavaLocalDate()).capitalizeStart(locale)
|
||||
GroupedRow(
|
||||
title = candidate.event.title.ifBlank { stringResource(R.string.event_untitled) },
|
||||
summary = if (candidate.repeats) stringResource(R.string.widget_config_countdown_repeats, date) else date,
|
||||
|
||||
@@ -52,12 +52,14 @@ import de.jeanlucmakiola.calendula.widget.formatWidgetTime
|
||||
import de.jeanlucmakiola.calendula.widget.relativeDayLabel
|
||||
import de.jeanlucmakiola.calendula.widget.systemZone
|
||||
import de.jeanlucmakiola.calendula.widget.widgetAppearance
|
||||
import de.jeanlucmakiola.calendula.widget.widgetLocale
|
||||
import de.jeanlucmakiola.floret.glance.wallpaperBacking
|
||||
import de.jeanlucmakiola.floret.glance.WidgetData
|
||||
import de.jeanlucmakiola.floret.glance.WidgetMessage
|
||||
import de.jeanlucmakiola.floret.glance.currentRefreshStamp
|
||||
import de.jeanlucmakiola.floret.glance.refreshStamp
|
||||
import de.jeanlucmakiola.floret.glance.themedColor
|
||||
import de.jeanlucmakiola.floret.locale.capitalizeStart
|
||||
import de.jeanlucmakiola.floret.prefs.ThemeMode
|
||||
import kotlinx.datetime.DateTimeUnit
|
||||
import kotlinx.datetime.minus
|
||||
@@ -206,14 +208,15 @@ private fun whenText(context: Context, event: EventInstance, data: CountdownData
|
||||
val at = if (running) counted.end else counted.start
|
||||
val date = at.toLocalDateTime(systemZone()).date
|
||||
val day = relativeDayLabel(context, date, data.today)
|
||||
val locale = widgetLocale()
|
||||
val wholeDays = event.coversWholeDays(systemZone())
|
||||
return when {
|
||||
wholeDays && running -> context.getString(
|
||||
R.string.widget_countdown_until,
|
||||
relativeDayLabel(context, date.minus(1, DateTimeUnit.DAY), data.today),
|
||||
)
|
||||
wholeDays -> "$day · ${context.getString(R.string.event_detail_all_day)}"
|
||||
wholeDays -> "${day.capitalizeStart(locale)} · ${context.getString(R.string.event_detail_all_day)}"
|
||||
running -> context.getString(R.string.agenda_span_ends, "$day · ${formatWidgetTime(at, data.is24Hour)}")
|
||||
else -> "$day · ${formatWidgetTime(at, data.is24Hour)}"
|
||||
else -> "${day.capitalizeStart(locale)} · ${formatWidgetTime(at, data.is24Hour)}"
|
||||
}
|
||||
}
|
||||
@@ -45,6 +45,7 @@ import de.jeanlucmakiola.floret.glance.WidgetShapedBox
|
||||
import de.jeanlucmakiola.floret.glance.currentRefreshStamp
|
||||
import de.jeanlucmakiola.floret.glance.refreshStamp
|
||||
import de.jeanlucmakiola.floret.glance.wallpaperBacking
|
||||
import de.jeanlucmakiola.floret.locale.capitalizeStart
|
||||
import de.jeanlucmakiola.floret.locale.localizedDateFormatter
|
||||
import de.jeanlucmakiola.floret.prefs.ThemeMode
|
||||
import kotlinx.datetime.LocalDate
|
||||
|
||||
@@ -83,6 +83,7 @@ import de.jeanlucmakiola.calendula.widget.widgetCardColor
|
||||
import de.jeanlucmakiola.calendula.widget.widgetEntryPoint
|
||||
import de.jeanlucmakiola.calendula.widget.widgetSettings
|
||||
import de.jeanlucmakiola.calendula.widget.widgetState
|
||||
import de.jeanlucmakiola.floret.locale.capitalizeStart
|
||||
import de.jeanlucmakiola.floret.locale.localizedDateFormatter
|
||||
import kotlinx.datetime.toJavaLocalDate
|
||||
import de.jeanlucmakiola.calendula.widget.widgetTimeLabel
|
||||
@@ -417,7 +418,7 @@ private fun DayList(day: LocalDate, data: MonthDayData.Ready, preview: Boolean)
|
||||
val metrics = compactRowMetrics(data.options.textSize, context.resources.configuration.fontScale)
|
||||
val openDay = actionStartActivity(MainActivity.openDateIntent(context, day))
|
||||
Column(modifier = GlanceModifier.fillMaxSize()) {
|
||||
val date = localizedDateFormatter(widgetLocale(), "EEEdMMM").format(day.toJavaLocalDate())
|
||||
val date = widgetLocale().let { localizedDateFormatter(it, "EEEdMMM").format(day.toJavaLocalDate()).capitalizeStart(it) }
|
||||
val label = when (day) {
|
||||
source.today, source.today.plus(1, DateTimeUnit.DAY) -> "${relativeDayLabel(context, day, source.today)} · $date"
|
||||
else -> date
|
||||
|
||||
@@ -73,6 +73,7 @@ import de.jeanlucmakiola.floret.glance.WidgetMessage
|
||||
import de.jeanlucmakiola.floret.glance.currentRefreshStamp
|
||||
import de.jeanlucmakiola.floret.glance.refreshStamp
|
||||
import de.jeanlucmakiola.floret.glance.wallpaperBacking
|
||||
import de.jeanlucmakiola.floret.locale.capitalizeStart
|
||||
import de.jeanlucmakiola.floret.locale.localizedDateFormatter
|
||||
import de.jeanlucmakiola.floret.prefs.ThemeMode
|
||||
import kotlinx.datetime.DateTimeUnit
|
||||
@@ -251,7 +252,7 @@ private fun TodayPill(today: LocalDate) {
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
Text(
|
||||
text = today.dayOfWeek.toJavaDayOfWeek().getDisplayName(JavaTextStyle.SHORT, locale),
|
||||
text = today.dayOfWeek.toJavaDayOfWeek().getDisplayName(JavaTextStyle.SHORT, locale).capitalizeStart(locale),
|
||||
maxLines = 1,
|
||||
style = TextStyle(color = GlanceTheme.colors.onPrimary, fontSize = 11.sp, textAlign = TextAlign.Center),
|
||||
)
|
||||
|
||||
@@ -60,6 +60,7 @@ import de.jeanlucmakiola.floret.glance.WidgetMessage
|
||||
import de.jeanlucmakiola.floret.glance.currentRefreshStamp
|
||||
import de.jeanlucmakiola.floret.glance.refreshStamp
|
||||
import de.jeanlucmakiola.floret.glance.wallpaperBacking
|
||||
import de.jeanlucmakiola.floret.locale.capitalizeStart
|
||||
import de.jeanlucmakiola.floret.prefs.ThemeMode
|
||||
import kotlinx.datetime.DateTimeUnit
|
||||
import kotlinx.datetime.LocalDate
|
||||
@@ -137,7 +138,7 @@ internal fun UpcomingWidgetContent(data: DaysWidgetData, appearance: WidgetAppea
|
||||
val time = widgetTimeLabel(context, event, day, data.is24Hour)
|
||||
WidgetEventRow(
|
||||
event = event,
|
||||
secondary = if (day == data.today) time else "${relativeDayLabel(context, day, data.today)} · $time",
|
||||
secondary = if (day == data.today) time else "${relativeDayLabel(context, day, data.today).capitalizeStart(widgetLocale())} · $time",
|
||||
soften = data.soften,
|
||||
metrics = metrics,
|
||||
position = positionOf(index, events.size),
|
||||
@@ -170,12 +171,12 @@ private fun DateHeader(today: LocalDate, height: Dp) {
|
||||
Spacer(GlanceModifier.width(8.dp))
|
||||
Column {
|
||||
Text(
|
||||
text = today.dayOfWeek.toJavaDayOfWeek().getDisplayName(JavaTextStyle.FULL, locale),
|
||||
text = today.dayOfWeek.toJavaDayOfWeek().getDisplayName(JavaTextStyle.FULL, locale).capitalizeStart(locale),
|
||||
maxLines = 1,
|
||||
style = TextStyle(color = GlanceTheme.colors.onSurface, fontSize = 13.sp, fontWeight = FontWeight.Medium),
|
||||
)
|
||||
Text(
|
||||
text = java.time.Month.of(today.month.ordinal + 1).getDisplayName(JavaTextStyle.FULL_STANDALONE, locale),
|
||||
text = java.time.Month.of(today.month.ordinal + 1).getDisplayName(JavaTextStyle.FULL_STANDALONE, locale).capitalizeStart(locale),
|
||||
maxLines = 1,
|
||||
style = TextStyle(color = GlanceTheme.colors.onSurfaceVariant, fontSize = 12.sp),
|
||||
)
|
||||
|
||||
@@ -63,6 +63,7 @@ import de.jeanlucmakiola.floret.glance.WidgetMessage
|
||||
import de.jeanlucmakiola.floret.glance.currentRefreshStamp
|
||||
import de.jeanlucmakiola.floret.glance.refreshStamp
|
||||
import de.jeanlucmakiola.floret.glance.themedColor
|
||||
import de.jeanlucmakiola.floret.locale.capitalizeStart
|
||||
import de.jeanlucmakiola.floret.locale.localizedDateFormatter
|
||||
import de.jeanlucmakiola.floret.prefs.ThemeMode
|
||||
import kotlinx.datetime.DateTimeUnit
|
||||
@@ -164,7 +165,7 @@ private fun DayTile(date: LocalDate, data: DaysWidgetData.Ready) {
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
Text(
|
||||
text = date.dayOfWeek.toJavaDayOfWeek().getDisplayName(JavaTextStyle.SHORT, locale),
|
||||
text = date.dayOfWeek.toJavaDayOfWeek().getDisplayName(JavaTextStyle.SHORT, locale).capitalizeStart(locale),
|
||||
maxLines = 1,
|
||||
style = TextStyle(color = ink, fontSize = 11.sp, textAlign = TextAlign.Center),
|
||||
)
|
||||
|
||||
+10
-5
@@ -53,6 +53,10 @@ Published version codes so far: `v0.1.0`→100 … `v2.0.0`→20000 …
|
||||
`## [X.Y.Z] — <date>` heading (Keep a Changelog format). The text between
|
||||
that heading and the next `## [` becomes both the Gitea release notes and
|
||||
the F-Droid per-version changelog.
|
||||
|
||||
Entries are short bullets, one line each, ending with the issue refs —
|
||||
e.g. `- Default calendar for new events ([#429])`. No bold lead-ins or
|
||||
explanations; the issue has the details.
|
||||
3. Bump the committed `versionName` (and `versionCode`, which
|
||||
`scripts/version_info.sh` prints) in `app/build.gradle.kts` to the new version. **This bump is what triggers the
|
||||
release** when the branch merges to `main`. Then write the per-version
|
||||
@@ -121,11 +125,12 @@ and to the stable release.
|
||||
1. **On `release/vX.Y.Z`**, with the features merged in, set
|
||||
`versionName = "X.Y.Z-beta.1"` and the matching `versionCode`
|
||||
(`scripts/version_info.sh` prints it; `2.23.0-beta.1` → `2230001`).
|
||||
No What's New file — betas don't ship to the stores. Notes come from a
|
||||
`## [X.Y.Z-beta.N]` section of `CHANGELOG.md` if you write one, otherwise
|
||||
from `## [Unreleased]`. So keep the entries under `## [Unreleased]` while
|
||||
betas are going out and only move them to `## [X.Y.Z]` when going stable:
|
||||
once they're moved, a beta's notes come out empty.
|
||||
No What's New file — betas don't ship to the stores. Write a
|
||||
`## [X.Y.Z-beta.N] — <date>` section in `CHANGELOG.md` listing **only what
|
||||
changed since the previous beta** (beta.1 lists everything so far); the
|
||||
notes come from it, falling back to `## [Unreleased]` if it's missing.
|
||||
Keep `## [Unreleased]` as the running total for the stable release and
|
||||
rename it to `## [X.Y.Z]` when going stable; the beta sections stay.
|
||||
2. **Optionally verify it on a device** with `scripts/verify-release.sh`, as for
|
||||
a stable release.
|
||||
3. **Push the branch to Codeberg.** When it reaches Gitea, `beta.yaml` sees a
|
||||
|
||||
+1
-1
Submodule floret-kit updated: 18fd62cf0d...751d0af2ea.
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# Prints the release notes for VERSION from CHANGELOG.md. A beta without its own
|
||||
# section falls back to [Unreleased], under a line saying what a beta is.
|
||||
# [#N] issue refs become plain #N so the forge links them.
|
||||
#
|
||||
# scripts/release_notes.sh 2.22.4 > release-notes.md
|
||||
set -euo pipefail
|
||||
@@ -12,13 +13,13 @@ section() {
|
||||
awk -v ver="$1" '
|
||||
$0 ~ "^## \\[" ver "\\]" { flag = 1; next }
|
||||
/^## \[/ { flag = 0 }
|
||||
flag' CHANGELOG.md | sed -e '/./,$!d'
|
||||
flag' CHANGELOG.md | sed -E -e '/./,$!d' -e 's/\[#([0-9]+)\]/#\1/g'
|
||||
}
|
||||
|
||||
NOTES=$(section "$VERSION")
|
||||
if [[ "$VERSION" == *-beta.* ]]; then
|
||||
[ -n "$NOTES" ] || NOTES=$(section Unreleased)
|
||||
printf '%s\n\n' "**Beta of ${VERSION%%-*}, for testing.** It updates in place to later betas and to the stable release. Obtainium only offers betas with *Include prereleases* switched on; F-Droid and Play never get them."
|
||||
printf '%s\n\n' "**Beta of ${VERSION%%-*}, for testing.** Updates in place; not on F-Droid or Play (Obtainium: enable *Include prereleases*)."
|
||||
fi
|
||||
if [ -n "$NOTES" ]; then
|
||||
printf '%s\n' "$NOTES"
|
||||
|
||||
Reference in new issue
Block a user