mirror of
https://github.com/dong-nz/cv.git
synced 2026-11-22 16:10:40 +07:00
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:
1 parent
2c3ee8271d
commit
fecbd44899
23 files changed
+273
-169
No files matched your search
@@ -23,7 +23,15 @@ export function AboutPage() {
|
||||
>
|
||||
<SectionHeading
|
||||
title={s.about.heading}
|
||||
subtitle={s.about.subtitle}
|
||||
subtitle={
|
||||
<EditableText
|
||||
as="p"
|
||||
path="profile.subtitle"
|
||||
label={s.edit.fields.subtitle}
|
||||
>
|
||||
{c.profile.subtitle}
|
||||
</EditableText>
|
||||
}
|
||||
tag={s.about.heading}
|
||||
/>
|
||||
<EditableText
|
||||
|
||||
@@ -35,9 +35,13 @@ export function ExperiencePage() {
|
||||
<EditableText as="div" className="timeline-title" path={`experience.${exp.id}.title`} label={s.edit.fields.expTitle}>
|
||||
{exp.title}
|
||||
</EditableText>
|
||||
<div className="timeline-company">{exp.company}</div>
|
||||
<EditableText as="div" className="timeline-company" path={`experience.${exp.id}.company`} label={s.edit.fields.company}>
|
||||
{exp.company}
|
||||
</EditableText>
|
||||
<div className="timeline-meta">
|
||||
<span className="timeline-duration">{exp.duration}</span>
|
||||
<EditableText as="span" className="timeline-duration" path={`experience.${exp.id}.duration`} label={s.edit.fields.duration}>
|
||||
{exp.duration}
|
||||
</EditableText>
|
||||
{exp.location && <span className="timeline-location">{exp.location}</span>}
|
||||
</div>
|
||||
</div>
|
||||
@@ -58,7 +62,9 @@ export function ExperiencePage() {
|
||||
<div className="timeline-tldr">
|
||||
<span className="timeline-tldr-marker" aria-hidden="true" />
|
||||
<span className="timeline-tldr-chip">{s.experience.tldr}</span>
|
||||
<p className="timeline-tldr-text">{s.experience.tldrText}</p>
|
||||
<EditableText as="p" className="timeline-tldr-text" path="profile.tldr" label={s.edit.fields.tldr}>
|
||||
{c.profile.tldr}
|
||||
</EditableText>
|
||||
</div>
|
||||
</div>
|
||||
</motion.section>
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import {SectionHeading} from '@/components/ui/SectionHeading'
|
||||
import {EditableText} from '@/components/ui/EditableText'
|
||||
import {motion} from 'motion/react'
|
||||
import {InView} from '@/components/ui/InView'
|
||||
|
||||
import {useI18n} from '@/i18n/provider'
|
||||
|
||||
export function PhilosophyPage() {
|
||||
const {ui: s} = useI18n()
|
||||
const {ui: s, content: c} = useI18n()
|
||||
return (
|
||||
<InView>
|
||||
<motion.section
|
||||
@@ -21,7 +22,7 @@ export function PhilosophyPage() {
|
||||
>
|
||||
<SectionHeading id="philosophy-heading" title={s.philosophy.heading} tag={s.philosophy.heading}/>
|
||||
<div className="prose prose-wide">
|
||||
{s.philosophy.quotes.map((quote, i) => (
|
||||
{c.profile.philosophyQuotes.map((quote, i) => (
|
||||
<motion.div
|
||||
key={i}
|
||||
className="philosophy-quote"
|
||||
@@ -30,12 +31,24 @@ export function PhilosophyPage() {
|
||||
viewport={{once: true, amount: 0.2}}
|
||||
transition={{duration: 0.45, ease: 'easeOut', delay: i * 0.08}}
|
||||
>
|
||||
<h3>
|
||||
<EditableText
|
||||
as="h3"
|
||||
path={`profile.philosophyQuotes[${i}].title`}
|
||||
label={`${s.edit.fields.quoteTitle} ${i + 1}`}
|
||||
>
|
||||
{quote.title}
|
||||
</h3>
|
||||
</EditableText>
|
||||
<div>
|
||||
{quote.details.map((detail, j) => (
|
||||
<p key={j}>{detail}</p>
|
||||
<EditableText
|
||||
as="p"
|
||||
key={j}
|
||||
path={`profile.philosophyQuotes[${i}].details[${j}]`}
|
||||
label={`${s.edit.fields.quoteDetail} ${j + 1}`}
|
||||
multiline
|
||||
>
|
||||
{detail}
|
||||
</EditableText>
|
||||
))}
|
||||
</div>
|
||||
</motion.div>
|
||||
|
||||
@@ -108,7 +108,9 @@ export function ProjectDetailPage() {
|
||||
transition={itemTransition(0.24)}
|
||||
>
|
||||
<h3>{s.projectDetail.role}</h3>
|
||||
<p>{project.role}</p>
|
||||
<EditableText as="p" path={`projects.${project.id}.role`} label={s.edit.fields.projectRole}>
|
||||
{project.role}
|
||||
</EditableText>
|
||||
</motion.div>
|
||||
|
||||
<motion.div
|
||||
|
||||
Reference in new issue
Block a user