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?
- Switch Discourse locale to any other than English
- Embed Discourse comments on a website
- UI is localised but dates are not on the embedded (iframe) comments
Any updates on this?
Still in English, but we can now at least hide them with CSS.
Happy anniversary!
Darkness leads me to this bug under the pale moonlight
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
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.
Hello,
Just ran into the same issue.
I see the issue with the localization here because potentially no user is connected so it is complicated to estimate its locale⊠but could it be a setting? For discourse instance targeting only one language community, it would make sens!
This one seems to have been around for quite awhile. I wonder if this pushes it more into the feature request territory rather than the bug bucket.
I have submitted a fix here:
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.