From d007885a3e3f6feabefbfcf28d210cc43edc3650 Mon Sep 17 00:00:00 2001 From: Eltrac Date: Fri, 19 Sep 2025 17:01:29 +0800 Subject: feat(i18n): add i18n support for action menu --- layouts/_partials/posts/action-menu.html | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) (limited to 'layouts/_partials/posts') diff --git a/layouts/_partials/posts/action-menu.html b/layouts/_partials/posts/action-menu.html index 63c7ba5c..d05a61d1 100644 --- a/layouts/_partials/posts/action-menu.html +++ b/layouts/_partials/posts/action-menu.html @@ -3,8 +3,10 @@
@@ -15,25 +17,35 @@ hover:bg-black/5 hover:rounded-lg group animate-count-infinite" onclick="sendLike('{{ .File.UniqueID | urlize }}')" id="like-btn-{{ .File.UniqueID | urlize }}" - title="为这篇文章献上心脏" - data-liked-title="你已经献上心脏了" + title="{{ T "actionMenu.like" }}" + data-liked-title="{{ T "actionMenu.liked" }}" data-tooltip> - 点赞 + {{ T ...
+ {{ if eq .Site.Language.Lang "zh" }}
- Telegram + class="dark:invert flex items-center justify-center gap-1.5 min-w-8 h-8 px-1 border-none bg-transparent text-gray-600 cursor-pointer relative transition-all duration-200 hover:opacity-70 group" + title="{{ T "actionMenu.telegramChannel" }}" data-umami-event="✈️ Click Telegram link from post tabs"> + {{ T - 赞助 + class="dark:invert flex items-center justify-center gap-1.5 min-w-8 h-8 px-1 border-none bg-transparent text-gray-600 cursor-pointer relative transition-all duration-200 hover:opacity-70 group" + title="{{ T "actionMenu.sponsor" }}" data-umami-event="💗 Click sponsor button from post tabs"> + {{ T
+ {{ end }} -- cgit v1.2.3