refactor(i18n): move person text out of ui.json and localize structure-held strings (spec-v4 rows 18-19)

Row 18: ui.about.subtitle/experience.tldrText/philosophy.quotes -> profile.subtitle/.tldr/.philosophyQuotes in content.{vi,en}.json; call sites repointed with EditableText wrap; SectionHeading subtitle prop becomes ReactNode; edit.fields labels added. Row 19: experience.company/.duration, projects.role/.metrics, profile.currentInterests/.roles, philosophy keywords move to text documents; VI carries localized dates/company labels/metrics, en overrides with originals, proper nouns and term lists identical (en omits); draft templates, JsonPanel hints, loader comments, resume TL;DR follow the new shapes. Verified: build, validate:content, lint (no new warnings), smoke-draft 7/7, per-language SSR marker smoke on affected routes, build:resume-all.
This commit is contained in:
dong.nguyen committed 2026-10-22 22:53:26 +07:00
1 parent 2c3ee8271d
commit fecbd44899
23 files changed
+273 -169

No files matched your search

+6 -6
View File
@@ -410,17 +410,17 @@ export class DraftStore {
if (kind === 'project') {
const projects = structuredClone(this.dataOf('projects')) as Record<string, any>[];
const id = uniqueId('new-project', projects.map((p) => p.id));
projects.push({ id, category: 'experiment', role: 'Owner', technologies: [], featured: false, sections: [] });
projects.push({ id, category: 'experiment', technologies: [], featured: false, sections: [] });
candidates.set('projects', projects);
const stub = { title: 'New project', summary: 'Write the summary here.', sections: {} };
const stub = { title: 'New project', summary: 'Write the summary here.', role: 'Owner', sections: {} };
vi.projects = { ...vi.projects, [id]: structuredClone(stub) };
en.projects = { ...en.projects, [id]: structuredClone(stub) };
} else if (kind === 'experience') {
const experiences = structuredClone(this.dataOf('experience')) as Record<string, any>[];
const id = uniqueId('new-experience', experiences.map((e) => e.id));
experiences.push({ id, company: 'New company', duration: 'present' });
experiences.push({ id });
candidates.set('experience', experiences);
const stub = { title: 'New role', responsibilities: ['Write a responsibility here.'] };
const stub = { title: 'New role', company: 'New company', duration: 'present', responsibilities: ['Write a responsibility here.'] };
vi.experience = { ...vi.experience, [id]: structuredClone(stub) };
en.experience = { ...en.experience, [id]: structuredClone(stub) };
} else if (kind === 'skill-group') {
@@ -434,9 +434,9 @@ export class DraftStore {
const profile = structuredClone(this.dataOf('profile')) as Record<string, any>;
const points = profile.philosophy as Record<string, any>[];
const id = uniqueId('new-philosophy-point', points.map((p) => p.id));
points.push({ id, keywords: ['new-keyword'] });
points.push({ id });
candidates.set('profile', profile);
const stub = { title: 'New principle', description: 'Write the principle here.' };
const stub = { title: 'New principle', description: 'Write the principle here.', keywords: ['new-keyword'] };
vi.profile = { ...vi.profile, philosophy: { ...vi.profile.philosophy, [id]: structuredClone(stub) } };
en.profile = { ...en.profile, philosophy: { ...en.profile.philosophy, [id]: structuredClone(stub) } };
} else {