From 534683817e3ca19b060588eda458c7c3e7df728e Mon Sep 17 00:00:00 2001 From: Hammuu1112 <97436524+Hammuu1112@users.noreply.github.com> Date: Tue, 8 Jul 2025 14:00:06 +0900 Subject: [PATCH] feat(theme): add locale support for Korean (ko-KR) (#642) * add ko-KR * fix typo error * Change the import order --- theme/src/node/locales/index.ts | 3 ++ theme/src/node/locales/ko.ts | 65 +++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 theme/src/node/locales/ko.ts diff --git a/theme/src/node/locales/index.ts b/theme/src/node/locales/index.ts index 7eb31ec4..bbe25051 100644 --- a/theme/src/node/locales/index.ts +++ b/theme/src/node/locales/index.ts @@ -9,11 +9,13 @@ import { deLocale, dePresetLocale } from './de.js' import { enLocale, enPresetLocale } from './en.js' import { frLocale, frPresetLocale } from './fr.js' import { jaLocale, jaPresetLocale } from './ja.js' +import { koLocale, koPresetLocale } from './ko.js' import { ruLocale, ruPresetLocale } from './ru.js' import { zhTwLocale, zhTwPresetLocale } from './zh-tw.js' import { zhLocale, zhPresetLocale } from './zh.js' export const LOCALE_OPTIONS: DefaultLocaleInfo = [ + [['ko', 'ko-KR'], koLocale], [['en', 'en-US'], enLocale], [['zh', 'zh-CN', 'zh-Hans', 'zh-Hant'], zhLocale], [['zh-TW'], zhTwLocale], @@ -24,6 +26,7 @@ export const LOCALE_OPTIONS: DefaultLocaleInfo = [ ] export const PRESET_LOCALES: DefaultLocaleInfo = [ + [['ko', 'ko-KR'], koPresetLocale], [['en', 'en-US'], enPresetLocale], [['zh', 'zh-CN', 'zh-Hans', 'zh-Hant'], zhPresetLocale], [['zh-TW'], zhTwPresetLocale], diff --git a/theme/src/node/locales/ko.ts b/theme/src/node/locales/ko.ts new file mode 100644 index 00000000..50accf26 --- /dev/null +++ b/theme/src/node/locales/ko.ts @@ -0,0 +1,65 @@ +/** Korean */ +import type { PresetLocale, ThemeLocaleText } from '../../shared/index.js' + +export const koLocale: ThemeLocaleText = { + selectLanguageName: '한국어', + selectLanguageText: '', + + appearanceText: '모양', + lightModeSwitchTitle: '밝은 테마로 전환', + darkModeSwitchTitle: '어두운 테마로 전환', + + sidebarMenuLabel: '메뉴', + returnToTopLabel: '위로 이동', + outlineLabel: '목차', + editLinkText: '편집하기', + contributorsText: '기여자', + lastUpdatedText: '마지막 업데이트', + changelogText: '변경 내역', + changelogOnText: 'On', + changelogButtonText: '변경 내역 모두 보기', + prevPageLabel: '이전 페이지', + nextPageLabel: '다음 페이지', + + copyrightText: 'Copyright', + copyrightAuthorText: '저작권 소유자:', + copyrightCreationOriginalText: 'This article link:', + copyrightCreationTranslateText: 'This article is translated from:', + copyrightCreationReprintText: 'This article is reprint from:', + copyrightLicenseText: 'License under:', + + encryptButtonText: '확인', + encryptPlaceholder: '비밀번호를 입력하세요', + encryptGlobalText: '이 사이트를 이용하려면 비밀번호가 필요합니다', + encryptPageText: '이 페이지를 이용하려면 비밀번호가 필요합니다', + + homeText: '홈', + blogText: '블로그', + tagText: '태그', + archiveText: '아카이브', + categoryText: '카테고리', + archiveTotalText: '{count}개의 글', + + notFound: { + code: '404', + title: '페이지를 찾을 수 없습니다', + quote: '방향을 잃지 않고 꾸준히 나아가다 보면 결국엔 목적지에 닿을 수 있습니다.', + linkText: '홈으로', + }, + + footer: { + message: + 'Powered by VuePress & vuepress-theme-plume', + }, +} + +export const koPresetLocale: PresetLocale = { + // ------ copyright license ------ + 'CC0': 'CC0 1.0 Universal', + 'CC-BY-4.0': 'Attribution 4.0 International', + 'CC-BY-NC-4.0': 'Attribution-NonCommercial 4.0 International', + 'CC-BY-NC-SA-4.0': 'Attribution-NonCommercial-ShareAlike 4.0 International', + 'CC-BY-NC-ND-4.0': 'Attribution-NonCommercial-NoDerivatives 4.0 International', + 'CC-BY-ND-4.0': 'Attribution-NoDerivatives 4.0 International', + 'CC-BY-SA-4.0': 'Attribution-ShareAlike 4.0 International', +}