惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
U
Unit 42
Google DeepMind News
Google DeepMind News
B
Blog RSS Feed
S
SegmentFault 最新的问题
阮一峰的网络日志
阮一峰的网络日志
雷峰网
雷峰网
Microsoft Security Blog
Microsoft Security Blog
爱范儿
爱范儿
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园_首页
Apple Machine Learning Research
Apple Machine Learning Research
罗磊的独立博客
GbyAI
GbyAI
Stack Overflow Blog
Stack Overflow Blog
Martin Fowler
Martin Fowler
宝玉的分享
宝玉的分享
L
LangChain Blog
Engineering at Meta
Engineering at Meta
量子位
有赞技术团队
有赞技术团队
博客园 - 【当耐特】
A
About on SuperTechFans
Y
Y Combinator Blog

Discourse Meta - Latest posts

Horizon: High Context Topic Cards I'd like to ask what this file /var/www/discourse/vendor/data/RT_sRGB.icm is used for? Discourse to Markdown Plugin Testing reply function How to verify a subdomain (mysite.discourse.group) in Google Search Console? Reader Mode Publishing WordPress gallery posts on Discourse Discourse User Feedback New user filter by custom field and contact Interact with discourse from Python? Why we can't type the assignee in the search of a post to assign - home screen app Redis Flushall Category-toggled one-touch move post Some sort of variable to eliminate duplicate text? Why did this plugin replacement fail? Add user to list modal often appears above the mobile viewport sceen Creating/Editing a post on mobile: let's discuss the 2026 Discourse experience Wp-discourse feature request - do not show comments with specific tag? Are there any good Chinese plugins? Discourse ID and 2FA Discourse MCP is here! Sample Forum to See Admin Features? I am unable to register for a free Discourse site Wikipedia Lookup Add text for /login (like js.create_account.disclaimer for /signup) How can i set disable Markdown & Default to Rich Text What's the background image size for the Welcome Banner? How do I enable Associated Accounts with 2FA? Hamburger toggle Support <span data-attribute> in the rich editor
Embedded comments dates are still not localized
2026-04-14 · via Discourse Meta - Latest posts

Hi,

this topic is based on a discussion on ask.discourse.com, where we noticed what appears to be the same issue as in this older Meta topic:

Embed: dates are not localized

We are using the default Discourse embedded comments setup as documented here, without any special customization of the embed output:

Embed Discourse comments on another website via Javascript

I tried the new fullApp method and it had finnish dates but I like the older approach here better for this site.

What we see

The embedded comments UI is localized correctly, but the post date text is still shown in English.

For example, in the embed we may see:

April 2025

and the tooltip/title contains an English date/time such as:

April 9, 2025, 3.31pm

kuva

Expected behavior

The embedded comment dates should follow the site or user locale instead of always appearing in English.

In our case, we would expect Finnish-localized date formatting in the default embed.

Dirty workaround

With help of Claude I did quite dirty workaround using custom component and added javascript to embedded_header section - I already had some css based on if the class is normal (discourse-upotus) or dark (discourse-upotus-tumma).

<script type="text/javascript">
const selector = '.discourse-upotus a.post-date, .discourse-upotus-tumma a.post-date';

document.querySelectorAll(selector).forEach(el => {
  const title = el.getAttribute('title');
  if (!title) return;

  const match = title.match(/(\w+) (\d+), (\d{4}),\s*([\d]+)\.([\d]+)(am|pm)/i);
  if (!match) return;

  const [, month, day, year, hours, minutes, ampm] = match;
  const date = new Date(`${month} ${day}, ${year}`);
  if (isNaN(date)) return;

  let h = parseInt(hours);
  if (ampm.toLowerCase() === 'pm' && h !== 12) h += 12;
  if (ampm.toLowerCase() === 'am' && h === 12) h = 0;
  date.setHours(h, parseInt(minutes));

  const pvm = date.toLocaleDateString('fi-FI', { day: 'numeric', month: 'long', year: 'numeric' });
  const klo = date.toLocaleTimeString('fi-FI', { hour: '2-digit', minute: '2-digit' });

  el.textContent = pvm;
  el.setAttribute('title', `${pvm} klo ${klo}`);
});
</script>

Notes

  • this happens with the standard/default embed
  • no custom date formatting logic was added originally
  • we are referring specifically to the date output inside the embedded comments iframe
  • running latest and greatest Discourse

Could someone confirm whether this is still a known issue, and whether there is already a newer fix or related topic for it?

Thanks!