From edf3d3db1598e3de330724d79c7b898b5b2aad13 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sat, 19 Feb 2022 00:40:49 +0100 Subject: [PATCH] Add translation for "time ago" wording --- app/views/settings/_data.haml | 4 ++-- config/locales/voc.en.yml | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/settings/_data.haml b/app/views/settings/_data.haml index 43baa7a0..1cea4a7a 100644 --- a/app/views/settings/_data.haml +++ b/app/views/settings/_data.haml @@ -105,7 +105,7 @@ %p.text-muted - if current_user.created_at = localize(current_user.created_at) - = " (#{time_ago_in_words(current_user.created_at)} ago)" + = " (#{t("time.distance_ago", time: time_ago_in_words(current_user.created_at))})" - else = t(".none") @@ -113,6 +113,6 @@ %p.text-muted - if current_user.created_at = localize(current_user.updated_at) - = " (#{time_ago_in_words(current_user.updated_at)} ago)" + = " (#{t("time.distance_ago", time: time_ago_in_words(current_user.updated_at))})" - else = t(".none") diff --git a/config/locales/voc.en.yml b/config/locales/voc.en.yml index 71a118ac..b01067be 100644 --- a/config/locales/voc.en.yml +++ b/config/locales/voc.en.yml @@ -12,3 +12,5 @@ en: update: "Update" messages: noauth: "You must be signed in to do this." + time: + distance_ago: "%{time} ago"