mirror of
https://github.com/iflytek/skillhub.git
synced 2026-09-11 22:51:04 +00:00
feat(i18n): add Korean (ko) translation
Adds a complete Korean locale (web/src/i18n/locales/ko.json) mirroring
the full key structure of en.json (1340 leaf keys, 0 missing/extra),
with interpolation placeholders and inline tags verified to match
exactly. Registers ko in the i18next resource map (i18n/config.ts)
and the language switcher dropdown (LanguageSwitcher).
Verified with:
- python key-set diff (en vs ko): 0 missing, 0 extra
- python placeholder/tag diff ({{var}}, <1>...</1>): 0 mismatches
- pnpm vitest run (full suite): 180 files / 609 tests passed
- tsc --noEmit: no errors
- eslint on changed files: no issues
This commit is contained in:
parent
e32f05b375
commit
0ffb8705a3
3 changed files with 1555 additions and 0 deletions
|
|
@ -3,6 +3,7 @@ import { initReactI18next } from 'react-i18next'
|
|||
import LanguageDetector from 'i18next-browser-languagedetector'
|
||||
import en from './locales/en.json'
|
||||
import zh from './locales/zh.json'
|
||||
import ko from './locales/ko.json'
|
||||
|
||||
/**
|
||||
* Initializes i18next for the browser app. Language preference is restored from
|
||||
|
|
@ -16,6 +17,7 @@ i18n
|
|||
resources: {
|
||||
en: { translation: en },
|
||||
zh: { translation: zh },
|
||||
ko: { translation: ko },
|
||||
},
|
||||
fallbackLng: 'en',
|
||||
interpolation: {
|
||||
|
|
|
|||
1552
web/src/i18n/locales/ko.json
Normal file
1552
web/src/i18n/locales/ko.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -19,6 +19,7 @@ export function LanguageSwitcher({ className }: LanguageSwitcherProps) {
|
|||
const languages = [
|
||||
{ code: 'zh', name: '中文' },
|
||||
{ code: 'en', name: 'English' },
|
||||
{ code: 'ko', name: '한국어' },
|
||||
]
|
||||
|
||||
// 获取当前语言的主要代码(去掉地区代码)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue