DEV: Make it obvious that joined translation is used by onebox (#20158)

This also moves the date as interpolation key into the string which makes translation easier.
This commit is contained in:
Gerhard Schlager 2023-02-03 03:02:14 +01:00 committed by GitHub
parent 651476e89e
commit 7fd63b34b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 4 deletions

View File

@ -5074,7 +5074,9 @@ en:
search_logs:
graph_title: "Search Count"
joined: "Joined"
onebox:
discourse:
user_joined_community: "Joined %{date}"
discourse_push_notifications:
popup:

View File

@ -26,7 +26,7 @@
{{#bio}}
<p>{{{bio}}}</p>
{{/bio}}
<span>{{joined}} {{created_at}}</span>
<span>{{joined}}</span>
</article>
<div class="clearfix"></div>
</aside>

View File

@ -459,8 +459,11 @@ module Oneboxer
name: name,
bio: user.user_profile.bio_excerpt(230),
location: Onebox::Helpers.sanitize(user.user_profile.location),
joined: I18n.t("joined"),
created_at: user.created_at.strftime(I18n.t("datetime_formats.formats.date_only")),
joined:
I18n.t(
"onebox.discourse.user_joined_community",
date: user.created_at.strftime(I18n.t("datetime_formats.formats.date_only")),
),
website: user.user_profile.website,
website_name: UserSerializer.new(user).website_name,
original_url: url,