refactor(i18n): split content into structure JSON and per-language dictionaries

Phase 1 of spec-v4-live-edit: data/i18n foundation, no visible feature.

- src/data/{profile,skills,experience,projects}.json: language-neutral
  structure documents with thin typed loaders; all prose moved to
  src/i18n/locales/{vi,en}/content.json; chrome strings to ui.json
- src/i18n/: dict-types, cross-document validator (runs at module load and
  via pnpm validate:content), loader joining structure+text once (UI/CONTENT),
  I18nProvider/useI18n mounted in App under LanguageProvider
- all 22 consumers read joined records via useI18n(); field.ts and
  strings.ts deleted; *En field pairs removed from the domain types
- hero tagline renders as plain-text segments (D9); philosophy quotes as
  paragraph arrays; footer display name now localizes per language (D6)
- resume generator consumes UI/CONTENT; generated resume HTML verified
  byte-identical (EN+VI) before/after the migration
- AGENTS.md and v3/v3-i18n + v4 specs updated; deploy.yml concurrency group
This commit is contained in:
dong.nguyen committed 2026-10-22 07:29:06 +07:00
1 parent f5687cce1c
commit e6b4d83084
50 files changed
+2215 -961

No files matched your search

+10 -83
View File
@@ -1,84 +1,11 @@
import type {Profile} from "@/types";
// Typed loader for the profile structure document (spec-v4 D2). Localized text
// lives in src/i18n/locales and is joined in src/i18n/index.ts; this module
// exports the language-neutral structure under today's name, for the i18n
// loader and for scripts/generate-sitemap.ts.
// JSON imports widen string literals to `string`, so id membership is guarded
// by the text dictionaries (tsc) and by src/i18n/validate.ts (cross-document
// coverage) — the cast still fails on gross shape errors.
import profileJson from './profile.json';
import type { ProfileStructure } from '../i18n/dict-types';
export const profile: Profile = {
firstName: "Dong",
lastName: "Nguyen",
name: "Nguyễn Đông",
nameEn: "Dong Nguyen",
title: "Senior Software Engineer",
titleEn: "Senior Software Engineer",
tagline:
"Phần lớn thời gian tôi là Backend Software Engineer. Muốn tôi là Full Stack Developer, <span class='ok-possible name-highlight'>yes</span>, có thể.",
taglineEn:
"Building scalable software systems, intelligent logistics solutions, and practical AI applications.",
bio: "Senior Software Engineer với kinh nghiệm xây dựng hệ thống phân tán, logistics technology, và ứng dụng AI/ML vào bài toán thực tế. Tập trung vào system architecture, integration, và production-grade solutions.",
bioEn: "Senior Software Engineer with experience building distributed systems, logistics technology, and AI/ML applications for real-world problems. Focused on system architecture, integration, and production-grade solutions.",
email: "nguyendong_bkdn@yahoo.com",
githubUrl: "https://github.com/dong-nz",
linkedinUrl: "https://www.linkedin.com/in/dong-nz",
githubHandle: "dong-nz",
linkedinHandle: "dong-nz",
telegramUrl: "https://t.me/dongdn",
telegramHandle: "dongdn",
currentInterests: [
"AI in logistics",
"Digital twins",
"Simulation",
"LLM",
"Computer Vision",
"High-performance systems",
],
roles: [
"System Architect",
"Full-Stack Developer",
"System Engineer",
"AI/ML Application Engineer",
],
philosophy: [
{
title: "Giải pháp được xây dựng dựa trên vấn đề thực tế",
titleEn: "Build for the real problem",
description:
"Không bắt đầu bằng technology. Bắt đầu bằng problem.",
descriptionEn:
"Don't start with technology. Start with the problem.",
keywords: ["Problem-first", "Business value", "Measurement"],
},
{
title: "Think in systems",
titleEn: "Think in systems",
description:
"Quan tâm đến kiến trúc tổng thể, không chỉ từng component.",
descriptionEn:
"Care about the overall architecture, not just individual components.",
keywords: ["Architecture", "Integration", "Scalability", "Reliability"],
},
{
title: "Measure impact",
titleEn: "Measure impact",
description:
"Technical implementation phải gắn với measurable outcome.",
descriptionEn:
"Technical implementation must be tied to measurable outcomes.",
keywords: ["Performance", "Reliability", "Cost", "Efficiency"],
},
{
title: "Keep learning",
titleEn: "Keep learning",
description:
"Continuous exploration of new technologies and approaches.",
descriptionEn:
"Continuous exploration of new technologies and approaches.",
keywords: ["AI/ML", "Computer Vision", "LLM", "Distributed systems"],
},
{
title: "Kiến thức nghiệp vụ là chìa khóa thành công",
titleEn: "Business domain knowledge is a key of success",
description:
"Hiểu sâu về business domain giúp hiểu rõ vấn đề và đưa ra giải pháp phù hợp.",
descriptionEn:
"Don't start with technology. Start with the problem.",
keywords: ["Biz knowledge", "Business value"],
},
],
};
export const profile = profileJson as ProfileStructure;