From 561ed1858f7bd129629cfa16bed4e329aba83b08 Mon Sep 17 00:00:00 2001
From: yheuhtozr <84892012+yheuhtozr@users.noreply.github.com>
Date: Wed, 22 Feb 2023 08:30:57 +0900
Subject: [PATCH] Tweak i18n edited date format(#19104)
---
app/views/comments/_comment_date.erb | 9 ++++++---
config/locales/views/comments/en.yml | 4 ++--
config/locales/views/comments/fr.yml | 4 ++--
3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/app/views/comments/_comment_date.erb b/app/views/comments/_comment_date.erb
index 729de1100..3a2be2e1e 100644
--- a/app/views/comments/_comment_date.erb
+++ b/app/views/comments/_comment_date.erb
@@ -6,8 +6,11 @@
<% if decorated_comment.edited_at.present? %>
- <%= t("views.comments.edited.text_html",
- on: tag.span(t("views.comments.edited.on_html", date: tag.time(decorated_comment.edited_at.strftime(t("time.formats.short")), datetime: decorated_comment.edited_timestamp, class: %w[hidden m:inline-block date-no-year])))
- ) %>
+ <%=
+ t("views.comments.edited.text_html",
+ date: tag.time(decorated_comment.edited_at.strftime(t("time.formats.short")), datetime: decorated_comment.edited_timestamp, class: %w[date-no-year])
+ )
+ %>
+ <%= t("views.comments.edited.short_html") %>
<% end %>
diff --git a/config/locales/views/comments/en.yml b/config/locales/views/comments/en.yml
index 5f3e4c65d..6ab721fcd 100644
--- a/config/locales/views/comments/en.yml
+++ b/config/locales/views/comments/en.yml
@@ -32,8 +32,8 @@ en:
collapse: Collapse
edit: Editing comment
edited:
- text_html: "• Edited %{on}"
- on_html: on %{date}
+ text_html: "• Edited on %{date}"
+ short_html: "• Edited"
expand: Expand
visible_signed_in:
text_html: "Some comments may only be visible to logged-in visitors. %{sign_in} to view all comments."
diff --git a/config/locales/views/comments/fr.yml b/config/locales/views/comments/fr.yml
index 28423ab9d..a57c49f88 100644
--- a/config/locales/views/comments/fr.yml
+++ b/config/locales/views/comments/fr.yml
@@ -32,8 +32,8 @@ fr:
collapse: Collapse
edit: Editing comment
edited:
- text_html: "• Edited %{on}"
- on_html: on %{date}
+ text_html: "• Edited on %{date}"
+ short_html: "• Edited"
expand: Expand
visible_signed_in:
text_html: "Some comments may only be visible to logged-in visitors. %{sign_in} to view all comments."