@@ -18,28 +18,28 @@ type Props = {
1818}
1919
2020export default function CLIComparisonPageClient ( { locale } : Props ) {
21- const tComparison = useTranslations ( 'comparison' )
22- const tStacks = useTranslations ( 'stacks' )
23- const tCommunity = useTranslations ( 'community' )
24- const t = useTranslations ( )
21+ const t = useTranslations ( 'pages.comparison' )
22+ const tCommunity = useTranslations ( 'shared.platforms' )
23+ const tGlobal = useTranslations ( )
2524
2625 const columns : ComparisonColumn [ ] = [
2726 {
2827 key : 'vendor' ,
29- label : tComparison ( 'columns.vendor' ) ,
28+ label : t ( 'columns.vendor' ) ,
3029 } ,
3130 {
3231 key : 'license' ,
33- label : tComparison ( 'columns.license' ) ,
34- render : ( value : unknown , item : Record < string , unknown > ) => renderLicense ( value , item , t ) ,
32+ label : t ( 'columns.license' ) ,
33+ render : ( value : unknown , item : Record < string , unknown > ) =>
34+ renderLicense ( value , item , tGlobal ) ,
3535 } ,
3636 {
3737 key : 'latestVersion' ,
38- label : tComparison ( 'columns.version' ) ,
38+ label : t ( 'columns.version' ) ,
3939 } ,
4040 {
4141 key : 'platforms' ,
42- label : tComparison ( 'columns.platforms' ) ,
42+ label : t ( 'columns.platforms' ) ,
4343 render : ( value : unknown ) => {
4444 const platforms = value as Array < { os : string } > | string [ ]
4545 if ( ! platforms || platforms . length === 0 ) return '-'
@@ -72,7 +72,7 @@ export default function CLIComparisonPageClient({ locale }: Props) {
7272 } ,
7373 {
7474 key : 'githubStars' ,
75- label : tComparison ( 'columns.githubStars' ) ,
75+ label : t ( 'columns.githubStars' ) ,
7676 render : ( _ : unknown , item : Record < string , unknown > ) => {
7777 const id = item . id as string
7878 const stars = getGithubStars ( 'clis' , id )
@@ -106,7 +106,7 @@ export default function CLIComparisonPageClient({ locale }: Props) {
106106 } ,
107107 {
108108 key : 'links' ,
109- label : tComparison ( 'columns.links' ) ,
109+ label : t ( 'columns.links' ) ,
110110 render : ( _ : unknown , item : Record < string , unknown > ) => {
111111 const websiteUrl = item . websiteUrl as string | undefined
112112 const docsUrl = item . docsUrl as string | undefined
@@ -133,7 +133,7 @@ export default function CLIComparisonPageClient({ locale }: Props) {
133133 target = "_blank"
134134 rel = "noopener"
135135 className = "text-[var(--color-text)] hover:text-[var(--color-text-secondary)] transition-colors"
136- title = { tComparison ( 'linkTitles.officialWebsite' ) }
136+ title = { t ( 'linkTitles.officialWebsite' ) }
137137 >
138138 < Home className = "w-3.5 h-3.5" />
139139 </ a >
@@ -148,7 +148,7 @@ export default function CLIComparisonPageClient({ locale }: Props) {
148148 target = "_blank"
149149 rel = "noopener"
150150 className = "text-[var(--color-text)] hover:text-[var(--color-text-secondary)] transition-colors"
151- title = { tComparison ( 'linkTitles.download' ) }
151+ title = { t ( 'linkTitles.download' ) }
152152 >
153153 < Download className = "w-3.5 h-3.5" />
154154 </ a >
@@ -163,7 +163,7 @@ export default function CLIComparisonPageClient({ locale }: Props) {
163163 target = "_blank"
164164 rel = "noopener"
165165 className = "text-[var(--color-text)] hover:text-[var(--color-text-secondary)] transition-colors"
166- title = { tComparison ( 'linkTitles.documentation' ) }
166+ title = { t ( 'linkTitles.documentation' ) }
167167 >
168168 < FileText className = "w-3.5 h-3.5" />
169169 </ a >
@@ -238,7 +238,7 @@ export default function CLIComparisonPageClient({ locale }: Props) {
238238 } ,
239239 {
240240 key : 'pricing-free' ,
241- label : tComparison ( 'columns.freePlan' ) ,
241+ label : t ( 'columns.freePlan' ) ,
242242 render : ( _ : unknown , item : Record < string , unknown > ) => {
243243 const pricing = item . pricing as PricingTier [ ]
244244 if ( ! pricing || pricing . length === 0 ) return '-'
@@ -248,20 +248,20 @@ export default function CLIComparisonPageClient({ locale }: Props) {
248248 } ,
249249 {
250250 key : 'pricing-min' ,
251- label : tComparison ( 'columns.startingPrice' ) ,
251+ label : t ( 'columns.startingPrice' ) ,
252252 render : ( _ : unknown , item : Record < string , unknown > ) => {
253253 const pricing = item . pricing as PricingTier [ ]
254254 if ( ! pricing || pricing . length === 0 ) return '-'
255255 const paidPlans = pricing . filter ( p => p . value && p . value > 0 )
256- if ( paidPlans . length === 0 ) return tComparison ( 'pricingValues.freeOnly' )
256+ if ( paidPlans . length === 0 ) return t ( 'pricingValues.freeOnly' )
257257 const minPrice = Math . min ( ...paidPlans . map ( p => p . value as number ) )
258258 const minPlan = paidPlans . find ( p => p . value === minPrice )
259259 return minPlan ? formatPrice ( minPlan ) : '-'
260260 } ,
261261 } ,
262262 {
263263 key : 'pricing-max' ,
264- label : tComparison ( 'columns.maxPrice' ) ,
264+ label : t ( 'columns.maxPrice' ) ,
265265 render : ( _ : unknown , item : Record < string , unknown > ) => {
266266 const pricing = item . pricing as PricingTier [ ]
267267 if ( ! pricing || pricing . length === 0 ) return '-'
@@ -280,20 +280,20 @@ export default function CLIComparisonPageClient({ locale }: Props) {
280280
281281 < Breadcrumb
282282 items = { [
283- { name : tStacks ( ' aiCodingStack') , href : '/ai-coding-stack' } ,
284- { name : tStacks ( ' clis') , href : '/clis' } ,
285- { name : tStacks ( ' comparison') , href : '/clis/comparison' } ,
283+ { name : tGlobal ( 'shared.common. aiCodingStack') , href : '/ai-coding-stack' } ,
284+ { name : tGlobal ( 'shared.stacks. clis') , href : '/clis' } ,
285+ { name : tGlobal ( 'shared.common. comparison') , href : '/clis/comparison' } ,
286286 ] }
287287 />
288288
289289 { /* Page Header */ }
290290 < section className = "py-[var(--spacing-lg)] border-[var(--color-border)]" >
291291 < div className = "max-w-8xl mx-auto px-[var(--spacing-md)]" >
292292 < h1 className = "text-3xl font-semibold tracking-[-0.03em] mb-[var(--spacing-sm)]" >
293- { tComparison ( 'clis.title' ) }
293+ { t ( 'clis.title' ) }
294294 </ h1 >
295295 < p className = "text-base text-[var(--color-text-secondary)] font-light" >
296- { tComparison ( 'clis.subtitle' ) }
296+ { t ( 'clis.subtitle' ) }
297297 </ p >
298298 </ div >
299299 </ section >
@@ -316,7 +316,7 @@ export default function CLIComparisonPageClient({ locale }: Props) {
316316 href = { `/${ locale } /clis` }
317317 className = "inline-flex items-center gap-[var(--spacing-xs)] text-sm text-[var(--color-text-secondary)] hover:text-[var(--color-text)] transition-colors"
318318 >
319- ← { tComparison ( 'clis.backTo' ) }
319+ ← { t ( 'clis.backTo' ) }
320320 </ Link >
321321 </ div >
322322 </ section >
0 commit comments