Files
page-builder/src/features/i18n/messages/editorSidebar.ts
T
jaybe f71207aeb5
CI / test (push) Failing after 11m12s
CI / e2e (push) Has been cancelled
CI / pr_and_merge (push) Has been cancelled
i18n 적용
2025-12-10 15:56:51 +09:00

129 lines
4.7 KiB
TypeScript

import type { AppLocale } from "../locale";
import { DEFAULT_LOCALE } from "../locale";
export type EditorSidebarMessages = {
blocksTitle: string;
blocksText: string;
blocksButton: string;
blocksImage: string;
blocksVideo: string;
blocksDivider: string;
blocksList: string;
blocksSection: string;
formsTitle: string;
formsController: string;
formsInput: string;
formsSelect: string;
formsRadio: string;
formsCheckbox: string;
templatesTitle: string;
templatesGroupHeroCta: string;
templatesGroupContent: string;
templatesGroupTrust: string;
templatesGroupFooter: string;
templateHeroLabel: string;
templateHeroDescription: string;
templateCtaLabel: string;
templateCtaDescription: string;
templateFeaturesLabel: string;
templateFeaturesDescription: string;
templateFaqLabel: string;
templateFaqDescription: string;
templatePricingLabel: string;
templatePricingDescription: string;
templateBlogLabel: string;
templateBlogDescription: string;
templateTestimonialsLabel: string;
templateTestimonialsDescription: string;
templateTeamLabel: string;
templateTeamDescription: string;
templateFooterLabel: string;
templateFooterDescription: string;
};
const EDITOR_SIDEBAR_MESSAGES: Record<AppLocale, EditorSidebarMessages> = {
en: {
blocksTitle: "Blocks",
blocksText: "Text",
blocksButton: "Button",
blocksImage: "Image",
blocksVideo: "Video",
blocksDivider: "Divider",
blocksList: "List",
blocksSection: "Section",
formsTitle: "Form elements",
formsController: "Form controller",
formsInput: "Input field",
formsSelect: "Select field",
formsRadio: "Radio group",
formsCheckbox: "Checkbox group",
templatesTitle: "Templates",
templatesGroupHeroCta: "Hero · CTA",
templatesGroupContent: "Content sections",
templatesGroupTrust: "Trust & about",
templatesGroupFooter: "Footer & misc",
templateHeroLabel: "Hero template",
templateHeroDescription: "Top-of-page hero section (headline + subtext + button)",
templateCtaLabel: "CTA template",
templateCtaDescription: "Call-to-action (CTA) section",
templateFeaturesLabel: "Features template",
templateFeaturesDescription: "Three-column features section",
templateFaqLabel: "FAQ template",
templateFaqDescription: "Frequently asked questions (FAQ) section",
templatePricingLabel: "Pricing template",
templatePricingDescription: "Pricing plans section",
templateBlogLabel: "Blog template",
templateBlogDescription: "Blog post listing section",
templateTestimonialsLabel: "Testimonials template",
templateTestimonialsDescription: "Customer testimonials section",
templateTeamLabel: "Team template",
templateTeamDescription: "Team members section",
templateFooterLabel: "Footer template",
templateFooterDescription: "Page footer section",
},
ko: {
blocksTitle: "블록",
blocksText: "텍스트",
blocksButton: "버튼",
blocksImage: "이미지",
blocksVideo: "비디오",
blocksDivider: "구분선",
blocksList: "리스트",
blocksSection: "섹션",
formsTitle: "폼 요소",
formsController: "폼 컨트롤러",
formsInput: "입력(Input)",
formsSelect: "셀렉트(Select)",
formsRadio: "단일 선택(Radio)",
formsCheckbox: "다중 선택(Checkbox)",
templatesTitle: "템플릿",
templatesGroupHeroCta: "히어로 · CTA",
templatesGroupContent: "콘텐츠 섹션",
templatesGroupTrust: "신뢰/소개",
templatesGroupFooter: "푸터/기타",
templateHeroLabel: "Hero 템플릿",
templateHeroDescription: "페이지 상단 Hero 섹션 (큰 제목 + 서브텍스트 + 버튼)",
templateCtaLabel: "CTA 템플릿",
templateCtaDescription: "콜투액션(CTA) 섹션",
templateFeaturesLabel: "기능 템플릿",
templateFeaturesDescription: "3컬럼 기능 소개 섹션",
templateFaqLabel: "FAQ 템플릿",
templateFaqDescription: "자주 묻는 질문(FAQ) 섹션",
templatePricingLabel: "상품 템플릿",
templatePricingDescription: "요금제/플랜 소개 섹션",
templateBlogLabel: "블로그 템플릿",
templateBlogDescription: "블로그 포스트 목록 섹션",
templateTestimonialsLabel: "후기 템플릿",
templateTestimonialsDescription: "고객 후기(Testimonials) 섹션",
templateTeamLabel: "Team 템플릿",
templateTeamDescription: "팀 소개 섹션",
templateFooterLabel: "Footer 템플릿",
templateFooterDescription: "페이지 푸터 섹션",
},
};
export function getEditorSidebarMessages(locale: AppLocale | null | undefined): EditorSidebarMessages {
const key = (locale ?? DEFAULT_LOCALE) as AppLocale;
return EDITOR_SIDEBAR_MESSAGES[key] ?? EDITOR_SIDEBAR_MESSAGES[DEFAULT_LOCALE];
}