summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--i18n/en.yml8
-rw-r--r--i18n/zh.yml8
-rw-r--r--layouts/_partials/posts/fediverse-form.html16
-rw-r--r--layouts/_partials/posts/webmention-form.html6
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>