Skip to content

Next-prayer message: show time remaining, drop the timezone - #71

Merged
escalopa merged 1 commit into
mainfrom
feat/next-prayer-countdown
Aug 3, 2026
Merged

Next-prayer message: show time remaining, drop the timezone#71
escalopa merged 1 commit into
mainfrom
feat/next-prayer-countdown

Conversation

@escalopa

@escalopa escalopa commented Aug 3, 2026

Copy link
Copy Markdown
Owner

What

/next (and the ⏭ menu button) now answers the real question — how long until the next prayer — instead of restating the user's own timezone.

Before: Fajr at 04:15 · Africa/Cairo
After: Fajr at 04:15 · in 5 h 42 min

How

  • The next_prayer template already had three placeholders in every locale, so the templates are untouched — the third argument is now a localized countdown instead of profile.Timezone.
  • New next_in_h / next_in_m / next_in_hm strings for all 8 locales (en, ar, es, fr, ru, tr, uz, tt).
  • Sub-minute remainders round up, so the message never says "0 min" right before a prayer.
  • The timezone remains visible in ⚙️ Settings, where it belongs.

Tests

  • untilNext unit test covering rounding-up, minutes-only, hours-only, and h+m rendering against the real English locale strings.
  • i18n completeness test extended with the new keys; next_prayer sample args updated.
  • make check green (gofmt, vet, full test suite).

🤖 Generated with Claude Code

/next now says how long remains until the prayer (e.g. "in 2 h 15 min"),
localized in all 8 languages. The timezone suffix is dropped: it is the
user's own configured timezone, so it carried no information.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@escalopa
escalopa merged commit febf048 into main Aug 3, 2026
3 checks passed
@escalopa
escalopa deleted the feat/next-prayer-countdown branch August 16, 2026 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant