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

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 LanguageBefore (DD MMM YYYY)After ({{date}}ll)
English04 Jul 2026Jul 4, 2026
Korean04 7월 20262026년 7월 4일

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

@cursor

cursorBot 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

coderabbitaiBot 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 nameStatusExplanation
Title check✅ PassedThe title accurately summarizes the main change: date rendering now respects the publication language.
Description check✅ PassedThe description directly explains the date-format localization change and matches the code updates.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck 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-roforce-pushed the localize-post-dates branch from 03115af to 0b6d1c6CompareJuly 4, 2026 14:06
@cursor

cursorBot 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 freeto 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

@daeho-ro