增加i18n支持

This commit is contained in:
nxxy335top
2026-05-20 17:18:33 +08:00
parent 6cd8167b49
commit bab8380894
80 changed files with 1363 additions and 743 deletions
+7 -7
View File
@@ -11,7 +11,7 @@ import Layout from "../layouts/Layout.astro";
<header class="wi-tag__header">
<h1 class="wi-tag__title" th:text="${tag.spec.displayName}"></h1>
<span class="wi-page-accent"></span>
<p class="wi-tag__subtitle" th:text="|共 ${posts.total} 篇文章|"></p>
<p class="wi-tag__subtitle" th:text="#{common.postCount(${posts.total})}"></p>
<p
th:if="${not #strings.isEmpty(tag.spec.description)}"
class="wi-tag__description"
@@ -55,8 +55,8 @@ import Layout from "../layouts/Layout.astro";
<div
th:if="${posts.total == 0}"
class="wi-tag__empty"
th:text="${theme.config?.home?.home_label_no_posts ?: '暂无文章。'}"
>暂无文章。</div>
th:text="${theme.config?.home?.home_label_no_posts ?: #messages.msg('common.noPosts')}"
>No posts yet.</div>
<nav
th:if="${posts.totalPages gt 1}"
@@ -67,8 +67,8 @@ import Layout from "../layouts/Layout.astro";
th:if="${posts.hasPrevious()}"
th:href="@{${posts.prevUrl}}"
class="wi-tag__page-link wi-tag__page-link--prev"
th:text="${theme.config?.home?.home_label_newer ?: '较新'}"
>&larr; 较新</a>
th:text="${theme.config?.home?.home_label_newer ?: #messages.msg('common.newer')}"
>&larr; Newer</a>
<span
class="wi-tag__page-info"
th:text="|${posts.page} / ${posts.totalPages}|"
@@ -77,8 +77,8 @@ import Layout from "../layouts/Layout.astro";
th:if="${posts.hasNext()}"
th:href="@{${posts.nextUrl}}"
class="wi-tag__page-link wi-tag__page-link--next"
th:text="${theme.config?.home?.home_label_older ?: '较旧'}"
>较旧 &rarr;</a>
th:text="${theme.config?.home?.home_label_older ?: #messages.msg('common.older')}"
>Older &rarr;</a>
</nav>
</div>
</Layout>