Skip to content

[Bug] [Registry] Skill card dates still use English month names in Chinese mode after the #682 localization fix #752

@wanghuan-520

Description

@wanghuan-520

Summary

GitHub issue #682 was closed, and most fixed English Registry labels from that issue are now localized in Chinese mode. However, the date-format part of #682 is still not fully fixed.

Registry skill cards still render timestamps with English month names while the UI language is Chinese.

Examples visible in Chinese mode:

25 May 2026, 11:43:42
21 May 2026, 17:24:39
29 May 2026, 11:53:39
25 May 2026, 20:06:04

The rest of the page around these cards is already in Chinese, so the English May month label creates a mixed-language UI. This should be treated as a follow-up bug for the incomplete #682 fix, not as an unrelated localization issue.

Steps to Reproduce

  1. Log in to Ornn.
  2. Switch the UI language to Chinese.
  3. Open the Registry page:
/registry
  1. Open Registry tabs that contain skill cards, for example:
/registry?tab=system
/registry?tab=public
/registry?tab=my-skills
/registry?tab=shared-with-me
  1. Inspect the timestamp shown at the bottom of each skill card.

Actual Result

Skill card timestamps use English month names in Chinese mode, for example:

25 May 2026, 11:43:42

The surrounding Registry UI is Chinese, but the card timestamp remains English-formatted.

Expected Result

Registry skill-card timestamps should follow the selected UI language.

In Chinese mode, the timestamp should use a Chinese-compatible date format, for example:

2026年5月25日 11:43:42
2026/5/25 11:43:42

The exact format can follow the product's date-format convention, but it should not contain English month names such as May when the UI language is Chinese.

Code Pointers

The Registry skill card date formatter currently hardcodes the English Singapore locale:

// ornn-web/src/components/skill/SkillCard.tsx
function formatDateSGT(dateStr: string): string {
  const date = new Date(dateStr);
  return date.toLocaleString("en-SG", {
    timeZone: "Asia/Singapore",
    year: "numeric",
    month: "short",
    day: "numeric",
    hour: "2-digit",
    minute: "2-digit",
    second: "2-digit",
    hour12: false,
  });
}

The formatter is used directly in the card footer:

// ornn-web/src/components/skill/SkillCard.tsx
<span className="shrink-0">{formatDateSGT(timestamp)}</span>

Because the locale is fixed to en-SG, Chinese mode still renders English month names.

Suggested Fix

Make the skill-card timestamp formatter locale-aware.

For example:

  • derive the locale from i18n.language;
  • use zh-CN or the product-approved Chinese locale when the UI is Chinese;
  • keep the existing timezone behavior if Singapore time is required;
  • add coverage for Chinese and English Registry skill-card timestamp rendering.

Impact

  • Chinese Registry pages still contain English fixed date text after the broader localization fix.
  • This keeps the #682 localization issue partially unresolved.
  • Users see mixed-language skill cards even though the surrounding Registry labels are now translated.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions