1
0
mirror of synced 2025-12-19 09:57:42 -05:00

Refactor languages module: separate client and server code (#57949)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Kevin Heis
2025-10-23 12:30:06 -07:00
committed by GitHub
parent f4ea74a1f6
commit 841f6b1718
63 changed files with 230 additions and 297 deletions

View File

@@ -4,14 +4,9 @@ import type { NextConfig } from 'next'
import frontmatter from '@gr2m/gray-matter'
import { getLogLevelNumber } from '@/observability/logger/lib/log-levels'
import { languageKeys } from '@/languages/lib/languages'
const ROOT = process.env.ROOT || '.'
// Language keys are defined here because Next.js config compilation doesn't resolve the @/ path alias
// Importing from src/languages/lib/languages.ts would fail when it tries to import @/frame/lib/constants
// This must match the languages defined in src/languages/lib/languages.ts
const languageKeys = ['en', 'es', 'ja', 'pt', 'zh', 'ru', 'fr', 'ko', 'de']
const homepage = path.posix.join(ROOT, 'content/index.md')
const { data } = frontmatter(fs.readFileSync(homepage, 'utf8'))
const productIds = data.children as string[]