diff --git a/.prettierignore b/.prettierignore
index 9a95d64..0da0503 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -14,3 +14,6 @@ yarn.lock
packages/ui/
.eslintrc-auto-import.js
auto-imports.d.ts
+
+# 词表文件经 paraglide 按严格 JSON 解析,prettier 的 json5 解析器会改写为无引号键与单引号串,导致编译失败
+apps/web/messages/
diff --git a/apps/web/messages/en/about.json5 b/apps/web/messages/en/about.json5
new file mode 100644
index 0000000..bdcfd42
--- /dev/null
+++ b/apps/web/messages/en/about.json5
@@ -0,0 +1,18 @@
+{
+ "heading": "About",
+ "description": "The origins of {{site}}, the writer behind it, and what it covers.",
+ "eyebrow": "Journal · About",
+ "issueTitle": "What kind of journal is this",
+ "issueParagraphOne": "{{site}} is a personal journal published as field notes. It records the trade-offs made in engineering practice, the details noticed in design, and the fragments of reading and daily life worth keeping. Posts are arranged as issues and can be browsed from the post index or the archive timeline.",
+ "issueParagraphTwo": "The site is itself one of the works: a full-stack monorepo built with Go and SvelteKit, where comments, favorites, notifications and full-text search are all real implementations. If the engineering interests you, its full entry lives in the project archive.",
+ "authorTitle": "The writer",
+ "columnsTitle": "What it covers",
+ "columns": {
+ "engineeringName": "Engineering notes",
+ "engineeringNote": "Records from frontend work and backend architecture",
+ "designName": "Design notes",
+ "designNote": "Observations on interfaces, typography and interaction",
+ "notesName": "Occasional thoughts",
+ "notesNote": "Fragments from reading and daily life worth keeping"
+ }
+}
diff --git a/apps/web/messages/en/account.json5 b/apps/web/messages/en/account.json5
new file mode 100644
index 0000000..0bf8a21
--- /dev/null
+++ b/apps/web/messages/en/account.json5
@@ -0,0 +1,69 @@
+{
+ "login": {
+ "title": "{{site}} - Sign in",
+ "description": "Sign in to comment, like, save posts and follow authors.",
+ "eyebrow": "Portal · Auth",
+ "heading": "Welcome back",
+ "usernameLabel": "Username",
+ "usernamePlaceholder": "Enter your username",
+ "passwordLabel": "Password",
+ "passwordPlaceholder": "Enter your password",
+ "showPassword": "Show password",
+ "hidePassword": "Hide password",
+ "submit": "Sign in",
+ "submitting": "Signing in…",
+ "guestNote": "Without an account you can still comment as a guest, or contact the site owner to have one created.",
+ "validationFailed": "Enter your username and password",
+ "failed": "Sign-in failed, please check your username and password",
+ "sessionFailed": "Failed to establish the session, please try again",
+ "success": "Signed in",
+ "networkFailed": "Network error, please try again later"
+ },
+ "profile": {
+ "title": "{{site}} - Profile",
+ "description": "Maintain the signed-in user's profile: display name, avatar, bio and password.",
+ "eyebrow": "Profile · Settings",
+ "heading": "Profile",
+ "basicsTitle": "Basic details",
+ "basicsNote": "Your display name and bio appear on comments and your author page.",
+ "nicknameLabel": "Display name",
+ "nicknamePlaceholder": "Your display name",
+ "avatarLabel": "Avatar URL",
+ "urlPlaceholder": "https://…",
+ "bioLabel": "Bio",
+ "bioPlaceholder": "One line about yourself",
+ "websiteLabel": "Website",
+ "saveSubmit": "Save profile",
+ "saveSubmitting": "Saving…",
+ "saveFailed": "Failed to save the profile, please try again later",
+ "saveSuccess": "Profile saved",
+ "passwordTitle": "Change password",
+ "passwordRule": "{{min}}-{{max}} characters, including both letters and digits.",
+ "currentPasswordLabel": "Current password",
+ "currentPasswordPlaceholder": "Enter your current password",
+ "newPasswordLabel": "New password",
+ "newPasswordPlaceholder": "Enter a new password",
+ "confirmPasswordLabel": "Confirm new password",
+ "confirmPasswordPlaceholder": "Repeat the new password",
+ "passwordMismatch": "The two new passwords do not match",
+ "passwordSubmit": "Change password",
+ "passwordFailed": "Failed to change the password, please try again later",
+ "passwordSuccess": "Password changed, please sign in again with the new password",
+ "loadFailed": "Failed to load the profile, please try again later"
+ },
+ "favorites": {
+ "title": "{{site}} - Favorites",
+ "description": "Posts saved by the signed-in user.",
+ "eyebrow": "Favorites · Bookmarks",
+ "heading": "Favorites",
+ "emptyTitle": "No saved posts yet.",
+ "emptyNote": "Use the save button on a post to collect it here.",
+ "loadFailed": "Failed to load the saved posts, please try again later"
+ },
+ "follow": {
+ "signInRequired": "Sign in to follow this author",
+ "busy": "Working…",
+ "following": "Following",
+ "follow": "Follow"
+ }
+}
diff --git a/apps/web/messages/en/author.json5 b/apps/web/messages/en/author.json5
new file mode 100644
index 0000000..fc8b055
--- /dev/null
+++ b/apps/web/messages/en/author.json5
@@ -0,0 +1,13 @@
+{
+ "title": "{{name}} - Author - {{site}}",
+ "description": "All posts published by {{name}}",
+ "eyebrow": "Author · Profile",
+ "articleCount_one": "{{count}} article",
+ "articleCount_other": "{{count}} articles",
+ "followerCount_one": "{{count}} follower",
+ "followerCount_other": "{{count}} followers",
+ "followingCount": "{{count}} following",
+ "emptyTitle": "This author has no published posts yet.",
+ "emptyNote": "Browse the post index for other content.",
+ "notFound": "Author not found"
+}
diff --git a/apps/web/messages/en/blog.json5 b/apps/web/messages/en/blog.json5
new file mode 100644
index 0000000..b595885
--- /dev/null
+++ b/apps/web/messages/en/blog.json5
@@ -0,0 +1,50 @@
+{
+ "list": {
+ "title": "{{site}} - Post index",
+ "description": "The index of every post, ordered by publication time, with keyword search and paging.",
+ "eyebrow": "Journal · All issues",
+ "heading": "Post index",
+ "resultCount_one": "“{{search}}” · {{count}} result",
+ "resultCount_other": "“{{search}}” · {{count}} results",
+ "searchLabel": "Search posts",
+ "searchPlaceholder": "Search titles and body text…",
+ "searchSubmit": "Search",
+ "searchEmpty": "No posts found for “{{search}}”.",
+ "searchEmptyBefore": "Try another keyword, or",
+ "searchEmptyClear": "clear the search",
+ "searchEmptyAfter": "to browse every issue."
+ },
+ "detail": {
+ "eyebrow": "Journal · Post",
+ "notFound": "This post does not exist or is not published yet",
+ "commentsClosed": "Comments are closed for this post.",
+ "backToIndex": "← Back to the index"
+ },
+ "archives": {
+ "title": "{{site}} - Archives",
+ "description": "The chronological archive of every post, arranged by year and month.",
+ "eyebrow": "Chronicle · Archives",
+ "heading": "Archives",
+ "orderNote": "Arranged by year",
+ "emptyTitle": "The timeline awaits its first posts.",
+ "yearCount_one": "{{count}} article",
+ "yearCount_other": "{{count}} articles",
+ "monthLine": "Month {{month}} · {{date}}"
+ },
+ "actions": {
+ "signInRequired": "Sign in to join the conversation",
+ "liked": "Liked",
+ "like": "Like",
+ "bookmarked": "Saved",
+ "bookmark": "Save"
+ },
+ "pagination": {
+ "label": "Pagination",
+ "previous": "← Previous",
+ "next": "Next →",
+ "position": "Page {{current}} / {{total}}"
+ },
+ "error": {
+ "archivesFailed": "Failed to load the archive data, please try again later"
+ }
+}
diff --git a/apps/web/messages/en/category.json5 b/apps/web/messages/en/category.json5
new file mode 100644
index 0000000..7f6f518
--- /dev/null
+++ b/apps/web/messages/en/category.json5
@@ -0,0 +1,7 @@
+{
+ "title": "{{name}} - Category - {{site}}",
+ "eyebrow": "Category · {{slug}}",
+ "emptyTitle": "No published posts in this category yet.",
+ "emptyNote": "Browse the post index for other content.",
+ "notFound": "Category not found"
+}
diff --git a/apps/web/messages/en/comment.json5 b/apps/web/messages/en/comment.json5
new file mode 100644
index 0000000..a3af41b
--- /dev/null
+++ b/apps/web/messages/en/comment.json5
@@ -0,0 +1,17 @@
+{
+ "title": "Comments",
+ "count_one": "{{count}} comment",
+ "count_other": "{{count}} comments",
+ "nameLabel": "Name",
+ "namePlaceholder": "Name *",
+ "emailPlaceholder": "Email (not published)",
+ "contentLabel": "Comment",
+ "contentPlaceholder": "Say something",
+ "guestContentPlaceholder": "Say something as a guest",
+ "moderationNote": "Comments are published after review",
+ "submit": "Post comment",
+ "empty": "No comments yet. Be the first to say something.",
+ "loadMore": "Load more comments",
+ "submitFailed": "Failed to submit the comment, please try again later",
+ "submitSuccess": "Comment submitted, it will be published after review"
+}
diff --git a/apps/web/messages/en/contact.json5 b/apps/web/messages/en/contact.json5
new file mode 100644
index 0000000..b119e13
--- /dev/null
+++ b/apps/web/messages/en/contact.json5
@@ -0,0 +1,13 @@
+{
+ "heading": "Contact",
+ "description": "The real channels for reaching the {{site}} author: GitHub, email and link exchange.",
+ "eyebrow": "Correspondence · Contact",
+ "lead": "Letters are welcome, whether it is a correction, a technical discussion or simply saying hello.",
+ "channels": {
+ "emailNote": "Write in for collaboration or long-form exchanges; replies usually arrive within two to three working days.",
+ "githubNote": "Issues and discussions suit technical topics best, and progress stays visible."
+ },
+ "inSiteTitle": "On-site channels",
+ "inSiteComments": "Comments: leave a note under any post; guests may comment and the author reads every one.",
+ "inSiteLinks": "Link exchange: submit an application at the bottom of the friendly-links dialog in the header; approved links appear there."
+}
diff --git a/apps/web/messages/en/home.json5 b/apps/web/messages/en/home.json5
new file mode 100644
index 0000000..30e47d6
--- /dev/null
+++ b/apps/web/messages/en/home.json5
@@ -0,0 +1,55 @@
+{
+ "seo": {
+ "title": "{{site}} - Compiling ideas into interfaces",
+ "description": "A personal blog on engineering practice and creative design, exploring what modern web development makes possible.",
+ "descriptionShort": "A personal blog on engineering practice and creative design",
+ "keywords": "blog,technology,development,design,SvelteKit,Go,full-stack development"
+ },
+ "hero": {
+ "eyebrow": "Journal · Code & Life",
+ "headlineLead": "Compiling ideas",
+ "headlineTail": "into ",
+ "headlineAccent": "interfaces",
+ "headlineNote": "// engineering × design",
+ "intro": "Notes on engineering practice, city wanderings, and the books finished late at night. I believe in slow and solid accumulation, and favour clean structures and honest writing.",
+ "ctaRead": "Start reading",
+ "excerptLabel": "This month's excerpt",
+ "quote": "“Write down what you have thought through, then do what you have written down.”",
+ "quoteAuthor": "— founding editor's note",
+ "specEngineering": "01 / Engineering",
+ "specDesign": "02 / Design",
+ "specLife": "03 / Life",
+ "imprint": "{{site}} — EST. 2026",
+ "scrollHint": "Scroll"
+ },
+ "index": {
+ "title": "Recent posts",
+ "emptyNote": "You can browse the layout and the site introduction in the meantime, or wait for updates on the archive page.",
+ "viewAll": "View all posts"
+ },
+ "featured": {
+ "badge": "Featured",
+ "categoryFallback": "Journal",
+ "readMore": "Read the full post"
+ },
+ "sidebar": {
+ "popular": "Popular posts",
+ "tags": "Tags",
+ "subscribeTitle": "Subscribe to the journal",
+ "subscribeNote": "Email subscription is in preparation. Once open it will gather the month's posts and reading list, without intruding.",
+ "subscribeEmailLabel": "Email address",
+ "subscribeEmailPlaceholder": "you@example.com",
+ "subscribeSubmit": "Subscribe",
+ "subscribeNotice": "Subscription is not open yet. An announcement will follow on the site, thank you for waiting."
+ },
+ "archivePreview": {
+ "title": "Creative timeline",
+ "viewAll": "Full archive →"
+ },
+ "action": {
+ "backToTop": "Back to top"
+ },
+ "error": {
+ "loadFailed": "Failed to load the home page data, please try again later"
+ }
+}
diff --git a/apps/web/messages/en/privacy.json5 b/apps/web/messages/en/privacy.json5
new file mode 100644
index 0000000..c97508e
--- /dev/null
+++ b/apps/web/messages/en/privacy.json5
@@ -0,0 +1,43 @@
+{
+ "heading": "Privacy Policy",
+ "description": "The privacy policy of {{site}}: what data is collected, why, how long it is kept and how it is redacted.",
+ "eyebrow": "Compliance · Privacy",
+ "lead": "The site processes visitor data on a minimal-necessary basis, collecting only what keeps the features running, and states all of it on this page.",
+ "collectionTitle": "What this site collects",
+ "collection": {
+ "browsing": {
+ "title": "Article view data",
+ "item1": "Viewing an article records the source IP address, used to count views de-duplicated by visitor and calendar day; the site does not currently use browser fingerprints or other extra visitor identifiers.",
+ "item2": "View details serve on-site statistics only; the aggregated result is the view count shown on the article page."
+ },
+ "search": {
+ "title": "On-site search records",
+ "item1": "Searching from the index page records the keyword, the number of results and the query duration, used to analyse search quality and refine popular terms.",
+ "item2": "Search records are not linked with your other activity into a profile."
+ },
+ "comment": {
+ "title": "Comment information",
+ "item1": "Guests leaving a comment provide a nickname and an email address; the nickname is shown publicly with the comment, the email address is not.",
+ "item2": "The IP and browser-identifier fields reserved in the comment table are not currently used; should they be enabled, this page will be updated first."
+ },
+ "account": {
+ "title": "Account data",
+ "item1": "Registration is closed and accounts are created by the site administrator. Signing in collects a username, an email address and a password, and the password is stored as a one-way bcrypt hash that nobody, including the administrator, can read.",
+ "item2": "The nickname, avatar, bio and website address entered on the profile page are used for on-site display only."
+ },
+ "session": {
+ "title": "Session cookies",
+ "item1": "After signing in, two cookies are written to the browser, mb_access_token and mb_refresh_token, used solely to keep the session alive; the tokens are opaque random strings issued by the server, and the cookies themselves carry no identity information.",
+ "item2": "Both cookies set the HttpOnly attribute, so page scripts cannot read them, and they are sent only with requests under the /api path; the same-site policy is SameSite=Lax, so cross-site requests do not carry them.",
+ "item3": "The access token lasts 15 minutes by default and the refresh token 7 days; signing out or changing the password revokes the corresponding session on the server and tells the browser to remove the local cookies."
+ }
+ },
+ "promiseTitle": "Our commitments",
+ "promise1": "Data is never sold or shared with third parties.",
+ "promise2": "The site carries no advertising scripts and no cross-site trackers.",
+ "promise3": "Public API output is redacted; sensitive fields such as comment email addresses and source IPs are never returned by public endpoints.",
+ "promise4": "View and search details are kept long term for statistical analysis only; if an automatic cleanup cycle is introduced, this page will be updated to say so.",
+ "promise5": "Any new data-collection scenario is announced on this page before it is introduced.",
+ "updateBefore": "This policy describes how the site actually processes data today; any change will be made directly on this page, keeping the latest version. Questions about the policy or about data handling can be raised through the channels on the",
+ "updateAfter": "page."
+}
diff --git a/apps/web/messages/en/projects.json5 b/apps/web/messages/en/projects.json5
new file mode 100644
index 0000000..f931012
--- /dev/null
+++ b/apps/web/messages/en/projects.json5
@@ -0,0 +1,16 @@
+{
+ "heading": "Projects",
+ "description": "An archive of personal and open-source work, currently featuring the {{site}} full-stack project.",
+ "eyebrow": "Archive · Projects",
+ "lead": "Everything here is real and verifiable; each entry is updated as the project evolves.",
+ "card": {
+ "title": "MyBlog · {{site}}",
+ "meta": "Since 2026 · under continuous iteration",
+ "paragraphOne": "The site you are reading is the first entry in this archive: a full-stack personal blog built with Go and SvelteKit, covering eleven business modules including articles, comments, favorites, follows, notifications, statistics and friendly links, with role-based access control and Chinese full-text search.",
+ "paragraphTwo": "The project is organised as a pnpm monorepo: the frontend is split into five shared packages, namely api, http, auth, shared and ui, while the backend is layered into handler, service and repository. The comment moderation state machine, the notification pipeline and the backup and restore scripts are real implementations rather than demo samples.",
+ "sourceLink": "View the source repository"
+ },
+ "techStackTitle": "Tech stack",
+ "moreTitle": "More entries are being prepared and will appear as they are ready.",
+ "moreNote": "New work shows up first in the post index as a journal entry, then moves here."
+}
diff --git a/apps/web/messages/en/ui.json5 b/apps/web/messages/en/ui.json5
index 9c97de1..c194709 100644
--- a/apps/web/messages/en/ui.json5
+++ b/apps/web/messages/en/ui.json5
@@ -2,6 +2,52 @@
"site": {
"name": "IdleRain Blogs"
},
+ "brand": {
+ "github": "GitHub"
+ },
+ "label": {
+ "email": "Email"
+ },
+ "author": {
+ "name": "Developer",
+ "role": "Full-stack engineer",
+ "roleWithFields": "Full-stack engineer · programming and design",
+ "tagline": "A maker passionate about programming and design, weaving ideas with code and changing the world with technology.",
+ "note": "Writing code by day, writing prose by night. I believe in slow and solid accumulation, and favour clean structures and honest writing.",
+ "approach": "Drawn to where engineering structure meets interface quality; I break complex problems into clear small pieces and fit them back into an elegant whole."
+ },
+ "meta": {
+ "minutesRead": "{{count}} min read",
+ "minutesReadApprox": "about {{count}} min",
+ "views_one": "{{count}} view",
+ "views_other": "{{count}} views",
+ "postCount_one": "{{count}} post",
+ "postCount_other": "{{count}} posts",
+ "ongoing": "continuously updated",
+ "pageTitle": "{{title}} - {{site}}"
+ },
+ "empty": {
+ "inPreparation": "The inaugural issue is in preparation, posts will follow soon.",
+ "backHome": "You can head back to the home page to browse the layout and the site introduction."
+ },
+ "action": {
+ "failed": "Something went wrong, please try again later",
+ "submitting": "Submitting…",
+ "backHome": "Back home"
+ },
+ "session": {
+ "expired": "Your session has expired, please sign in again"
+ },
+ "placeholder": {
+ "scheduleNote": "Layout in progress · this section will arrive in a later iteration"
+ },
+ "codeBlock": {
+ "copy": "Copy",
+ "copied": "Copied",
+ "copyFailed": "Copy failed",
+ "copyAria": "Copy code",
+ "plainText": "Text"
+ },
"button": {
"save": "Save",
"cancel": "Cancel",
@@ -39,9 +85,6 @@
"githubHome": "GitHub home",
"themeToggle": "Toggle theme",
"aboutAuthor": "About the author",
- "aboutAuthorDesc": "A maker passionate about programming and design, weaving ideas with code and changing the world with technology.",
- "authorName": "Developer",
- "authorTitle": "Full-stack engineer",
"notifications": "Notifications",
"markAllRead": "Mark all read",
"noNotifications": "No notifications yet"
@@ -73,7 +116,6 @@
"contactEmail": "Contact email",
"contactEmailPlaceholder": "Used to receive the review result",
"submit": "Submit application",
- "submitting": "Submitting…",
"applySubmitted": "Application submitted, awaiting review",
"submitFailed": "Failed to submit the application, please try again later"
},
@@ -84,6 +126,6 @@
"serverErrorTitle": "The printing press broke down",
"serverErrorSubtitle": "The server ran into an unexpected problem and the content is temporarily unavailable",
"retry": "Retry",
- "backHome": "Back home"
+ "listFailed": "Failed to load the post list, please try again later"
}
}
diff --git a/apps/web/messages/zh/about.json5 b/apps/web/messages/zh/about.json5
new file mode 100644
index 0000000..026e3d2
--- /dev/null
+++ b/apps/web/messages/zh/about.json5
@@ -0,0 +1,18 @@
+{
+ "heading": "关于本站",
+ "description": "{{site}}的站点缘起、写作者介绍与写作方向。",
+ "eyebrow": "刊物 · About",
+ "issueTitle": "这是一份什么样的刊物",
+ "issueParagraphOne": "{{site}}是一份以手记形式更新的个人刊物,记录工程实践里的取舍、设计观察里的细节,以及阅读与生活里值得留下的片段。文章按刊目编排,可从博客目录或归档时间线翻阅。",
+ "issueParagraphTwo": "站点本身也是一份作品:以 Go 与 SvelteKit 构建的 Monorepo 全栈工程,评论、收藏、通知与全文检索均为真实实现。若你对工程结构感兴趣,可在项目档案中查看它的完整档案。",
+ "authorTitle": "写作者",
+ "columnsTitle": "写作方向",
+ "columns": {
+ "engineeringName": "工程手记",
+ "engineeringNote": "前端工程与后端架构的实践记录",
+ "designName": "设计札记",
+ "designNote": "界面、排版与交互的观察笔记",
+ "notesName": "随想",
+ "notesNote": "阅读与生活里值得留下的片段"
+ }
+}
diff --git a/apps/web/messages/zh/account.json5 b/apps/web/messages/zh/account.json5
new file mode 100644
index 0000000..1bcf101
--- /dev/null
+++ b/apps/web/messages/zh/account.json5
@@ -0,0 +1,69 @@
+{
+ "login": {
+ "title": "{{site}} - 登录",
+ "description": "登录后即可参与评论、点赞、收藏与关注等互动。",
+ "eyebrow": "门户 · Auth",
+ "heading": "欢迎回来",
+ "usernameLabel": "用户名",
+ "usernamePlaceholder": "请输入用户名",
+ "passwordLabel": "密码",
+ "passwordPlaceholder": "请输入密码",
+ "showPassword": "显示密码",
+ "hidePassword": "隐藏密码",
+ "submit": "登录",
+ "submitting": "登录中…",
+ "guestNote": "尚无账户时可通过评论区以访客身份留言,或联系站长开通。",
+ "validationFailed": "请输入用户名和密码",
+ "failed": "登录失败,请检查用户名和密码",
+ "sessionFailed": "会话建立失败,请重试",
+ "success": "登录成功",
+ "networkFailed": "网络错误,请稍后重试"
+ },
+ "profile": {
+ "title": "{{site}} - 个人资料",
+ "description": "当前登录用户的资料维护页,支持修改昵称、头像、简介与登录密码。",
+ "eyebrow": "资料 · Profile",
+ "heading": "个人资料",
+ "basicsTitle": "基础资料",
+ "basicsNote": "昵称与简介会展示在评论与作者主页。",
+ "nicknameLabel": "昵称",
+ "nicknamePlaceholder": "展示昵称",
+ "avatarLabel": "头像地址",
+ "urlPlaceholder": "https://…",
+ "bioLabel": "个人简介",
+ "bioPlaceholder": "一句话介绍自己",
+ "websiteLabel": "个人网站",
+ "saveSubmit": "保存资料",
+ "saveSubmitting": "保存中…",
+ "saveFailed": "资料保存失败,请稍后重试",
+ "saveSuccess": "资料已保存",
+ "passwordTitle": "修改密码",
+ "passwordRule": "长度 {{min}}-{{max}} 位,需同时包含字母和数字。",
+ "currentPasswordLabel": "当前密码",
+ "currentPasswordPlaceholder": "请输入当前密码",
+ "newPasswordLabel": "新密码",
+ "newPasswordPlaceholder": "请输入新密码",
+ "confirmPasswordLabel": "确认新密码",
+ "confirmPasswordPlaceholder": "请再次输入新密码",
+ "passwordMismatch": "两次输入的新密码不一致",
+ "passwordSubmit": "修改密码",
+ "passwordFailed": "密码修改失败,请稍后重试",
+ "passwordSuccess": "密码修改成功,请使用新密码重新登录",
+ "loadFailed": "资料加载失败,请稍后重试"
+ },
+ "favorites": {
+ "title": "{{site}} - 我的收藏",
+ "description": "当前登录用户收藏的文章列表。",
+ "eyebrow": "收藏 · Bookmarks",
+ "heading": "我的收藏",
+ "emptyTitle": "还没有收藏任何文章。",
+ "emptyNote": "在文章页点击收藏按钮,即可在这里找到它们。",
+ "loadFailed": "收藏列表加载失败,请稍后重试"
+ },
+ "follow": {
+ "signInRequired": "登录后即可关注作者",
+ "busy": "处理中…",
+ "following": "已关注",
+ "follow": "关注"
+ }
+}
diff --git a/apps/web/messages/zh/author.json5 b/apps/web/messages/zh/author.json5
new file mode 100644
index 0000000..d697002
--- /dev/null
+++ b/apps/web/messages/zh/author.json5
@@ -0,0 +1,13 @@
+{
+ "title": "{{name}} - 作者主页 - {{site}}",
+ "description": "{{name}}发布的全部文章",
+ "eyebrow": "作者 · Author",
+ "articleCount_one": "文章 {{count}} 篇",
+ "articleCount_other": "文章 {{count}} 篇",
+ "followerCount_one": "粉丝 {{count}}",
+ "followerCount_other": "粉丝 {{count}}",
+ "followingCount": "关注 {{count}}",
+ "emptyTitle": "该作者暂无已发布的文章。",
+ "emptyNote": "可以先去目录页看看其他内容。",
+ "notFound": "作者不存在"
+}
diff --git a/apps/web/messages/zh/blog.json5 b/apps/web/messages/zh/blog.json5
new file mode 100644
index 0000000..16eb159
--- /dev/null
+++ b/apps/web/messages/zh/blog.json5
@@ -0,0 +1,50 @@
+{
+ "list": {
+ "title": "{{site}} - 博客目录",
+ "description": "全部文章的目录页,按发布时间编排,支持关键词检索与翻页浏览。",
+ "eyebrow": "手记 · 全部刊目",
+ "heading": "博客目录",
+ "resultCount_one": "检索「{{search}}」· {{count}} 篇结果",
+ "resultCount_other": "检索「{{search}}」· {{count}} 篇结果",
+ "searchLabel": "搜索文章",
+ "searchPlaceholder": "检索标题与正文关键词…",
+ "searchSubmit": "检索",
+ "searchEmpty": "未检索到与「{{search}}」相关的文章。",
+ "searchEmptyBefore": "可以更换关键词重试,或",
+ "searchEmptyClear": "清除检索",
+ "searchEmptyAfter": "浏览全部刊目。"
+ },
+ "detail": {
+ "eyebrow": "手记 · 文章",
+ "notFound": "文章不存在或尚未发布",
+ "commentsClosed": "这篇文章已关闭评论。",
+ "backToIndex": "← 返回目录"
+ },
+ "archives": {
+ "title": "{{site}} - 归档",
+ "description": "全部文章的编年归档,按年份与月份编排。",
+ "eyebrow": "编年 · Archives",
+ "heading": "归档",
+ "orderNote": "按年份编排",
+ "emptyTitle": "时间线正在等待第一批文章。",
+ "yearCount_one": "共 {{count}} 篇文章",
+ "yearCount_other": "共 {{count}} 篇文章",
+ "monthLine": "{{month}} 月 · {{date}}"
+ },
+ "actions": {
+ "signInRequired": "登录后即可参与互动",
+ "liked": "已点赞",
+ "like": "点赞",
+ "bookmarked": "已收藏",
+ "bookmark": "收藏"
+ },
+ "pagination": {
+ "label": "分页导航",
+ "previous": "← 上一页",
+ "next": "下一页 →",
+ "position": "第 {{current}} / {{total}} 页"
+ },
+ "error": {
+ "archivesFailed": "归档数据加载失败,请稍后重试"
+ }
+}
diff --git a/apps/web/messages/zh/category.json5 b/apps/web/messages/zh/category.json5
new file mode 100644
index 0000000..7cdef32
--- /dev/null
+++ b/apps/web/messages/zh/category.json5
@@ -0,0 +1,7 @@
+{
+ "title": "{{name}} - 分类目录 - {{site}}",
+ "eyebrow": "分类 · {{slug}}",
+ "emptyTitle": "该分类下暂无已发布的文章。",
+ "emptyNote": "可以去目录页看看其他内容。",
+ "notFound": "分类不存在"
+}
diff --git a/apps/web/messages/zh/comment.json5 b/apps/web/messages/zh/comment.json5
new file mode 100644
index 0000000..51f7fe0
--- /dev/null
+++ b/apps/web/messages/zh/comment.json5
@@ -0,0 +1,17 @@
+{
+ "title": "评论",
+ "count_one": "共 {{count}} 条",
+ "count_other": "共 {{count}} 条",
+ "nameLabel": "姓名",
+ "namePlaceholder": "姓名 *",
+ "emailPlaceholder": "邮箱(不公开)",
+ "contentLabel": "评论内容",
+ "contentPlaceholder": "说点什么吧",
+ "guestContentPlaceholder": "以访客身份说点什么吧",
+ "moderationNote": "评论提交后需经审核才会展示",
+ "submit": "发表评论",
+ "empty": "还没有评论,来说点什么吧。",
+ "loadMore": "查看更多评论",
+ "submitFailed": "评论提交失败,请稍后重试",
+ "submitSuccess": "评论已提交,审核通过后展示"
+}
diff --git a/apps/web/messages/zh/contact.json5 b/apps/web/messages/zh/contact.json5
new file mode 100644
index 0000000..6aebdef
--- /dev/null
+++ b/apps/web/messages/zh/contact.json5
@@ -0,0 +1,13 @@
+{
+ "heading": "联系方式",
+ "description": "与{{site}}站长取得联系的真实渠道:GitHub、邮箱与友链互换。",
+ "eyebrow": "往来 · Contact",
+ "lead": "欢迎写信交流,无论是勘误指正、技术讨论还是单纯打个招呼。",
+ "channels": {
+ "emailNote": "合作与长文交流请来信,工作日通常两至三天内回复。",
+ "githubNote": "Issue 与讨论最适合技术话题,处理进度可见。"
+ },
+ "inSiteTitle": "站内通道",
+ "inSiteComments": "评论留言:任意文章页下方均可留言,游客可评,站长会逐条查看。",
+ "inSiteLinks": "友链互换:在页头「友情链接」弹窗底部提交申请,通过审核后即会展示。"
+}
diff --git a/apps/web/messages/zh/home.json5 b/apps/web/messages/zh/home.json5
new file mode 100644
index 0000000..2d8be9a
--- /dev/null
+++ b/apps/web/messages/zh/home.json5
@@ -0,0 +1,55 @@
+{
+ "seo": {
+ "title": "{{site}} - 把想法,编译成界面",
+ "description": "一个专注于技术分享和创意设计的个人博客,探索现代Web开发的无限可能。",
+ "descriptionShort": "一个专注于技术分享和创意设计的个人博客",
+ "keywords": "博客,技术,开发,设计,SvelteKit,Go,全栈开发"
+ },
+ "hero": {
+ "eyebrow": "手记 · 代码与生活",
+ "headlineLead": "把想法,",
+ "headlineTail": "编译成",
+ "headlineAccent": "界面",
+ "headlineNote": "// 工程 × 设计",
+ "intro": "记录工程实践的思考、城市漫游的见闻,以及那些深夜读完的书。相信缓慢而扎实的积累,偏爱干净的结构与诚实的文字。",
+ "ctaRead": "开始阅读",
+ "excerptLabel": "本月摘录",
+ "quote": "“把想清楚的事写下来,把写下来的事做出来。”",
+ "quoteAuthor": "—— 创刊编辑手记",
+ "specEngineering": "01 / 工程",
+ "specDesign": "02 / 设计",
+ "specLife": "03 / 生活",
+ "imprint": "{{site}} — EST. 2026",
+ "scrollHint": "Scroll"
+ },
+ "index": {
+ "title": "近期文章",
+ "emptyNote": "可以先浏览版面与站点介绍,或前往归档页等待更新。",
+ "viewAll": "查看全部文章"
+ },
+ "featured": {
+ "badge": "精选",
+ "categoryFallback": "手记",
+ "readMore": "阅读全文"
+ },
+ "sidebar": {
+ "popular": "热门文章",
+ "tags": "标签",
+ "subscribeTitle": "订阅手记",
+ "subscribeNote": "邮件订阅正在筹备中,开放后将汇总当月文章与书单,不打扰。",
+ "subscribeEmailLabel": "邮箱地址",
+ "subscribeEmailPlaceholder": "you@example.com",
+ "subscribeSubmit": "订阅",
+ "subscribeNotice": "订阅功能暂未开放,开放后会在站内公告,感谢耐心等待。"
+ },
+ "archivePreview": {
+ "title": "创作年轮",
+ "viewAll": "完整归档 →"
+ },
+ "action": {
+ "backToTop": "回到顶部"
+ },
+ "error": {
+ "loadFailed": "首页数据加载失败,请稍后重试"
+ }
+}
diff --git a/apps/web/messages/zh/privacy.json5 b/apps/web/messages/zh/privacy.json5
new file mode 100644
index 0000000..6b012cc
--- /dev/null
+++ b/apps/web/messages/zh/privacy.json5
@@ -0,0 +1,43 @@
+{
+ "heading": "隐私政策",
+ "description": "{{site}}的隐私政策:说明本站收集哪些数据、用途、留存与脱敏策略。",
+ "eyebrow": "合规 · Privacy",
+ "lead": "本站以最小必要原则处理访客数据,只收集维持功能运转所必需的信息,并在本页公开说明。",
+ "collectionTitle": "本站收集哪些数据",
+ "collection": {
+ "browsing": {
+ "title": "文章浏览数据",
+ "item1": "访问文章时记录来源 IP 地址,用于按访客与自然日去重统计浏览量;站点当前未启用浏览器指纹等额外访客标识。",
+ "item2": "浏览明细仅用于站内统计分析,聚合结果即文章页展示的浏览次数。"
+ },
+ "search": {
+ "title": "站内搜索记录",
+ "item1": "使用目录页检索时记录搜索关键词、结果数量与检索耗时,用于检索质量分析与热词优化。",
+ "item2": "搜索记录不与你的其他行为信息关联成画像。"
+ },
+ "comment": {
+ "title": "评论信息",
+ "item1": "游客留言需填写昵称与邮箱,昵称随评论公开展示,邮箱不公开展示。",
+ "item2": "评论表预留的 IP 与浏览器标识字段当前未启用;如未来启用,会先在本页更新告知。"
+ },
+ "account": {
+ "title": "账户资料",
+ "item1": "本站不开放注册,账号由站点管理员创建;登录账户时收集用户名、邮箱与密码,密码以 bcrypt 单向哈希存储,任何人(包括管理员)无法看到原文。",
+ "item2": "自助资料页中的昵称、头像、简介与网站地址仅用于站内展示。"
+ },
+ "session": {
+ "title": "登录会话 Cookie",
+ "item1": "登录成功后向浏览器写入 mb_access_token 与 mb_refresh_token 两个 Cookie,仅用于维持登录会话;令牌为服务端签发的不透明随机串,Cookie 本身不携带身份信息。",
+ "item2": "两个 Cookie 均开启 HttpOnly 属性,页面脚本无法读取,且仅随 /api 路径的请求发送;同站策略为 SameSite=Lax,跨站请求不会携带。",
+ "item3": "访问令牌有效期默认 15 分钟,刷新令牌默认 7 天;登出或修改密码后服务端撤销对应会话,并通知浏览器移除本地 Cookie。"
+ }
+ },
+ "promiseTitle": "本站的承诺",
+ "promise1": "数据不向第三方出售,也不与第三方共享。",
+ "promise2": "站点无广告脚本与跨站追踪器。",
+ "promise3": "公开接口输出经脱敏处理,评论邮箱、来源 IP 等敏感字段不随公开接口返回。",
+ "promise4": "浏览与搜索明细长期保存且仅用于统计分析;如引入自动清理周期,会在本页更新说明。",
+ "promise5": "新增数据收集场景前,先更新本页告知。",
+ "updateBefore": "本政策描述当前站点的实际数据处理方式;内容如有变更,会在本页直接更新并保留最新版本。对政策或数据处理的疑问,可经",
+ "updateAfter": "页面中的渠道提出。"
+}
diff --git a/apps/web/messages/zh/projects.json5 b/apps/web/messages/zh/projects.json5
new file mode 100644
index 0000000..aca9b8f
--- /dev/null
+++ b/apps/web/messages/zh/projects.json5
@@ -0,0 +1,16 @@
+{
+ "heading": "项目档案",
+ "description": "个人项目与开源作品的档案陈列,当前收录{{site}}全栈工程。",
+ "eyebrow": "档案 · Projects",
+ "lead": "这里陈列真实可查证的作品,每份档案随项目演进同步更新。",
+ "card": {
+ "title": "MyBlog · {{site}}",
+ "meta": "2026 年起 · 持续迭代",
+ "paragraphOne": "你正在浏览的站点,本身就是档案里的第一件作品:一套 Go 与 SvelteKit 构成的全栈个人博客工程,覆盖文章、评论、收藏、关注、通知、统计与友链等十一个业务模块,支持角色权限控制与中文全文检索。",
+ "paragraphTwo": "工程采用 pnpm Monorepo 组织:前端拆分为 api、http、auth、shared、ui 五个共享包,后端按 handler、service、repository 三层分层;评论审核状态机、通知生产链路与备份恢复脚本均为真实实现,而非演示样例。",
+ "sourceLink": "查看源码仓库"
+ },
+ "techStackTitle": "技术构成",
+ "moreTitle": "更多档案整理中,随刊出陆续上架。",
+ "moreNote": "新的作品会先在博客目录以手记形式亮相,再归入此处。"
+}
diff --git a/apps/web/messages/zh/ui.json5 b/apps/web/messages/zh/ui.json5
index caab02d..1fed6d3 100644
--- a/apps/web/messages/zh/ui.json5
+++ b/apps/web/messages/zh/ui.json5
@@ -2,6 +2,52 @@
"site": {
"name": "闲雨小筑"
},
+ "brand": {
+ "github": "GitHub"
+ },
+ "label": {
+ "email": "邮箱"
+ },
+ "author": {
+ "name": "开发者",
+ "role": "全栈开发工程师",
+ "roleWithFields": "全栈工程师 · 编程与设计",
+ "tagline": "一个热爱编程和设计的创造者,用代码编织创意,用技术改变世界。",
+ "note": "白天写代码,晚上写字。相信缓慢而扎实的积累,偏爱干净的结构与诚实的文字。",
+ "approach": "关注工程结构与界面品质的交界地带,习惯把复杂问题拆成清晰的小块,再把小块装回优雅的整体。"
+ },
+ "meta": {
+ "minutesRead": "阅读 {{count}} 分钟",
+ "minutesReadApprox": "约 {{count}} 分钟",
+ "views_one": "{{count}} 次浏览",
+ "views_other": "{{count}} 次浏览",
+ "postCount_one": "共 {{count}} 篇",
+ "postCount_other": "共 {{count}} 篇",
+ "ongoing": "持续更新",
+ "pageTitle": "{{title}} - {{site}}"
+ },
+ "empty": {
+ "inPreparation": "创刊号正在筹备中,文章即将发布。",
+ "backHome": "可以先回到首页浏览版面与站点介绍。"
+ },
+ "action": {
+ "failed": "操作失败,请稍后重试",
+ "submitting": "提交中…",
+ "backHome": "返回首页"
+ },
+ "session": {
+ "expired": "登录已过期,请重新登录"
+ },
+ "placeholder": {
+ "scheduleNote": "版面排期中 · 功能将在后续迭代接入"
+ },
+ "codeBlock": {
+ "copy": "复制",
+ "copied": "已复制",
+ "copyFailed": "复制失败",
+ "copyAria": "复制代码",
+ "plainText": "文本"
+ },
"button": {
"save": "保存",
"cancel": "取消",
@@ -39,9 +85,6 @@
"githubHome": "GitHub 主页",
"themeToggle": "切换主题",
"aboutAuthor": "关于作者",
- "aboutAuthorDesc": "一个热爱编程和设计的创造者,用代码编织创意,用技术改变世界。",
- "authorName": "开发者",
- "authorTitle": "全栈开发工程师",
"notifications": "通知",
"markAllRead": "全部已读",
"noNotifications": "暂无通知"
@@ -73,7 +116,6 @@
"contactEmail": "联系邮箱",
"contactEmailPlaceholder": "用于接收审核结果",
"submit": "提交申请",
- "submitting": "提交中…",
"applySubmitted": "申请已提交,等待站长审核",
"submitFailed": "申请提交失败,请稍后重试"
},
@@ -84,6 +126,6 @@
"serverErrorTitle": "印刷机出了点故障",
"serverErrorSubtitle": "服务器遇到了意外状况,内容暂时无法呈现",
"retry": "重试加载",
- "backHome": "返回首页"
+ "listFailed": "文章列表加载失败,请稍后重试"
}
}
diff --git a/apps/web/project.inlang/settings.json b/apps/web/project.inlang/settings.json
index ea99ec8..ad6e40f 100644
--- a/apps/web/project.inlang/settings.json
+++ b/apps/web/project.inlang/settings.json
@@ -8,7 +8,17 @@
"pathPattern": {
"common": "./messages/{locale}/common.json5",
"ui": "./messages/{locale}/ui.json5",
- "auth": "./messages/{locale}/auth.json5"
+ "auth": "./messages/{locale}/auth.json5",
+ "home": "./messages/{locale}/home.json5",
+ "blog": "./messages/{locale}/blog.json5",
+ "account": "./messages/{locale}/account.json5",
+ "comment": "./messages/{locale}/comment.json5",
+ "category": "./messages/{locale}/category.json5",
+ "author": "./messages/{locale}/author.json5",
+ "contact": "./messages/{locale}/contact.json5",
+ "projects": "./messages/{locale}/projects.json5",
+ "about": "./messages/{locale}/about.json5",
+ "privacy": "./messages/{locale}/privacy.json5"
}
},
"baseLocale": "zh",
diff --git a/apps/web/src/lib/components/article/ArchiveTimeline.svelte b/apps/web/src/lib/components/article/ArchiveTimeline.svelte
index 33b2ea7..f27cb0a 100644
--- a/apps/web/src/lib/components/article/ArchiveTimeline.svelte
+++ b/apps/web/src/lib/components/article/ArchiveTimeline.svelte
@@ -3,6 +3,7 @@ import type { ArticleArchiveYear } from '@myblog/api/modules/article/types'
import { gsap, MOTION } from '$lib/motion/gsap-setup'
import { formatDate } from '$lib/utils/format-date'
import { scrollReveal } from '$lib/motion/reveal'
+import { m } from '$i18n'
// 归档时间线属性:groups 为按年份倒序的归档分组。
interface Props {
@@ -54,7 +55,9 @@ $effect(() => {
{group.year} 共 {group.total} 篇文章
+ {m['blog:archives.yearCount']({ count: group.total })}
+
- {month.month} 月 · {formatDate(article.publishedAt ?? article.createdAt)} + {m['blog:archives.monthLine']({ + month: month.month, + date: formatDate(article.publishedAt ?? article.createdAt) + })}
版面排期中 · 功能将在后续迭代接入
++ {m['ui:placeholder.scheduleNote']()} +
未检索到与「{data.search}」相关的文章。
++ {m['blog:list.searchEmpty']({ search: data.search })} +
- 可以更换关键词重试,或 - 清除检索 - 浏览全部刊目。 + {m['blog:list.searchEmptyBefore']()} + + {m['blog:list.searchEmptyClear']()} + + {m['blog:list.searchEmptyAfter']()}
创刊号正在筹备中,文章即将发布。
-可以先回到首页浏览版面与站点介绍。
+{m['ui:empty.inPreparation']()}
+{m['ui:empty.backHome']()}
- 手记 · 文章 + {m['blog:detail.eyebrow']()}
这篇文章已关闭评论。
++ {m['blog:detail.commentsClosed']()} +
- 分类 · {category.slug} + {m['category:eyebrow']({ slug: category.slug })}
该分类下暂无已发布的文章。
-可以去目录页看看其他内容。
+{m['category:emptyTitle']()}
+{m['category:emptyNote']()}
- 往来 · Contact + {m['contact:eyebrow']()}
- 欢迎写信交流,无论是勘误指正、技术讨论还是单纯打个招呼。 + {m['contact:lead']()}
- 收藏 · Bookmarks + {m['account:favorites.eyebrow']()}
-还没有收藏任何文章。
-在文章页点击收藏按钮,即可在这里找到它们。
+{m['account:favorites.emptyTitle']()}
+{m['account:favorites.emptyNote']()}
- 门户 · Auth + {m['account:login.eyebrow']()}
-- 登录后即可参与评论、点赞、收藏与关注等互动。 + {m['account:login.description']()}
- 尚无账户时可通过评论区以访客身份留言,或联系站长开通。 + {m['account:login.guestNote']()}
diff --git a/apps/web/src/routes/(app)/privacy/+page.svelte b/apps/web/src/routes/(app)/privacy/+page.svelte index d8a0130..cb2f7eb 100644 --- a/apps/web/src/routes/(app)/privacy/+page.svelte +++ b/apps/web/src/routes/(app)/privacy/+page.svelte @@ -1,53 +1,53 @@- 合规 · Privacy + {m['privacy:eyebrow']()}
- 本站以最小必要原则处理访客数据,只收集维持功能运转所必需的信息,并在本页公开说明。 + {m['privacy:lead']()}
- 本政策描述当前站点的实际数据处理方式;内容如有变更,会在本页直接更新并保留最新版本。对政策或数据处理的疑问,可经 - 联系方式 - 页面中的渠道提出。 + {m['privacy:updateBefore']()} + + {m['contact:heading']()} + + {m['privacy:updateAfter']()}
- 资料 · Profile + {m['account:profile.eyebrow']()}
-- 档案 · Projects + {m['projects:eyebrow']()}
- 这里陈列真实可查证的作品,每份档案随项目演进同步更新。 + {m['projects:lead']()}
- 你正在浏览的站点,本身就是档案里的第一件作品:一套 Go 与 SvelteKit - 构成的全栈个人博客工程,覆盖文章、评论、收藏、关注、通知、统计与友链等十一个业务模块, - 支持角色权限控制与中文全文检索。 + {m['projects:card.paragraphOne']()}
- 工程采用 pnpm Monorepo 组织:前端拆分为 api、http、auth、shared、ui 五个共享包,后端按 - handler、service、repository - 三层分层;评论审核状态机、通知生产链路与备份恢复脚本均为真实实现,而非演示样例。 + {m['projects:card.paragraphTwo']()}
- 查看源码仓库 + {m['projects:card.sourceLink']()}