嵌入:日期未本地化

Dates always show up in default (US) locale in embedded comments.

Hmm. What do you mean “embedded comments”? Can you provide some detailed steps to reproduce this bug?

  1. Switch Discourse locale to any other than English
  2. Embed Discourse comments on a website
  3. UI is localised but dates are not on the embedded (iframe) comments
2 个赞

Any updates on this?

Still in English, but we can now at least hide them with CSS.

Happy anniversary! :birthday: :gift:

1 个赞

Darkness leads me to this bug under the pale moonlight :new_moon:

But as a general tip, it would be definitely better if there is a link or screenshots. I can hardly understand what you are talking about if I haven’t translated the documentation :frowning:

Embed comments:

The problem is in embed/comments.html.erb:

https://github.com/discourse/discourse/blob/master/app/views/embed/comments.html.erb#L13

then ember_helper.rb:

https://github.com/discourse/discourse/blob/master/app/helpers/embed_helper.rb#L3

The fix can be either using the FreedomPatches::Rails4.distance_of_time_in_words, I18n.localize(dt, format: I18n.t("datetime_formats.formats.short_no_year")) or replace the link by a different translation string as the digest email.

; I don’t quite understand the current status of server time formats so I won’t fire PR here.

1 个赞

您好,

我遇到了同样的问题。

我看到了本地化方面的问题,因为可能没有用户连接,所以很难估算其语言环境……但这可能是一个设置吗?对于仅针对单一语言社区的 Discourse 实例来说,这很有意义!

这个似乎已经存在很长时间了。我想知道这是否会将其更多地归入#功能请求领域,而不是#bug 存储桶。 :thinking:

2 个赞

我在这里提交了一个修复程序:

3 个赞

该主题在上次回复后 2 天自动关闭。不再允许新回复。