From 7388e4ca72dd55e329b5105959fe215db0baf7c0 Mon Sep 17 00:00:00 2001 From: RadoslavL <63926126+RadoslavL@users.noreply.github.com> Date: Sun, 12 Nov 2023 20:51:33 +0200 Subject: [PATCH] Add translation to the `publishedText` parameter Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com> --- src/invidious/videos/parser.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious/videos/parser.cr b/src/invidious/videos/parser.cr index e8988587..82164e3c 100644 --- a/src/invidious/videos/parser.cr +++ b/src/invidious/videos/parser.cr @@ -48,7 +48,7 @@ def parse_related_video(related : JSON::Any, published : String? = nil, publishe "short_view_count" => JSON::Any.new(short_view_count || "0"), "author_verified" => JSON::Any.new(author_verified), "published" => JSON::Any.new(published || ""), - "publishedText" => JSON::Any.new(publishedText || ""), + "publishedText" => JSON::Any.new(translate(locale, "`x` ago", recode_date(video.published, locale)) || ""), } end