From: Dessalines Date: Thu, 27 Aug 2020 14:34:53 +0000 (-0400) Subject: Adding korean language template. X-Git-Url: http://these/git/readmes/%22https:/nerdica.net/%24%7Bargs.pageFn.jump%20n%7D?a=commitdiff_plain;h=3f0b3d7361acacc5d8d56a98a355897d20ab80ef;p=lemmy.git Adding korean language template. --- diff --git a/ui/src/i18next.ts b/ui/src/i18next.ts index 3657da33..39f7d65c 100644 --- a/ui/src/i18next.ts +++ b/ui/src/i18next.ts @@ -28,6 +28,7 @@ import { sq } from './translations/sq'; import { km } from './translations/km'; import { ga } from './translations/ga'; import { sr_Latn } from './translations/sr_Latn'; +import { ko } from './translations/ko'; // https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66 const resources = { @@ -59,6 +60,7 @@ const resources = { km, ga, sr_Latn, + ko, }; function format(value: any, format: any, lng: any): any { diff --git a/ui/src/utils.ts b/ui/src/utils.ts index f00a095a..4245cf70 100644 --- a/ui/src/utils.ts +++ b/ui/src/utils.ts @@ -25,6 +25,7 @@ import 'moment/locale/sq'; import 'moment/locale/km'; import 'moment/locale/ga'; import 'moment/locale/sr'; +import 'moment/locale/ko'; import { UserOperation, @@ -84,6 +85,7 @@ export const languages = [ { code: 'gl', name: 'Galego' }, { code: 'hu', name: 'Magyar Nyelv' }, { code: 'ka', name: 'ქართული ენა' }, + { code: 'ko', name: '한국어/韓國語' }, { code: 'km', name: 'ភាសាខ្មែរ' }, { code: 'hi', name: 'मानक हिन्दी' }, { code: 'fa', name: 'فارسی' }, @@ -411,6 +413,8 @@ export function getMomentLanguage(): string { lang = 'ga'; } else if (lang.startsWith('sr')) { lang = 'sr'; + } else if (lang.startsWith('ko')) { + lang = 'ko'; } else { lang = 'en'; } diff --git a/ui/translations/ko.json b/ui/translations/ko.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/ui/translations/ko.json @@ -0,0 +1 @@ +{}