diff options
| author | BigCoke233 <hi@guhub.cn> | 2026-01-31 11:17:11 +0800 |
|---|---|---|
| committer | BigCoke233 <hi@guhub.cn> | 2026-01-31 11:17:11 +0800 |
| commit | d3c8fd897276898d65c5e63e326aa5fa35731308 (patch) | |
| tree | ef641cf5f188f39b16c47c06b0a62682e104df5b | |
| parent | 664174e4ca91e91cca99ee241ade47e85442cab8 (diff) | |
chore(i18n): translate texts in action area
Former-commit-id: e238516797b087d27b351f408168b1cf64364385
| -rw-r--r-- | i18n/en.yml | 8 | ||||
| -rw-r--r-- | i18n/zh.yml | 8 | ||||
| -rw-r--r-- | layouts/_partials/posts/fediverse-form.html | 16 | ||||
| -rw-r--r-- | layouts/_partials/posts/webmention-form.html | 6 |
4 files changed, 20 insertions, 18 deletions
diff --git a/i18n/en.yml b/i18n/en.yml index aa04e276..76dc8bdc 100644 --- a/i18n/en.yml +++ b/i18n/en.yml @@ -52,10 +52,12 @@ fuzzyTimes: night: Night midnight: Midnight actionMenu: - telegramChannel: Telegram Channel - sponsor: Buy me a coffee - comment: Comment + fediverse: Fediverse + openToot: Open Toot + fediversePlaceholder: your instance, optional webmention: Webmention + webmentionPlaceholder: Your post URL + send: Send rss_comment_link: "Come and leave a comment" webmention: fetching: Fetching Webmention... diff --git a/i18n/zh.yml b/i18n/zh.yml index 416f2fb1..a65db5d6 100644 --- a/i18n/zh.yml +++ b/i18n/zh.yml @@ -51,10 +51,12 @@ fuzzyTimes: night: '晚上' midnight: '深夜' actionMenu: - telegramChannel: 'Telegram 频道' - sponsor: 赞助作者 - comment: 评论 + fediverse: 联邦宇宙 + openToot: 打开帖子 + fediversePlaceholder: 实例域名,可留空 webmention: Webmention + webmentionPlaceholder: 你的文章 URL + send: 发送 rss_comment_link: "读完啦?来坐坐吧" webmention: fetching: 正在获取 Webmention... diff --git a/layouts/_partials/posts/fediverse-form.html b/layouts/_partials/posts/fediverse-form.html index 76072cf5..6c4fce6a 100644 --- a/layouts/_partials/posts/fediverse-form.html +++ b/layouts/_partials/posts/fediverse-form.html @@ -1,13 +1,9 @@ +{{ if .Params.toot }} + <div class="flex flex-col gap-2"> - <h4 class="text-sm font-semibold m-0">Fediverse</h4> - {{ with .Params.toot }} - <input type="text" id="fediverse-instance" placeholder="your.instance.com" class="text-sm px-2 py-1 border border-neutral-300 dark:border-neutral-600 rounded bg-transparent"> - <button onclick="openInFediverse()" class="text-xs px-2 py-1 bg-neutral-200 dark:bg-neutral-600 rounded hover:bg-neutral-300 dark:hover:bg-neutral-500 transition-colors">Open Toot</button> - {{ else }} - <p class="text-xs text-neutral-500 m-0">No toot available</p> - <input type="text" id="fediverse-instance" placeholder="your.instance.com" class="text-sm px-2 py-1 border border-neutral-300 dark:border-neutral-600 rounded bg-transparent opacity-50" disabled> - <button disabled class="text-xs px-2 py-1 bg-neutral-200 dark:bg-neutral-600 rounded opacity-50 cursor-not-allowed">Open Toot</button> - {{ end }} + <h4 class="text-sm font-semibold m-0">{{ T "actionMenu.fediverse" }}</h4> + <input type="text" id="fediverse-instance" placeholder="{{ T "actionMenu.fediversePlaceholder" }}" class="text-sm px-2 py-1 border border-neutral-300 dark:border-neutral-600 rounded bg-transparent"> + <button onclick="openInFediverse()" class="text-xs px-2 py-1 bg-neutral-200 dark:bg-neutral-600 rounded hover:bg-neutral-300 dark:hover:bg-neutral-500 transition-colors">{{ T "actionMenu.openToot" }}</button> </div> <script> @@ -34,3 +30,5 @@ function openInFediverse() { window.open(url, '_blank'); } </script> + +{{ end }} diff --git a/layouts/_partials/posts/webmention-form.html b/layouts/_partials/posts/webmention-form.html index d55e8d58..65062592 100644 --- a/layouts/_partials/posts/webmention-form.html +++ b/layouts/_partials/posts/webmention-form.html @@ -1,6 +1,6 @@ <form action="https://webmention.io/www.geedea.pro/webmention" method="POST" class="flex flex-col gap-2"> - <h4 class="text-sm font-semibold m-0">Webmention</h4> - <input type="url" name="source" placeholder="Your post URL" class="text-sm px-2 py-1 border border-neutral-300 dark:border-neutral-600 rounded bg-transparent"> + <h4 class="text-sm font-semibold m-0">{{ T "actionMenu.webmention" }}</h4> + <input type="url" name="source" placeholder="{{ T "actionMenu.webmentionPlaceholder" }}" class="text-sm px-2 py-1 border border-neutral-300 dark:border-neutral-600 rounded bg-transparent"> <input type="hidden" name="target" value="{{ .Permalink }}"> - <button type="submit" class="text-xs px-2 py-1 bg-neutral-200 dark:bg-neutral-600 rounded hover:bg-neutral-300 dark:hover:bg-neutral-500 transition-colors">Send</button> + <button type="submit" class="text-xs px-2 py-1 bg-neutral-200 dark:bg-neutral-600 rounded hover:bg-neutral-300 dark:hover:bg-neutral-500 transition-colors">{{ T "actionMenu.send" }}</button> </form> |
