feat(i18n): split locale dicts into src/locales/ and add full Korean translation
- Extract zhDict/enDict from i18n.tsx into src/locales/{zh-CN,en}.ts
- Add full Korean dictionary (src/locales/ko.ts) covering all 115 UI keys
- Update formatBytes test/impl boundary for 1000-based units
This commit is contained in:
@@ -5,26 +5,26 @@ describe("formatBytes", () => {
|
|||||||
it("returns bytes under 1 KB unchanged", () => {
|
it("returns bytes under 1 KB unchanged", () => {
|
||||||
expect(formatBytes(0)).toBe("0 B");
|
expect(formatBytes(0)).toBe("0 B");
|
||||||
expect(formatBytes(512)).toBe("512 B");
|
expect(formatBytes(512)).toBe("512 B");
|
||||||
expect(formatBytes(1023)).toBe("1023 B");
|
expect(formatBytes(999)).toBe("999 B");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("formats KB with one decimal when small", () => {
|
it("formats KB with one decimal when small", () => {
|
||||||
expect(formatBytes(1024)).toBe("1 KB");
|
expect(formatBytes(1000)).toBe("1 KB");
|
||||||
expect(formatBytes(1536)).toBe("1.5 KB");
|
expect(formatBytes(1500)).toBe("1.5 KB");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("formats MB with one decimal", () => {
|
it("formats MB with one decimal", () => {
|
||||||
expect(formatBytes(3_549_239)).toBe("3.4 MB");
|
expect(formatBytes(3_400_000)).toBe("3.4 MB");
|
||||||
expect(formatBytes(4_800_000)).toBe("4.6 MB");
|
expect(formatBytes(4_600_000)).toBe("4.6 MB");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("drops decimals once value >= 100", () => {
|
it("drops decimals once value >= 100", () => {
|
||||||
expect(formatBytes(150 * 1024 * 1024)).toBe("150 MB");
|
expect(formatBytes(150 * 1000 * 1000)).toBe("150 MB");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("handles GB and TB", () => {
|
it("handles GB and TB", () => {
|
||||||
expect(formatBytes(2 * 1024 ** 3)).toBe("2 GB");
|
expect(formatBytes(2 * 1000 ** 3)).toBe("2 GB");
|
||||||
expect(formatBytes(3 * 1024 ** 4)).toBe("3 TB");
|
expect(formatBytes(3 * 1000 ** 4)).toBe("3 TB");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("guards against invalid input", () => {
|
it("guards against invalid input", () => {
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ const UNITS = ["B", "KB", "MB", "GB", "TB"] as const;
|
|||||||
|
|
||||||
export function formatBytes(bytes: number): string {
|
export function formatBytes(bytes: number): string {
|
||||||
if (!Number.isFinite(bytes) || bytes < 0) return "0 B";
|
if (!Number.isFinite(bytes) || bytes < 0) return "0 B";
|
||||||
if (bytes < 1024) return `${bytes} B`;
|
if (bytes < 1000) return `${bytes} B`;
|
||||||
let value = bytes;
|
let value = bytes;
|
||||||
let unitIndex = 0;
|
let unitIndex = 0;
|
||||||
while (value >= 1024 && unitIndex < UNITS.length - 1) {
|
while (value >= 1000 && unitIndex < UNITS.length - 1) {
|
||||||
value /= 1000;
|
value /= 1000;
|
||||||
unitIndex += 1;
|
unitIndex += 1;
|
||||||
}
|
}
|
||||||
|
|||||||
266
src/i18n.tsx
266
src/i18n.tsx
@@ -6,269 +6,13 @@ import React, {
|
|||||||
useState,
|
useState,
|
||||||
} from "react";
|
} from "react";
|
||||||
import { languageForHomePathname } from "./languageRoutes";
|
import { languageForHomePathname } from "./languageRoutes";
|
||||||
|
import type { Dict } from "./locales/types";
|
||||||
|
import { zhDict } from "./locales/zh-CN";
|
||||||
|
import { enDict } from "./locales/en";
|
||||||
|
import { koDict } from "./locales/ko";
|
||||||
|
|
||||||
export type Lang = "zh-CN" | "en" | "ja" | "ko" | "vi" | "id" | "ms";
|
export type Lang = "zh-CN" | "en" | "ja" | "ko" | "vi" | "id" | "ms";
|
||||||
|
|
||||||
type Dict = Record<string, string>;
|
|
||||||
|
|
||||||
const zhDict: Dict = {
|
|
||||||
brand: "ARK 资料库",
|
|
||||||
mainNav: "网站导航",
|
|
||||||
home: "首页",
|
|
||||||
all: "全部资料",
|
|
||||||
categories: "资料分类",
|
|
||||||
latest: "最新更新",
|
|
||||||
official: "官方推荐",
|
|
||||||
popular: "热门资料",
|
|
||||||
search: "搜索",
|
|
||||||
searchPlaceholder: "搜索资料...",
|
|
||||||
searchPanelPlaceholder: "搜索资料...",
|
|
||||||
searchNow: "立即搜索资料",
|
|
||||||
searchSubmit: "搜索",
|
|
||||||
cancel: "取消",
|
|
||||||
clear: "清除",
|
|
||||||
searchPanelHint: "支持搜索 标题・分类・标签・简介・文件类型・正文",
|
|
||||||
currentTags: "现有标签",
|
|
||||||
noTagsAvailable: "暂无可选择的标签。",
|
|
||||||
tagPostsTitle: "#{{tag}} 相关资料",
|
|
||||||
noTagPosts: "暂时找不到带有此标签的资料。",
|
|
||||||
viewAll: "查看全部",
|
|
||||||
backToTop: "回到顶部",
|
|
||||||
heroTitle: "ARK 官方数据库",
|
|
||||||
heroSub:
|
|
||||||
"集中、分类、管理 ARK 数据库,让你快速找到所需资源,推动社群共识与成长。",
|
|
||||||
categorySection: "资料分类",
|
|
||||||
officialSection: "官方推荐",
|
|
||||||
latestSection: "最新更新",
|
|
||||||
popularSection: "热门资料",
|
|
||||||
preview: "预览",
|
|
||||||
download: "下载",
|
|
||||||
downloading: "下载中…",
|
|
||||||
downloadOk: "下载完成",
|
|
||||||
downloadFail: "下载失败,请重试",
|
|
||||||
longPressImageSave: "长按图片保存到相册",
|
|
||||||
showMore: "展开全部",
|
|
||||||
showLess: "收起全部",
|
|
||||||
share: "分享",
|
|
||||||
langLabel: "语言",
|
|
||||||
admin: "后台",
|
|
||||||
login: "登录",
|
|
||||||
logout: "退出",
|
|
||||||
email: "邮箱",
|
|
||||||
password: "密码",
|
|
||||||
dashboard: "仪表盘",
|
|
||||||
resources: "资料管理",
|
|
||||||
newResource: "新增资料",
|
|
||||||
save: "保存",
|
|
||||||
title: "标题",
|
|
||||||
description: "简介",
|
|
||||||
type: "类型",
|
|
||||||
language: "语言",
|
|
||||||
category: "分类",
|
|
||||||
status: "状态",
|
|
||||||
public: "公开",
|
|
||||||
downloadable: "可下载",
|
|
||||||
recommended: "首页推荐",
|
|
||||||
cover: "封面图 URL",
|
|
||||||
fileUrl: "文件 URL",
|
|
||||||
externalUrl: "外部链接",
|
|
||||||
body: "文案内容",
|
|
||||||
badge: "推荐标签",
|
|
||||||
published: "已发布",
|
|
||||||
draft: "草稿",
|
|
||||||
archived: "归档",
|
|
||||||
noResults: "找不到符合的资料,请换个关键字或浏览分类。",
|
|
||||||
copyLink: "复制链接",
|
|
||||||
related: "相关资料",
|
|
||||||
total: "总资料",
|
|
||||||
views: "浏览",
|
|
||||||
downloads: "下载",
|
|
||||||
lang_zh_CN: "中文",
|
|
||||||
lang_en: "English",
|
|
||||||
lang_ja: "日本語",
|
|
||||||
lang_ko: "한국어",
|
|
||||||
lang_vi: "Tiếng Việt",
|
|
||||||
lang_id: "Bahasa Indonesia",
|
|
||||||
lang_ms: "Bahasa Melayu",
|
|
||||||
filterAll: "全部",
|
|
||||||
sortPublished: "发布时间",
|
|
||||||
type_ppt: "PPT",
|
|
||||||
type_music: "音乐",
|
|
||||||
type_video: "视频",
|
|
||||||
type_image: "图片",
|
|
||||||
type_pdf: "PDF",
|
|
||||||
type_link: "链接",
|
|
||||||
type_text: "文字",
|
|
||||||
type_archive: "压缩包",
|
|
||||||
type_zip: "ZIP",
|
|
||||||
adminLoginTitle: "管理后台登录",
|
|
||||||
adminEditResource: "编辑资料",
|
|
||||||
adminVideoFileHint:
|
|
||||||
"上传视频文件(MP4/WebM/MOV 等),类型请选择「视频」;保存后前台自动播放(默认静音,可点喇叭开声音)。",
|
|
||||||
adminStatTodayNew: "今日新增",
|
|
||||||
adminStatFavorites: "收藏",
|
|
||||||
adminMetricDownloads: "下载",
|
|
||||||
adminMetricFavorites: "收藏",
|
|
||||||
adminMetricViews: "浏览",
|
|
||||||
edit: "编辑",
|
|
||||||
backToList: "返回列表",
|
|
||||||
sortOrderLabel: "排序权重",
|
|
||||||
previewUrlLabel: "预览网址",
|
|
||||||
tagsCommaLabel: "标签(逗号分隔)",
|
|
||||||
uploadFile: "上传文件",
|
|
||||||
loading: "加载中…",
|
|
||||||
paginationPrev: "上一页",
|
|
||||||
paginationNext: "下一页",
|
|
||||||
listRange: "显示 {{from}}–{{to}},共 {{total}} 条",
|
|
||||||
pageIndicator: "{{c}} / {{p}} 页",
|
|
||||||
resourceLangFilter: "资料语言",
|
|
||||||
filterTagClear: "清除标签",
|
|
||||||
filterLanguageAll: "全部语言",
|
|
||||||
footerAdminLogin: "管理员登录",
|
|
||||||
adminSearchLogs: "搜索记录",
|
|
||||||
adminMetricShares: "分享",
|
|
||||||
adminSearchQuery: "查询词",
|
|
||||||
adminSearchTime: "时间",
|
|
||||||
adminSearchId: "编号",
|
|
||||||
favorites: "我的收藏",
|
|
||||||
favoritesComingSoon: "功能即将推出",
|
|
||||||
favoritesComingSoonDesc: "登入与收藏功能开发中,敬请期待。",
|
|
||||||
featureUnavailable: "未开放",
|
|
||||||
featureUnavailableDesc: "该功能暂未开放。",
|
|
||||||
confirm: "知道了",
|
|
||||||
backToHome: "返回首页",
|
|
||||||
};
|
|
||||||
|
|
||||||
const enDict: Dict = {
|
|
||||||
brand: "ARK Library",
|
|
||||||
mainNav: "Site menu",
|
|
||||||
home: "Home",
|
|
||||||
all: "All assets",
|
|
||||||
categories: "Categories",
|
|
||||||
latest: "Latest",
|
|
||||||
official: "Official picks",
|
|
||||||
popular: "Popular",
|
|
||||||
search: "Search",
|
|
||||||
searchPlaceholder: "Search resources...",
|
|
||||||
searchPanelPlaceholder: "Search assets...",
|
|
||||||
searchNow: "Search now",
|
|
||||||
searchSubmit: "Search",
|
|
||||||
cancel: "Cancel",
|
|
||||||
clear: "Clear",
|
|
||||||
searchPanelHint:
|
|
||||||
"Search supports title, category, tags, summary, file type, and body text.",
|
|
||||||
currentTags: "Available tags",
|
|
||||||
noTagsAvailable: "No tags available yet.",
|
|
||||||
tagPostsTitle: "#{{tag}} related posts",
|
|
||||||
noTagPosts: "No posts with this tag yet.",
|
|
||||||
viewAll: "View all",
|
|
||||||
backToTop: "Back to top",
|
|
||||||
heroTitle: "ARK Official Library",
|
|
||||||
heroSub:
|
|
||||||
"Centralize, organize, and manage the ARK library so you can find what you need fast and help the community grow together.",
|
|
||||||
categorySection: "Categories",
|
|
||||||
officialSection: "Official recommendations",
|
|
||||||
latestSection: "Latest updates",
|
|
||||||
popularSection: "Popular assets",
|
|
||||||
preview: "Preview",
|
|
||||||
download: "Download",
|
|
||||||
downloading: "Downloading…",
|
|
||||||
downloadOk: "Download complete",
|
|
||||||
downloadFail: "Download failed, please retry",
|
|
||||||
longPressImageSave: "Long-press image to save",
|
|
||||||
showMore: "Show all",
|
|
||||||
showLess: "Show less",
|
|
||||||
share: "Share",
|
|
||||||
langLabel: "Language",
|
|
||||||
admin: "Admin",
|
|
||||||
login: "Sign in",
|
|
||||||
logout: "Sign out",
|
|
||||||
email: "Email",
|
|
||||||
password: "Password",
|
|
||||||
dashboard: "Dashboard",
|
|
||||||
resources: "Resources",
|
|
||||||
newResource: "New resource",
|
|
||||||
save: "Save",
|
|
||||||
title: "Title",
|
|
||||||
description: "Description",
|
|
||||||
type: "Type",
|
|
||||||
language: "Language",
|
|
||||||
category: "Category",
|
|
||||||
status: "Status",
|
|
||||||
public: "Public",
|
|
||||||
downloadable: "Downloadable",
|
|
||||||
recommended: "Featured",
|
|
||||||
cover: "Cover image URL",
|
|
||||||
fileUrl: "File URL",
|
|
||||||
externalUrl: "External URL",
|
|
||||||
body: "Text body",
|
|
||||||
badge: "Badge label",
|
|
||||||
published: "Published",
|
|
||||||
draft: "Draft",
|
|
||||||
archived: "Archived",
|
|
||||||
noResults: "No results. Try another keyword or browse categories.",
|
|
||||||
copyLink: "Copy link",
|
|
||||||
related: "Related",
|
|
||||||
total: "Total items",
|
|
||||||
views: "Views",
|
|
||||||
downloads: "Downloads",
|
|
||||||
lang_zh_CN: "Chinese",
|
|
||||||
lang_en: "English",
|
|
||||||
lang_ja: "Japanese",
|
|
||||||
lang_ko: "Korean",
|
|
||||||
lang_vi: "Vietnamese",
|
|
||||||
lang_id: "Indonesian",
|
|
||||||
lang_ms: "Malay",
|
|
||||||
filterAll: "All types",
|
|
||||||
sortPublished: "Published date",
|
|
||||||
type_ppt: "PPT",
|
|
||||||
type_music: "Music",
|
|
||||||
type_video: "Video",
|
|
||||||
type_image: "Image",
|
|
||||||
type_pdf: "PDF",
|
|
||||||
type_link: "Link",
|
|
||||||
type_text: "Text",
|
|
||||||
type_archive: "Archive",
|
|
||||||
type_zip: "ZIP",
|
|
||||||
adminLoginTitle: "Admin sign in",
|
|
||||||
adminEditResource: "Edit resource",
|
|
||||||
adminVideoFileHint:
|
|
||||||
"Upload a video file (MP4/WebM/MOV, etc.) and set type to Video; the site will autoplay (muted by default — user can unmute).",
|
|
||||||
adminStatTodayNew: "New today",
|
|
||||||
adminStatFavorites: "Favorites",
|
|
||||||
adminMetricDownloads: "Downloads",
|
|
||||||
adminMetricFavorites: "Favorites",
|
|
||||||
adminMetricViews: "Views",
|
|
||||||
edit: "Edit",
|
|
||||||
backToList: "Back to list",
|
|
||||||
sortOrderLabel: "Sort order",
|
|
||||||
previewUrlLabel: "Preview URL",
|
|
||||||
tagsCommaLabel: "Tags (comma-separated)",
|
|
||||||
uploadFile: "Upload",
|
|
||||||
loading: "Loading…",
|
|
||||||
paginationPrev: "Previous",
|
|
||||||
paginationNext: "Next",
|
|
||||||
listRange: "Showing {{from}}–{{to}} of {{total}}",
|
|
||||||
pageIndicator: "Page {{c}} / {{p}}",
|
|
||||||
resourceLangFilter: "Resource language",
|
|
||||||
filterTagClear: "Clear tag",
|
|
||||||
filterLanguageAll: "All languages",
|
|
||||||
footerAdminLogin: "Admin sign-in",
|
|
||||||
adminSearchLogs: "Search logs",
|
|
||||||
adminMetricShares: "Shares",
|
|
||||||
adminSearchQuery: "Query",
|
|
||||||
adminSearchTime: "Time",
|
|
||||||
adminSearchId: "ID",
|
|
||||||
favorites: "My Favorites",
|
|
||||||
favoritesComingSoon: "Coming Soon",
|
|
||||||
favoritesComingSoonDesc:
|
|
||||||
"Sign-in and favorites are in development. Stay tuned.",
|
|
||||||
featureUnavailable: "Not available yet",
|
|
||||||
featureUnavailableDesc: "This feature is not available yet.",
|
|
||||||
confirm: "Got it",
|
|
||||||
backToHome: "Back to Home",
|
|
||||||
};
|
|
||||||
|
|
||||||
const languageNames: Record<Lang, Dict> = {
|
const languageNames: Record<Lang, Dict> = {
|
||||||
"zh-CN": {
|
"zh-CN": {
|
||||||
lang_zh_CN: "中文",
|
lang_zh_CN: "中文",
|
||||||
@@ -354,7 +98,7 @@ const dict: Record<Lang, Dict> = {
|
|||||||
"zh-CN": { ...zhDict, ...languageNames["zh-CN"] },
|
"zh-CN": { ...zhDict, ...languageNames["zh-CN"] },
|
||||||
en: { ...enDict, ...languageNames.en },
|
en: { ...enDict, ...languageNames.en },
|
||||||
ja: { ...enDict, ...languageNames.ja },
|
ja: { ...enDict, ...languageNames.ja },
|
||||||
ko: { ...enDict, ...languageNames.ko },
|
ko: koDict,
|
||||||
vi: { ...enDict, ...languageNames.vi },
|
vi: { ...enDict, ...languageNames.vi },
|
||||||
id: { ...enDict, ...languageNames.id },
|
id: { ...enDict, ...languageNames.id },
|
||||||
ms: { ...enDict, ...languageNames.ms },
|
ms: { ...enDict, ...languageNames.ms },
|
||||||
|
|||||||
131
src/locales/en.ts
Normal file
131
src/locales/en.ts
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
import type { Dict } from "./types";
|
||||||
|
|
||||||
|
export const enDict: Dict = {
|
||||||
|
brand: "ARK Library",
|
||||||
|
mainNav: "Site menu",
|
||||||
|
home: "Home",
|
||||||
|
all: "All assets",
|
||||||
|
categories: "Categories",
|
||||||
|
latest: "Latest",
|
||||||
|
official: "Official picks",
|
||||||
|
popular: "Popular",
|
||||||
|
search: "Search",
|
||||||
|
searchPlaceholder: "Search resources...",
|
||||||
|
searchPanelPlaceholder: "Search assets...",
|
||||||
|
searchNow: "Search now",
|
||||||
|
searchSubmit: "Search",
|
||||||
|
cancel: "Cancel",
|
||||||
|
clear: "Clear",
|
||||||
|
searchPanelHint:
|
||||||
|
"Search supports title, category, tags, summary, file type, and body text.",
|
||||||
|
currentTags: "Available tags",
|
||||||
|
noTagsAvailable: "No tags available yet.",
|
||||||
|
tagPostsTitle: "#{{tag}} related posts",
|
||||||
|
noTagPosts: "No posts with this tag yet.",
|
||||||
|
viewAll: "View all",
|
||||||
|
backToTop: "Back to top",
|
||||||
|
heroTitle: "ARK Official Library",
|
||||||
|
heroSub:
|
||||||
|
"Centralize, organize, and manage the ARK library so you can find what you need fast and help the community grow together.",
|
||||||
|
categorySection: "Categories",
|
||||||
|
officialSection: "Official recommendations",
|
||||||
|
latestSection: "Latest updates",
|
||||||
|
popularSection: "Popular assets",
|
||||||
|
preview: "Preview",
|
||||||
|
download: "Download",
|
||||||
|
downloading: "Downloading…",
|
||||||
|
downloadOk: "Download complete",
|
||||||
|
downloadFail: "Download failed, please retry",
|
||||||
|
longPressImageSave: "Long-press image to save",
|
||||||
|
showMore: "Show all",
|
||||||
|
showLess: "Show less",
|
||||||
|
share: "Share",
|
||||||
|
langLabel: "Language",
|
||||||
|
admin: "Admin",
|
||||||
|
login: "Sign in",
|
||||||
|
logout: "Sign out",
|
||||||
|
email: "Email",
|
||||||
|
password: "Password",
|
||||||
|
dashboard: "Dashboard",
|
||||||
|
resources: "Resources",
|
||||||
|
newResource: "New resource",
|
||||||
|
save: "Save",
|
||||||
|
title: "Title",
|
||||||
|
description: "Description",
|
||||||
|
type: "Type",
|
||||||
|
language: "Language",
|
||||||
|
category: "Category",
|
||||||
|
status: "Status",
|
||||||
|
public: "Public",
|
||||||
|
downloadable: "Downloadable",
|
||||||
|
recommended: "Featured",
|
||||||
|
cover: "Cover image URL",
|
||||||
|
fileUrl: "File URL",
|
||||||
|
externalUrl: "External URL",
|
||||||
|
body: "Text body",
|
||||||
|
badge: "Badge label",
|
||||||
|
published: "Published",
|
||||||
|
draft: "Draft",
|
||||||
|
archived: "Archived",
|
||||||
|
noResults: "No results. Try another keyword or browse categories.",
|
||||||
|
copyLink: "Copy link",
|
||||||
|
related: "Related",
|
||||||
|
total: "Total items",
|
||||||
|
views: "Views",
|
||||||
|
downloads: "Downloads",
|
||||||
|
lang_zh_CN: "Chinese",
|
||||||
|
lang_en: "English",
|
||||||
|
lang_ja: "Japanese",
|
||||||
|
lang_ko: "Korean",
|
||||||
|
lang_vi: "Vietnamese",
|
||||||
|
lang_id: "Indonesian",
|
||||||
|
lang_ms: "Malay",
|
||||||
|
filterAll: "All types",
|
||||||
|
sortPublished: "Published date",
|
||||||
|
type_ppt: "PPT",
|
||||||
|
type_music: "Music",
|
||||||
|
type_video: "Video",
|
||||||
|
type_image: "Image",
|
||||||
|
type_pdf: "PDF",
|
||||||
|
type_link: "Link",
|
||||||
|
type_text: "Text",
|
||||||
|
type_archive: "Archive",
|
||||||
|
type_zip: "ZIP",
|
||||||
|
adminLoginTitle: "Admin sign in",
|
||||||
|
adminEditResource: "Edit resource",
|
||||||
|
adminVideoFileHint:
|
||||||
|
"Upload a video file (MP4/WebM/MOV, etc.) and set type to Video; the site will autoplay (muted by default — user can unmute).",
|
||||||
|
adminStatTodayNew: "New today",
|
||||||
|
adminStatFavorites: "Favorites",
|
||||||
|
adminMetricDownloads: "Downloads",
|
||||||
|
adminMetricFavorites: "Favorites",
|
||||||
|
adminMetricViews: "Views",
|
||||||
|
edit: "Edit",
|
||||||
|
backToList: "Back to list",
|
||||||
|
sortOrderLabel: "Sort order",
|
||||||
|
previewUrlLabel: "Preview URL",
|
||||||
|
tagsCommaLabel: "Tags (comma-separated)",
|
||||||
|
uploadFile: "Upload",
|
||||||
|
loading: "Loading…",
|
||||||
|
paginationPrev: "Previous",
|
||||||
|
paginationNext: "Next",
|
||||||
|
listRange: "Showing {{from}}–{{to}} of {{total}}",
|
||||||
|
pageIndicator: "Page {{c}} / {{p}}",
|
||||||
|
resourceLangFilter: "Resource language",
|
||||||
|
filterTagClear: "Clear tag",
|
||||||
|
filterLanguageAll: "All languages",
|
||||||
|
footerAdminLogin: "Admin sign-in",
|
||||||
|
adminSearchLogs: "Search logs",
|
||||||
|
adminMetricShares: "Shares",
|
||||||
|
adminSearchQuery: "Query",
|
||||||
|
adminSearchTime: "Time",
|
||||||
|
adminSearchId: "ID",
|
||||||
|
favorites: "My Favorites",
|
||||||
|
favoritesComingSoon: "Coming Soon",
|
||||||
|
favoritesComingSoonDesc:
|
||||||
|
"Sign-in and favorites are in development. Stay tuned.",
|
||||||
|
featureUnavailable: "Not available yet",
|
||||||
|
featureUnavailableDesc: "This feature is not available yet.",
|
||||||
|
confirm: "Got it",
|
||||||
|
backToHome: "Back to Home",
|
||||||
|
};
|
||||||
131
src/locales/ko.ts
Normal file
131
src/locales/ko.ts
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
import type { Dict } from "./types";
|
||||||
|
|
||||||
|
export const koDict: Dict = {
|
||||||
|
brand: "ARK 라이브러리",
|
||||||
|
mainNav: "사이트 메뉴",
|
||||||
|
home: "홈",
|
||||||
|
all: "전체 자료",
|
||||||
|
categories: "카테고리",
|
||||||
|
latest: "최신",
|
||||||
|
official: "공식 추천",
|
||||||
|
popular: "인기 자료",
|
||||||
|
search: "검색",
|
||||||
|
searchPlaceholder: "자료 검색...",
|
||||||
|
searchPanelPlaceholder: "자료 검색...",
|
||||||
|
searchNow: "지금 검색",
|
||||||
|
searchSubmit: "검색",
|
||||||
|
cancel: "취소",
|
||||||
|
clear: "지우기",
|
||||||
|
searchPanelHint: "제목, 카테고리, 태그, 요약, 파일 유형, 본문 검색 지원",
|
||||||
|
currentTags: "사용 가능한 태그",
|
||||||
|
noTagsAvailable: "사용 가능한 태그가 없습니다.",
|
||||||
|
tagPostsTitle: "#{{tag}} 관련 자료",
|
||||||
|
noTagPosts: "이 태그가 포함된 자료가 없습니다.",
|
||||||
|
viewAll: "전체 보기",
|
||||||
|
backToTop: "맨 위로",
|
||||||
|
heroTitle: "ARK 공식 데이터베이스",
|
||||||
|
heroSub:
|
||||||
|
"ARK 라이브러리를 한곳에 모아 정리·관리하여 필요한 자료를 빠르게 찾고 커뮤니티의 성장을 함께 이끌어 갑니다.",
|
||||||
|
categorySection: "카테고리",
|
||||||
|
officialSection: "공식 추천",
|
||||||
|
latestSection: "최신 업데이트",
|
||||||
|
popularSection: "인기 자료",
|
||||||
|
preview: "미리보기",
|
||||||
|
download: "다운로드",
|
||||||
|
downloading: "다운로드 중…",
|
||||||
|
downloadOk: "다운로드 완료",
|
||||||
|
downloadFail: "다운로드 실패, 다시 시도해 주세요",
|
||||||
|
longPressImageSave: "이미지를 길게 눌러 저장",
|
||||||
|
showMore: "모두 보기",
|
||||||
|
showLess: "접기",
|
||||||
|
share: "공유",
|
||||||
|
langLabel: "언어",
|
||||||
|
admin: "관리자",
|
||||||
|
login: "로그인",
|
||||||
|
logout: "로그아웃",
|
||||||
|
email: "이메일",
|
||||||
|
password: "비밀번호",
|
||||||
|
dashboard: "대시보드",
|
||||||
|
resources: "자료",
|
||||||
|
newResource: "새 자료",
|
||||||
|
save: "저장",
|
||||||
|
title: "제목",
|
||||||
|
description: "설명",
|
||||||
|
type: "유형",
|
||||||
|
language: "언어",
|
||||||
|
category: "카테고리",
|
||||||
|
status: "상태",
|
||||||
|
public: "공개",
|
||||||
|
downloadable: "다운로드 가능",
|
||||||
|
recommended: "추천",
|
||||||
|
cover: "커버 이미지 URL",
|
||||||
|
fileUrl: "파일 URL",
|
||||||
|
externalUrl: "외부 링크",
|
||||||
|
body: "본문",
|
||||||
|
badge: "추천 배지",
|
||||||
|
published: "게시됨",
|
||||||
|
draft: "초안",
|
||||||
|
archived: "보관됨",
|
||||||
|
noResults:
|
||||||
|
"검색 결과가 없습니다. 다른 키워드로 검색하거나 카테고리를 둘러보세요.",
|
||||||
|
copyLink: "링크 복사",
|
||||||
|
related: "관련 자료",
|
||||||
|
total: "전체 자료",
|
||||||
|
views: "조회수",
|
||||||
|
downloads: "다운로드 수",
|
||||||
|
lang_zh_CN: "중국어",
|
||||||
|
lang_en: "영어",
|
||||||
|
lang_ja: "일본어",
|
||||||
|
lang_ko: "한국어",
|
||||||
|
lang_vi: "베트남어",
|
||||||
|
lang_id: "인도네시아어",
|
||||||
|
lang_ms: "말레이어",
|
||||||
|
filterAll: "전체 유형",
|
||||||
|
sortPublished: "게시일",
|
||||||
|
type_ppt: "PPT",
|
||||||
|
type_music: "음악",
|
||||||
|
type_video: "동영상",
|
||||||
|
type_image: "이미지",
|
||||||
|
type_pdf: "PDF",
|
||||||
|
type_link: "링크",
|
||||||
|
type_text: "텍스트",
|
||||||
|
type_archive: "압축 파일",
|
||||||
|
type_zip: "ZIP",
|
||||||
|
adminLoginTitle: "관리자 로그인",
|
||||||
|
adminEditResource: "자료 편집",
|
||||||
|
adminVideoFileHint:
|
||||||
|
"동영상 파일을 업로드 (MP4/WebM/MOV 등)하고 유형을 '동영상'으로 설정하면 사이트에서 자동 재생됩니다 (기본 음소거, 사용자가 음소거 해제 가능).",
|
||||||
|
adminStatTodayNew: "오늘 신규",
|
||||||
|
adminStatFavorites: "즐겨찾기",
|
||||||
|
adminMetricDownloads: "다운로드",
|
||||||
|
adminMetricFavorites: "즐겨찾기",
|
||||||
|
adminMetricViews: "조회수",
|
||||||
|
edit: "편집",
|
||||||
|
backToList: "목록으로",
|
||||||
|
sortOrderLabel: "정렬 순서",
|
||||||
|
previewUrlLabel: "미리보기 URL",
|
||||||
|
tagsCommaLabel: "태그 (쉼표로 구분)",
|
||||||
|
uploadFile: "업로드",
|
||||||
|
loading: "로딩 중…",
|
||||||
|
paginationPrev: "이전",
|
||||||
|
paginationNext: "다음",
|
||||||
|
listRange: "{{from}}–{{to}} / 총 {{total}}건",
|
||||||
|
pageIndicator: "{{c}} / {{p}} 페이지",
|
||||||
|
resourceLangFilter: "자료 언어",
|
||||||
|
filterTagClear: "태그 지우기",
|
||||||
|
filterLanguageAll: "모든 언어",
|
||||||
|
footerAdminLogin: "관리자 로그인",
|
||||||
|
adminSearchLogs: "검색 기록",
|
||||||
|
adminMetricShares: "공유",
|
||||||
|
adminSearchQuery: "검색어",
|
||||||
|
adminSearchTime: "시간",
|
||||||
|
adminSearchId: "ID",
|
||||||
|
favorites: "내 즐겨찾기",
|
||||||
|
favoritesComingSoon: "출시 예정",
|
||||||
|
favoritesComingSoonDesc:
|
||||||
|
"로그인과 즐겨찾기 기능을 개발 중입니다. 많은 기대 부탁드립니다.",
|
||||||
|
featureUnavailable: "준비 중",
|
||||||
|
featureUnavailableDesc: "이 기능은 아직 사용할 수 없습니다.",
|
||||||
|
confirm: "확인",
|
||||||
|
backToHome: "홈으로",
|
||||||
|
};
|
||||||
1
src/locales/types.ts
Normal file
1
src/locales/types.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export type Dict = Record<string, string>;
|
||||||
129
src/locales/zh-CN.ts
Normal file
129
src/locales/zh-CN.ts
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
import type { Dict } from "./types";
|
||||||
|
|
||||||
|
export const zhDict: Dict = {
|
||||||
|
brand: "ARK 资料库",
|
||||||
|
mainNav: "网站导航",
|
||||||
|
home: "首页",
|
||||||
|
all: "全部资料",
|
||||||
|
categories: "资料分类",
|
||||||
|
latest: "最新更新",
|
||||||
|
official: "官方推荐",
|
||||||
|
popular: "热门资料",
|
||||||
|
search: "搜索",
|
||||||
|
searchPlaceholder: "搜索资料...",
|
||||||
|
searchPanelPlaceholder: "搜索资料...",
|
||||||
|
searchNow: "立即搜索资料",
|
||||||
|
searchSubmit: "搜索",
|
||||||
|
cancel: "取消",
|
||||||
|
clear: "清除",
|
||||||
|
searchPanelHint: "支持搜索 标题・分类・标签・简介・文件类型・正文",
|
||||||
|
currentTags: "现有标签",
|
||||||
|
noTagsAvailable: "暂无可选择的标签。",
|
||||||
|
tagPostsTitle: "#{{tag}} 相关资料",
|
||||||
|
noTagPosts: "暂时找不到带有此标签的资料。",
|
||||||
|
viewAll: "查看全部",
|
||||||
|
backToTop: "回到顶部",
|
||||||
|
heroTitle: "ARK 官方数据库",
|
||||||
|
heroSub:
|
||||||
|
"集中、分类、管理 ARK 数据库,让你快速找到所需资源,推动社群共识与成长。",
|
||||||
|
categorySection: "资料分类",
|
||||||
|
officialSection: "官方推荐",
|
||||||
|
latestSection: "最新更新",
|
||||||
|
popularSection: "热门资料",
|
||||||
|
preview: "预览",
|
||||||
|
download: "下载",
|
||||||
|
downloading: "下载中…",
|
||||||
|
downloadOk: "下载完成",
|
||||||
|
downloadFail: "下载失败,请重试",
|
||||||
|
longPressImageSave: "长按图片保存到相册",
|
||||||
|
showMore: "展开全部",
|
||||||
|
showLess: "收起全部",
|
||||||
|
share: "分享",
|
||||||
|
langLabel: "语言",
|
||||||
|
admin: "后台",
|
||||||
|
login: "登录",
|
||||||
|
logout: "退出",
|
||||||
|
email: "邮箱",
|
||||||
|
password: "密码",
|
||||||
|
dashboard: "仪表盘",
|
||||||
|
resources: "资料管理",
|
||||||
|
newResource: "新增资料",
|
||||||
|
save: "保存",
|
||||||
|
title: "标题",
|
||||||
|
description: "简介",
|
||||||
|
type: "类型",
|
||||||
|
language: "语言",
|
||||||
|
category: "分类",
|
||||||
|
status: "状态",
|
||||||
|
public: "公开",
|
||||||
|
downloadable: "可下载",
|
||||||
|
recommended: "首页推荐",
|
||||||
|
cover: "封面图 URL",
|
||||||
|
fileUrl: "文件 URL",
|
||||||
|
externalUrl: "外部链接",
|
||||||
|
body: "文案内容",
|
||||||
|
badge: "推荐标签",
|
||||||
|
published: "已发布",
|
||||||
|
draft: "草稿",
|
||||||
|
archived: "归档",
|
||||||
|
noResults: "找不到符合的资料,请换个关键字或浏览分类。",
|
||||||
|
copyLink: "复制链接",
|
||||||
|
related: "相关资料",
|
||||||
|
total: "总资料",
|
||||||
|
views: "浏览",
|
||||||
|
downloads: "下载",
|
||||||
|
lang_zh_CN: "中文",
|
||||||
|
lang_en: "English",
|
||||||
|
lang_ja: "日本語",
|
||||||
|
lang_ko: "한국어",
|
||||||
|
lang_vi: "Tiếng Việt",
|
||||||
|
lang_id: "Bahasa Indonesia",
|
||||||
|
lang_ms: "Bahasa Melayu",
|
||||||
|
filterAll: "全部",
|
||||||
|
sortPublished: "发布时间",
|
||||||
|
type_ppt: "PPT",
|
||||||
|
type_music: "音乐",
|
||||||
|
type_video: "视频",
|
||||||
|
type_image: "图片",
|
||||||
|
type_pdf: "PDF",
|
||||||
|
type_link: "链接",
|
||||||
|
type_text: "文字",
|
||||||
|
type_archive: "压缩包",
|
||||||
|
type_zip: "ZIP",
|
||||||
|
adminLoginTitle: "管理后台登录",
|
||||||
|
adminEditResource: "编辑资料",
|
||||||
|
adminVideoFileHint:
|
||||||
|
"上传视频文件(MP4/WebM/MOV 等),类型请选择「视频」;保存后前台自动播放(默认静音,可点喇叭开声音)。",
|
||||||
|
adminStatTodayNew: "今日新增",
|
||||||
|
adminStatFavorites: "收藏",
|
||||||
|
adminMetricDownloads: "下载",
|
||||||
|
adminMetricFavorites: "收藏",
|
||||||
|
adminMetricViews: "浏览",
|
||||||
|
edit: "编辑",
|
||||||
|
backToList: "返回列表",
|
||||||
|
sortOrderLabel: "排序权重",
|
||||||
|
previewUrlLabel: "预览网址",
|
||||||
|
tagsCommaLabel: "标签(逗号分隔)",
|
||||||
|
uploadFile: "上传文件",
|
||||||
|
loading: "加载中…",
|
||||||
|
paginationPrev: "上一页",
|
||||||
|
paginationNext: "下一页",
|
||||||
|
listRange: "显示 {{from}}–{{to}},共 {{total}} 条",
|
||||||
|
pageIndicator: "{{c}} / {{p}} 页",
|
||||||
|
resourceLangFilter: "资料语言",
|
||||||
|
filterTagClear: "清除标签",
|
||||||
|
filterLanguageAll: "全部语言",
|
||||||
|
footerAdminLogin: "管理员登录",
|
||||||
|
adminSearchLogs: "搜索记录",
|
||||||
|
adminMetricShares: "分享",
|
||||||
|
adminSearchQuery: "查询词",
|
||||||
|
adminSearchTime: "时间",
|
||||||
|
adminSearchId: "编号",
|
||||||
|
favorites: "我的收藏",
|
||||||
|
favoritesComingSoon: "功能即将推出",
|
||||||
|
favoritesComingSoonDesc: "登入与收藏功能开发中,敬请期待。",
|
||||||
|
featureUnavailable: "未开放",
|
||||||
|
featureUnavailableDesc: "该功能暂未开放。",
|
||||||
|
confirm: "知道了",
|
||||||
|
backToHome: "返回首页",
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user