mirror of
https://github.com/saicaca/fuwari.git
synced 2026-01-10 14:22:51 +01:00
feat: add Vietnamese translation (#548)
Some checks failed
Code quality / quality (push) Failing after 11s
Build and Check / Astro Check for Node.js 22 (push) Failing after 6s
Build and Check / Astro Check for Node.js 23 (push) Failing after 5s
Build and Check / Astro Build for Node.js 22 (push) Failing after 4s
Build and Check / Astro Build for Node.js 23 (push) Failing after 5s
Some checks failed
Code quality / quality (push) Failing after 11s
Build and Check / Astro Check for Node.js 22 (push) Failing after 6s
Build and Check / Astro Check for Node.js 23 (push) Failing after 5s
Build and Check / Astro Build for Node.js 22 (push) Failing after 4s
Build and Check / Astro Build for Node.js 23 (push) Failing after 5s
* Create vi.ts Create i18n Vietnamese translation file. * Update translation.ts Added Vietnamese language support. * Update config.ts Add Vietnamese (vi) to be a possible value for the `lang` key. * Create README.vi.md Created Vietnamese version of README. * Update README.md Added navigation/link to Vietnamese version of README. * Update README.md fixed a mistake
This commit is contained in:
@@ -15,7 +15,8 @@ A static blog template built with [Astro](https://astro.build).
|
||||
[**日本語**](https://github.com/saicaca/fuwari/blob/main/docs/README.ja.md) /
|
||||
[**한국어**](https://github.com/saicaca/fuwari/blob/main/docs/README.ko.md) /
|
||||
[**Español**](https://github.com/saicaca/fuwari/blob/main/docs/README.es.md) /
|
||||
[**ไทย**](https://github.com/saicaca/fuwari/blob/main/docs/README.th.md) (Provided by the community and may not always be up-to-date)
|
||||
[**ไทย**](https://github.com/saicaca/fuwari/blob/main/docs/README.th.md) /
|
||||
[**Tiếng Việt**](https://github.com/saicaca/fuwari/blob/main/docs/README.vi.md) (Provided by the community and may not always be up-to-date)
|
||||
|
||||
## ✨ Features
|
||||
|
||||
|
||||
84
docs/README.vi.md
Normal file
84
docs/README.vi.md
Normal file
@@ -0,0 +1,84 @@
|
||||
# 🍥Fuwari
|
||||
|
||||
Một mẫu blog tĩnh được xây bằng [Astro](https://astro.build).
|
||||
|
||||
[**🖥️ Xem bản dùng thử (Vercel)**](https://fuwari.vercel.app)
|
||||
|
||||

|
||||
|
||||
## ✨ Tính năng
|
||||
|
||||
- [x] Được xây dựng bằng [Astro](https://astro.build) và [Tailwind CSS](https://tailwindcss.com)
|
||||
- [x] Có hoạt ảnh đổi chuyển trang mượt mà
|
||||
- [x] Chế độ sáng / tối
|
||||
- [x] Màu sắc và biểu ngữ có thể tùy chỉnh được
|
||||
- [x] Thiết kế nhanh nhạy
|
||||
- [x] Có chức năng tìm kiếm với [Pagefind](https://pagefind.app/)
|
||||
- [x] [Có các tính năng mở rộng của Markdown](https://github.com/saicaca/fuwari?tab=readme-ov-file#-markdown-extended-syntax)
|
||||
- [x] Có mục lục
|
||||
- [x] Nguồn cấp dữ liệu RSS
|
||||
|
||||
## 🚀 Bắt đầu
|
||||
|
||||
1. Tạo kho lưu trữ blog của bạn:
|
||||
- [Tạo một kho lưu trữ mới](https://github.com/saicaca/fuwari/generate) từ mẫu này hoặc fork kho lưu trữ này.
|
||||
- Hoặc chạy một trong các lệnh sau:
|
||||
```sh
|
||||
npm create fuwari@latest
|
||||
yarn create fuwari
|
||||
pnpm create fuwari@latest
|
||||
bun create fuwari@latest
|
||||
deno run -A npm:create-fuwari@latest
|
||||
```
|
||||
2. Để chỉnh sửa blog của bạn trên máy cục bộ, hãy clone kho lưu trữ của bạn, chạy lệnh `pnpm install` để cài đặt các phụ thuộc..
|
||||
- Cài đặt [pnpm](https://pnpm.io) `npm install -g pnpm` nếu chưa có.
|
||||
3. Chỉnh sửa tệp cấu hình `src/config.ts` để tùy chỉnh blog của bạn.
|
||||
4. Chạy `pnpm new-post <filename>` để tạo một bài viết mới và chỉnh sửa nó trong `src/content/posts/`.
|
||||
5. Triển khai blog của bạn lên Vercel, Netlify, GitHub Pages, etc. theo [chỉ dẫn](https://docs.astro.build/en/guides/deploy/). Bạn cần chỉnh sửa cấu hình trang web trong `astro.config.mjs` trước khi triển khai.
|
||||
|
||||
## 📝 Tiêu đề đầy đủ của bài viết
|
||||
|
||||
```yaml
|
||||
---
|
||||
title: Blog đầu tiên của mình
|
||||
published: 2023-09-09
|
||||
description: Đây là bài viết đầu tiên vủa mình trên trang blog tạo bằng Astro này.
|
||||
image: ./cover.jpg
|
||||
tags: [Foo, Bar]
|
||||
category: Front-end
|
||||
draft: false
|
||||
lang: jp # Chỉ đặt nếu ngôn ngữ của bài viết khác với ngôn ngữ của trang web trong `config.ts`
|
||||
---
|
||||
```
|
||||
|
||||
## 🧩 Cú pháp Markdown mở rộng
|
||||
|
||||
Ngoài việc Astro đã có hỗ trợ mặc định cho [Markdown vị Github](https://github.github.com/gfm/), một số tính năng Markdown khác cũng đã được bổ sung:
|
||||
|
||||
- Chêm xen ([Xem trước và Cách sử dụng](https://fuwari.vercel.app/posts/markdown-extended/#admonitions))
|
||||
- Thẻ hiển thị kho lưu trữ GitHub ([Xem trước và Cách sử dụng](https://fuwari.vercel.app/posts/markdown-extended/#github-repository-cards))
|
||||
- Các khối mã nâng cao với Expressive Code ([Xem trước](https://fuwari.vercel.app/posts/expressive-code/) / [Tài liệu](https://expressive-code.com/))
|
||||
|
||||
## ⚡ Lệnh
|
||||
|
||||
Tất cả các lệnh được chạy từ thư mục gốc của dự án, từ một bảng điều khiển:
|
||||
|
||||
| Lệnh | Mục đích |
|
||||
|:---------------------------|:----------------------------------------------------|
|
||||
| `pnpm install` | Cài đặt các phụ thuộc |
|
||||
| `pnpm dev` | Khởi động máy chủ cục bộ tại `localhost:4321` |
|
||||
| `pnpm build` | Xây dựng trang web của bạn vào `./dist/` |
|
||||
| `pnpm preview` | Xem trước bản web cục bộ của bạn, trước khi triển khai |
|
||||
| `pnpm check` | Chạy kiểm tra lỗi trong mã của bạn |
|
||||
| `pnpm format` | Định dạng mã của bạn bằng Biome |
|
||||
| `pnpm new-post <filename>` | Tạo một bài viết mới |
|
||||
| `pnpm astro ...` | Chạy các lệnh CLI như `astro add`, `astro check` |
|
||||
| `pnpm astro --help` | Nhận trợ giúp sử dụng Astro CLI |
|
||||
|
||||
## ✏️ Đóng góp
|
||||
|
||||
Xem [Hướng dẫn đóng góp](https://github.com/saicaca/fuwari/blob/main/CONTRIBUTING.md) để biết thêm chi tiết về cách đóng góp cho dự án này.
|
||||
|
||||
## 📄 Giấy phép
|
||||
|
||||
Dự án này đã được cấp Giấy phép MIT.
|
||||
@@ -10,7 +10,7 @@ import { LinkPreset } from "./types/config";
|
||||
export const siteConfig: SiteConfig = {
|
||||
title: "Fuwari",
|
||||
subtitle: "Demo Site",
|
||||
lang: "en", // 'en', 'zh_CN', 'zh_TW', 'ja', 'ko', 'es', 'th'
|
||||
lang: "en", // 'en', 'zh_CN', 'zh_TW', 'ja', 'ko', 'es', 'th', 'vi'
|
||||
themeColor: {
|
||||
hue: 250, // Default hue for the theme color, from 0 to 360. e.g. red: 0, teal: 200, cyan: 250, pink: 345
|
||||
fixed: false, // Hide the theme color picker for visitors
|
||||
|
||||
38
src/i18n/languages/vi.ts
Normal file
38
src/i18n/languages/vi.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
import Key from "../i18nKey";
|
||||
import type { Translation } from "../translation";
|
||||
|
||||
export const vi: Translation = {
|
||||
[Key.home]: "Trang chủ",
|
||||
[Key.about]: "Giới thiệu",
|
||||
[Key.archive]: "Kho bài",
|
||||
[Key.search]: "Tìm kiếm",
|
||||
|
||||
[Key.tags]: "Thẻ",
|
||||
[Key.categories]: "Danh mục",
|
||||
[Key.recentPosts]: "Bài viết mới nhất",
|
||||
|
||||
[Key.comments]: "Bình luận",
|
||||
|
||||
[Key.untitled]: "Không tiêu đề",
|
||||
[Key.uncategorized]: "Chưa phân loại",
|
||||
[Key.noTags]: "Chưa có thẻ",
|
||||
|
||||
[Key.wordCount]: "từ",
|
||||
[Key.wordsCount]: "từ",
|
||||
[Key.minuteCount]: "phút đọc",
|
||||
[Key.minutesCount]: "phút đọc",
|
||||
[Key.postCount]: "bài viết",
|
||||
[Key.postsCount]: "bài viết",
|
||||
|
||||
[Key.themeColor]: "Màu giao diện",
|
||||
|
||||
[Key.lightMode]: "Sáng",
|
||||
[Key.darkMode]: "Tối",
|
||||
[Key.systemMode]: "Hệ thống",
|
||||
|
||||
[Key.more]: "Thêm",
|
||||
|
||||
[Key.author]: "Tác giả",
|
||||
[Key.publishedAt]: "Đăng vào lúc",
|
||||
[Key.license]: "Giấy phép bản quyền",
|
||||
};
|
||||
@@ -5,6 +5,7 @@ import { es } from "./languages/es";
|
||||
import { ja } from "./languages/ja";
|
||||
import { ko } from "./languages/ko";
|
||||
import { th } from "./languages/th";
|
||||
import { vi } from "./languages/vi";
|
||||
import { zh_CN } from "./languages/zh_CN";
|
||||
import { zh_TW } from "./languages/zh_TW";
|
||||
|
||||
@@ -28,6 +29,8 @@ const map: { [key: string]: Translation } = {
|
||||
ko_kr: ko,
|
||||
th: th,
|
||||
th_th: th,
|
||||
vi: vi,
|
||||
vi_vn: vi,
|
||||
};
|
||||
|
||||
export function getTranslation(lang: string): Translation {
|
||||
|
||||
Reference in New Issue
Block a user