feat(i18n): add Korean (ko) translation (#1587)

This commit is contained in:
Hijae Song
2026-06-03 10:51:28 +02:00
committed by GitHub
parent 0471e43b8a
commit 77655d8dfa
3 changed files with 5748 additions and 1 deletions
+19
View File
@@ -285,6 +285,24 @@ const ZH_TW_COGNATES = [
'EC984C,#6CD4BC,A66EB9,D87694',
];
// Korean: script difference means almost nothing is identical.
// Allow loanwords/acronyms, format strings, and proper nouns that stay verbatim.
const KO_COGNATES = [
'OK', 'Bambu', 'N/A',
'({{count}}/8)', '(25%, 50%, 75%)',
'Custom Headers (JSON)',
'Box label (62 × 29 mm)',
'Avery L7160 — A4 sheet (38.1 × 63.5 mm × 21)',
'Avery 5160 — US Letter sheet (25.4 × 66.7 mm × 30)',
'EC984C,#6CD4BC,A66EB9,D87694',
'{{weight}}g', // unit suffix format string
'MakerWorld: {{designer}}', // brand + placeholder
'email', // OIDC claim name placeholder
'{{printer}}: {{error}}', // pure placeholders
'{{name}} — {{stage}} ({{percent}}%) — {{elapsed}}', // pure placeholders
'Obico ML API URL', // product name (Obico)
];
// Spanish cognates — words/phrases that are genuinely identical in Spanish.
const ES_COGNATES = [
'Error', 'Firmware', 'General', 'Control', 'Total', 'total', 'Material',
@@ -306,6 +324,7 @@ const IDENTICAL_TO_EN_ALLOWED = {
fr: new Set(FR_COGNATES),
it: new Set(IT_COGNATES),
ja: new Set(JA_COGNATES),
ko: new Set(KO_COGNATES),
es: new Set(ES_COGNATES),
'pt-BR': new Set(PT_BR_COGNATES),
'zh-CN': new Set(ZH_CN_COGNATES),
+4 -1
View File
@@ -9,6 +9,7 @@ import es from './locales/es';
import fr from './locales/fr';
import ja from './locales/ja';
import it from './locales/it';
import ko from './locales/ko';
import ptBR from './locales/pt-BR';
import zhCN from './locales/zh-CN';
import zhTW from './locales/zh-TW';
@@ -20,6 +21,7 @@ const resources = {
fr: { translation: fr },
ja: { translation: ja },
it: { translation: it },
ko: { translation: ko },
'pt-BR': { translation: ptBR },
'zh-CN': { translation: zhCN },
'zh-TW': { translation: zhTW },
@@ -31,7 +33,7 @@ i18n
.init({
resources,
fallbackLng: 'en',
supportedLngs: ['en', 'de', 'es', 'fr', 'ja', 'it', 'pt-BR', 'zh-CN', 'zh-TW'],
supportedLngs: ['en', 'de', 'es', 'fr', 'ja', 'it', 'ko', 'pt-BR', 'zh-CN', 'zh-TW'],
detection: {
// Order of detection methods
@@ -61,6 +63,7 @@ export const availableLanguages = [
{ code: 'fr', name: 'French', nativeName: 'Français' },
{ code: 'ja', name: 'Japanese', nativeName: '日本語' },
{ code: 'it', name: 'Italian', nativeName: 'Italiano' },
{ code: 'ko', name: 'Korean', nativeName: '한국어' },
{ code: 'pt-BR', name: 'Portuguese (Brazil)', nativeName: 'Português (Brasil)' },
{ code: 'zh-CN', name: 'Chinese (Simplified)', nativeName: '简体中文' },
{ code: 'zh-TW', name: 'Chinese (Traditional)', nativeName: '繁體中文' },
File diff suppressed because it is too large Load Diff