Skip to content

Gramplet/birthdays gramplet#974

Open
javadr wants to merge 6 commits into
gramps-project:maintenance/gramps61from
javadr-forky:gramplet/birthdays-gramplet
Open

Gramplet/birthdays gramplet#974
javadr wants to merge 6 commits into
gramps-project:maintenance/gramps61from
javadr-forky:gramplet/birthdays-gramplet

Conversation

@javadr

@javadr javadr commented Jul 4, 2026

Copy link
Copy Markdown

Here's a PR comment for the changes:

BirthdaysGramplet: add sort mode option, set default to proximity

  • Added a "Sort birthdays by" dropdown option in build_options() with two modes:
    • Month and day — sort by calendar date (Jan 1 → Dec 31)
    • Proximity to current date — sort by how soon the next birthday is (upcoming first)
  • Default mode set to proximity
  • Filled all empty msgstr entries across all 22 locale files via Google Translate API — every translation file is now 100% translated

@javadr

javadr commented Jul 4, 2026

Copy link
Copy Markdown
Author

The latest commit (71261d8) is a hot fix to a 16 year-old bug!

It fixes proximity sort for non-Gregorian birth dates

Date(y, m, d) always creates a Gregorian date, but the code was extracting month/day directly from birth_date — so a Persian date of Farvardin 1 (~March 21) became January 1 Gregorian, producing wrong proximity values and broken sort order.

Fix: convert birth_date to Gregorian via gregorian() before constructing birthday_this_year, so month/day values match the calendar today uses.

@GaryGriffin

Copy link
Copy Markdown
Member

String translations are done in Weblate and then pushed to all of the addons. The changes to xx-local.po will be overwritten by Weblate.

@GaryGriffin

Copy link
Copy Markdown
Member

Do you want this on gramps60 branch instead of 61?

All Addons PRs for gramps60 are being cherry picked to 61 also.

@javadr

javadr commented Jul 4, 2026

Copy link
Copy Markdown
Author

Since I have Gramps 6.0 on my local machine, I would prefer to have it available on both branches.

I'm not completely sure, but I have a feeling it should work with earlier versions as well.

@dsblank

dsblank commented Jul 5, 2026

Copy link
Copy Markdown
Member

Great find with 71261d8 fix! I'm going to make sure we don't make that mistake in other places in gramps core, or other addons. Thanks!

@dsblank

dsblank commented Jul 5, 2026

Copy link
Copy Markdown
Member

Added a new method in gramps-project/gramps#2459, but it won't be available until gramps 6.2.

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.

3 participants