Skip to content

Localized post dates to respect the publication language#174

Open
daeho-ro wants to merge 1 commit into
TryGhost:mainfrom
GreedyLabs:localize-post-dates
Open

Localized post dates to respect the publication language#174
daeho-ro wants to merge 1 commit into
TryGhost:mainfrom
GreedyLabs:localize-post-dates

Conversation

@daeho-ro

@daeho-ro daeho-ro commented Jul 4, 2026

Copy link
Copy Markdown

Post and post-card dates were hardcoded to format="DD MMM YYYY", which ignores
the site's Publication Language. Because only the month name is localized by the
date helper, non-English sites got an awkward mix — e.g. a Korean site rendered
04 7월 2026, keeping Western day-month-year ordering.

Dropping the explicit format lets the date helper use its locale-aware default
(ll), so the whole date — ordering, separators and month name — follows the
site's Publication Language:

Publication Language Before (DD MMM YYYY) After ({{date}}ll)
English 04 Jul 2026 Jul 4, 2026
Korean 04 7월 2026 2026년 7월 4일

The machine-readable ISO value on the datetime attribute is unchanged.

@cursor

cursor Bot commented Jul 4, 2026

Copy link
Copy Markdown

Bugbot is not enabled for this team, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cea446a2-5ead-45ee-b7d9-6b97147ac2a8

📥 Commits

Reviewing files that changed from the base of the PR and between 03115af and 0b6d1c6.

📒 Files selected for processing (2)
  • partials/post-card.hbs
  • post.hbs
🚧 Files skipped from review as they are similar to previous changes (2)
  • post.hbs
  • partials/post-card.hbs

Walkthrough

This change modifies two Handlebars templates, post.hbs and partials/post-card.hbs, updating the visible date text within time elements. Previously, the displayed date used a formatted DD MMM YYYY output; it now renders the raw {{date}} value directly. The datetime attribute format (YYYY-MM-DD) remains unchanged in both files.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Sequence Diagram(s)

No sequence diagram generated, as this change is a simple template text substitution with no control flow or interaction changes.

Related issues: None specified.

Related PRs: None specified.

Suggested labels: none

Suggested reviewers: none

Poem:
A rabbit hopped by the calendar's page,
Stripped the fancy format, freed the date from its cage.
No more "DD MMM YYYY" dressed up so fine,
Just raw {{date}} now, simple and in line.
Two templates twitch their whiskers, the change is complete! 🐇📅

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: date rendering now respects the publication language.
Description check ✅ Passed The description directly explains the date-format localization change and matches the code updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

no issue

- Post and post card dates were hardcoded to `DD MMM YYYY`, which ignores
  the site's publication language: only the month name was translated,
  leaving Western day-month-year ordering in every non-English locale
- Dropped the explicit format so the `date` helper falls back to its
  locale-aware default (`ll`), rendering the whole date — order,
  separators and month name — according to the site's Publication Language
- Left the machine-readable ISO value on the `datetime` attribute untouched
@daeho-ro daeho-ro force-pushed the localize-post-dates branch from 03115af to 0b6d1c6 Compare July 4, 2026 14:06
@cursor

cursor Bot commented Jul 4, 2026

Copy link
Copy Markdown

Bugbot is not enabled for this team, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

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