diff --git a/src/components/atoms/Pagination.astro b/src/components/atoms/Pagination.astro index d5828fc..90bc7b3 100644 --- a/src/components/atoms/Pagination.astro +++ b/src/components/atoms/Pagination.astro @@ -1,32 +1,35 @@ --- import { Icon } from 'astro-icon/components'; import { getRelativeLink } from '~/utils/permalinks'; -const { prevUrl, nextUrl, prevText = 'Newer posts', nextText = 'Older posts' } = Astro.props; + +export interface Props { + prevUrl?: string; + nextUrl?: string; + prevText?: string; + nextText?: string; +} + +const { prevUrl, nextUrl, prevText = '较新文章', nextText = '较旧文章' } = Astro.props; --- { (prevUrl || nextUrl) && (
-
- + diff --git a/src/i18n/languages.ts b/src/i18n/languages.ts index 81f23b7..49345a6 100644 --- a/src/i18n/languages.ts +++ b/src/i18n/languages.ts @@ -180,6 +180,10 @@ export const ui = { 'blog.prevPost': '上一篇', 'blog.nextPost': '下一篇', + // 分页 + 'pagination.newer': '较新文章', + 'pagination.older': '较旧文章', + // 首页 Hero 区域 'home.hero.owl': '猫头鹰', 'home.hero.lab': '实验室', @@ -915,6 +919,10 @@ export const ui = { 'blog.prevPost': 'Previous', 'blog.nextPost': 'Next', + // Pagination + 'pagination.newer': 'Newer posts', + 'pagination.older': 'Older posts', + // Home Hero Section 'home.hero.owl': 'Open Wisdom', 'home.hero.lab': 'Lab',