302 lines
11 KiB
TypeScript
302 lines
11 KiB
TypeScript
import type { AppLocale } from "../locale";
|
|
import { DEFAULT_LOCALE } from "../locale";
|
|
|
|
export type EditorSectionPanelMessages = {
|
|
backgroundColorLabel: string;
|
|
backgroundColorPickerAria: string;
|
|
backgroundColorHexAria: string;
|
|
|
|
backgroundImageSourceLabel: string;
|
|
backgroundImageSourceAria: string;
|
|
backgroundImageSourceOptionNone: string;
|
|
backgroundImageSourceOptionUrl: string;
|
|
backgroundImageSourceOptionUpload: string;
|
|
|
|
backgroundImageUrlLabel: string;
|
|
backgroundImageUrlAria: string;
|
|
|
|
backgroundImageUploadLabel: string;
|
|
backgroundImageUploadAria: string;
|
|
|
|
backgroundImagePositionModeLabel: string;
|
|
backgroundImagePositionModeAria: string;
|
|
backgroundImagePositionModeOptionPreset: string;
|
|
backgroundImagePositionModeOptionCustom: string;
|
|
|
|
backgroundImageSizeLabel: string;
|
|
backgroundImageSizeAria: string;
|
|
|
|
backgroundImagePositionLabel: string;
|
|
backgroundImagePositionAria: string;
|
|
backgroundImagePositionOptionCenter: string;
|
|
backgroundImagePositionOptionTop: string;
|
|
backgroundImagePositionOptionBottom: string;
|
|
backgroundImagePositionOptionLeft: string;
|
|
backgroundImagePositionOptionRight: string;
|
|
|
|
backgroundImagePositionXLabel: string;
|
|
backgroundImagePositionYLabel: string;
|
|
|
|
backgroundImageRepeatLabel: string;
|
|
backgroundImageRepeatAria: string;
|
|
backgroundImageRepeatOptionNone: string;
|
|
backgroundImageRepeatOptionBoth: string;
|
|
backgroundImageRepeatOptionX: string;
|
|
backgroundImageRepeatOptionY: string;
|
|
|
|
backgroundVideoSourceLabel: string;
|
|
backgroundVideoSourceAria: string;
|
|
backgroundVideoSourceOptionNone: string;
|
|
backgroundVideoSourceOptionUrl: string;
|
|
backgroundVideoSourceOptionUpload: string;
|
|
|
|
backgroundVideoUrlLabel: string;
|
|
backgroundVideoUrlAria: string;
|
|
|
|
backgroundVideoUploadLabel: string;
|
|
backgroundVideoUploadAria: string;
|
|
|
|
paddingYLabel: string;
|
|
paddingYUnitLabel: string;
|
|
paddingYPresetExtraTight: string;
|
|
paddingYPresetTight: string;
|
|
paddingYPresetNormal: string;
|
|
paddingYPresetRelaxed: string;
|
|
paddingYPresetExtraRelaxed: string;
|
|
|
|
layoutSectionTitle: string;
|
|
columnLayoutLabel: string;
|
|
columnLayoutAria: string;
|
|
columnLayoutOptionOneFull: string;
|
|
columnLayoutOptionTwoEqual: string;
|
|
columnLayoutOptionTwoOneTwo: string;
|
|
columnLayoutOptionTwoTwoOne: string;
|
|
columnLayoutOptionThreeEqual: string;
|
|
columnLayoutOptionCustom: string;
|
|
|
|
maxWidthLabel: string;
|
|
maxWidthUnitLabel: string;
|
|
maxWidthPresetExtraNarrow: string;
|
|
maxWidthPresetNarrow: string;
|
|
maxWidthPresetNormal: string;
|
|
maxWidthPresetWide: string;
|
|
maxWidthPresetExtraWide: string;
|
|
|
|
gapXLabel: string;
|
|
gapXUnitLabel: string;
|
|
gapXPresetZero: string;
|
|
gapXPresetTight: string;
|
|
gapXPresetNormal: string;
|
|
gapXPresetRelaxed: string;
|
|
gapXPresetExtraRelaxed: string;
|
|
gapXPresetMax: string;
|
|
|
|
alignItemsLabel: string;
|
|
alignItemsAria: string;
|
|
alignItemsOptionTop: string;
|
|
alignItemsOptionCenter: string;
|
|
alignItemsOptionBottom: string;
|
|
};
|
|
|
|
const EDITOR_SECTION_PANEL_MESSAGES: Record<AppLocale, EditorSectionPanelMessages> = {
|
|
en: {
|
|
backgroundColorLabel: "Background color",
|
|
backgroundColorPickerAria: "Section background color picker",
|
|
backgroundColorHexAria: "Section background color HEX",
|
|
|
|
backgroundImageSourceLabel: "Background image source",
|
|
backgroundImageSourceAria: "Background image source",
|
|
backgroundImageSourceOptionNone: "None",
|
|
backgroundImageSourceOptionUrl: "URL",
|
|
backgroundImageSourceOptionUpload: "File upload",
|
|
|
|
backgroundImageUrlLabel: "Background image URL",
|
|
backgroundImageUrlAria: "Background image URL",
|
|
|
|
backgroundImageUploadLabel: "Background image file upload",
|
|
backgroundImageUploadAria: "Background image file upload",
|
|
|
|
backgroundImagePositionModeLabel: "Background image position mode",
|
|
backgroundImagePositionModeAria: "Background image position mode",
|
|
backgroundImagePositionModeOptionPreset: "Preset",
|
|
backgroundImagePositionModeOptionCustom: "Custom (X/Y)",
|
|
|
|
backgroundImageSizeLabel: "Background image size",
|
|
backgroundImageSizeAria: "Background image size",
|
|
|
|
backgroundImagePositionLabel: "Background image position",
|
|
backgroundImagePositionAria: "Background image position",
|
|
backgroundImagePositionOptionCenter: "Center",
|
|
backgroundImagePositionOptionTop: "Top",
|
|
backgroundImagePositionOptionBottom: "Bottom",
|
|
backgroundImagePositionOptionLeft: "Left",
|
|
backgroundImagePositionOptionRight: "Right",
|
|
|
|
backgroundImagePositionXLabel: "Background image horizontal position",
|
|
backgroundImagePositionYLabel: "Background image vertical position",
|
|
|
|
backgroundImageRepeatLabel: "Background image repeat",
|
|
backgroundImageRepeatAria: "Background image repeat",
|
|
backgroundImageRepeatOptionNone: "No repeat",
|
|
backgroundImageRepeatOptionBoth: "Repeat (x/y)",
|
|
backgroundImageRepeatOptionX: "Repeat horizontally",
|
|
backgroundImageRepeatOptionY: "Repeat vertically",
|
|
|
|
backgroundVideoSourceLabel: "Background video source",
|
|
backgroundVideoSourceAria: "Background video source",
|
|
backgroundVideoSourceOptionNone: "None",
|
|
backgroundVideoSourceOptionUrl: "URL",
|
|
backgroundVideoSourceOptionUpload: "File upload",
|
|
|
|
backgroundVideoUrlLabel: "Background video URL",
|
|
backgroundVideoUrlAria: "Background video URL",
|
|
|
|
backgroundVideoUploadLabel: "Background video file upload",
|
|
backgroundVideoUploadAria: "Background video file upload",
|
|
|
|
paddingYLabel: "Vertical padding",
|
|
paddingYUnitLabel: "(px)",
|
|
paddingYPresetExtraTight: "Very tight",
|
|
paddingYPresetTight: "Tight",
|
|
paddingYPresetNormal: "Normal",
|
|
paddingYPresetRelaxed: "Wide",
|
|
paddingYPresetExtraRelaxed: "Very wide",
|
|
|
|
layoutSectionTitle: "Section layout",
|
|
columnLayoutLabel: "Section column layout",
|
|
columnLayoutAria: "Section column layout",
|
|
columnLayoutOptionOneFull: "1 column (1/1)",
|
|
columnLayoutOptionTwoEqual: "2 columns (1/2 - 1/2)",
|
|
columnLayoutOptionTwoOneTwo: "2 columns (1/3 - 2/3)",
|
|
columnLayoutOptionTwoTwoOne: "2 columns (2/3 - 1/3)",
|
|
columnLayoutOptionThreeEqual: "3 columns (1/3 - 1/3 - 1/3)",
|
|
columnLayoutOptionCustom: "Custom",
|
|
|
|
maxWidthLabel: "Max width",
|
|
maxWidthUnitLabel: "(px)",
|
|
maxWidthPresetExtraNarrow: "Very narrow",
|
|
maxWidthPresetNarrow: "Narrow",
|
|
maxWidthPresetNormal: "Normal",
|
|
maxWidthPresetWide: "Wide",
|
|
maxWidthPresetExtraWide: "Very wide",
|
|
|
|
gapXLabel: "Column gap",
|
|
gapXUnitLabel: "(px)",
|
|
gapXPresetZero: "0",
|
|
gapXPresetTight: "Tight",
|
|
gapXPresetNormal: "Normal",
|
|
gapXPresetRelaxed: "Wide",
|
|
gapXPresetExtraRelaxed: "Very wide",
|
|
gapXPresetMax: "Max",
|
|
|
|
alignItemsLabel: "Column vertical alignment",
|
|
alignItemsAria: "Section column vertical alignment",
|
|
alignItemsOptionTop: "Top",
|
|
alignItemsOptionCenter: "Center",
|
|
alignItemsOptionBottom: "Bottom",
|
|
},
|
|
ko: {
|
|
backgroundColorLabel: "배경 색상",
|
|
backgroundColorPickerAria: "섹션 배경 색상 선택",
|
|
backgroundColorHexAria: "섹션 배경 색상 HEX 입력",
|
|
|
|
backgroundImageSourceLabel: "배경 이미지 소스",
|
|
backgroundImageSourceAria: "배경 이미지 소스",
|
|
backgroundImageSourceOptionNone: "없음",
|
|
backgroundImageSourceOptionUrl: "URL",
|
|
backgroundImageSourceOptionUpload: "파일 업로드",
|
|
|
|
backgroundImageUrlLabel: "배경 이미지 URL",
|
|
backgroundImageUrlAria: "배경 이미지 URL",
|
|
|
|
backgroundImageUploadLabel: "배경 이미지 파일 업로드",
|
|
backgroundImageUploadAria: "배경 이미지 파일 업로드",
|
|
|
|
backgroundImagePositionModeLabel: "배경 이미지 위치 모드",
|
|
backgroundImagePositionModeAria: "배경 이미지 위치 모드",
|
|
backgroundImagePositionModeOptionPreset: "프리셋",
|
|
backgroundImagePositionModeOptionCustom: "커스텀 (X/Y)",
|
|
|
|
backgroundImageSizeLabel: "배경 이미지 크기",
|
|
backgroundImageSizeAria: "배경 이미지 크기",
|
|
|
|
backgroundImagePositionLabel: "배경 이미지 위치",
|
|
backgroundImagePositionAria: "배경 이미지 위치",
|
|
backgroundImagePositionOptionCenter: "가운데",
|
|
backgroundImagePositionOptionTop: "위",
|
|
backgroundImagePositionOptionBottom: "아래",
|
|
backgroundImagePositionOptionLeft: "왼쪽",
|
|
backgroundImagePositionOptionRight: "오른쪽",
|
|
|
|
backgroundImagePositionXLabel: "배경 이미지 가로 위치",
|
|
backgroundImagePositionYLabel: "배경 이미지 세로 위치",
|
|
|
|
backgroundImageRepeatLabel: "배경 이미지 반복",
|
|
backgroundImageRepeatAria: "배경 이미지 반복",
|
|
backgroundImageRepeatOptionNone: "반복 없음",
|
|
backgroundImageRepeatOptionBoth: "가로/세로 반복",
|
|
backgroundImageRepeatOptionX: "가로 반복",
|
|
backgroundImageRepeatOptionY: "세로 반복",
|
|
|
|
backgroundVideoSourceLabel: "배경 비디오 소스",
|
|
backgroundVideoSourceAria: "배경 비디오 소스",
|
|
backgroundVideoSourceOptionNone: "없음",
|
|
backgroundVideoSourceOptionUrl: "URL",
|
|
backgroundVideoSourceOptionUpload: "파일 업로드",
|
|
|
|
backgroundVideoUrlLabel: "배경 비디오 URL",
|
|
backgroundVideoUrlAria: "배경 비디오 URL",
|
|
|
|
backgroundVideoUploadLabel: "배경 비디오 파일 업로드",
|
|
backgroundVideoUploadAria: "배경 비디오 파일 업로드",
|
|
|
|
paddingYLabel: "세로 패딩",
|
|
paddingYUnitLabel: "(px)",
|
|
paddingYPresetExtraTight: "매우 좁게",
|
|
paddingYPresetTight: "좁게",
|
|
paddingYPresetNormal: "보통",
|
|
paddingYPresetRelaxed: "넓게",
|
|
paddingYPresetExtraRelaxed: "아주 넓게",
|
|
|
|
layoutSectionTitle: "섹션 레이아웃",
|
|
columnLayoutLabel: "섹션 컬럼 레이아웃",
|
|
columnLayoutAria: "섹션 컬럼 레이아웃",
|
|
columnLayoutOptionOneFull: "1열 (1/1)",
|
|
columnLayoutOptionTwoEqual: "2열 (1/2 - 1/2)",
|
|
columnLayoutOptionTwoOneTwo: "2열 (1/3 - 2/3)",
|
|
columnLayoutOptionTwoTwoOne: "2열 (2/3 - 1/3)",
|
|
columnLayoutOptionThreeEqual: "3열 (1/3 - 1/3 - 1/3)",
|
|
columnLayoutOptionCustom: "직접 조정",
|
|
|
|
maxWidthLabel: "최대 폭",
|
|
maxWidthUnitLabel: "(px)",
|
|
maxWidthPresetExtraNarrow: "매우 좁게",
|
|
maxWidthPresetNarrow: "좁게",
|
|
maxWidthPresetNormal: "보통",
|
|
maxWidthPresetWide: "넓게",
|
|
maxWidthPresetExtraWide: "아주 넓게",
|
|
|
|
gapXLabel: "컬럼 간 간격",
|
|
gapXUnitLabel: "(px)",
|
|
gapXPresetZero: "0",
|
|
gapXPresetTight: "좁게",
|
|
gapXPresetNormal: "보통",
|
|
gapXPresetRelaxed: "넓게",
|
|
gapXPresetExtraRelaxed: "아주 넓게",
|
|
gapXPresetMax: "최대",
|
|
|
|
alignItemsLabel: "컬럼 세로 정렬",
|
|
alignItemsAria: "섹션 컬럼 세로 정렬",
|
|
alignItemsOptionTop: "위",
|
|
alignItemsOptionCenter: "가운데",
|
|
alignItemsOptionBottom: "아래",
|
|
},
|
|
};
|
|
|
|
export function getEditorSectionPanelMessages(
|
|
locale: AppLocale | null | undefined,
|
|
): EditorSectionPanelMessages {
|
|
const key = (locale ?? DEFAULT_LOCALE) as AppLocale;
|
|
return EDITOR_SECTION_PANEL_MESSAGES[key] ?? EDITOR_SECTION_PANEL_MESSAGES[DEFAULT_LOCALE];
|
|
}
|