0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-30 20:33:54 -05:00

chore: update README and language options (#1709)

* chore: update README

* chore: update language options
This commit is contained in:
Gao Sun 2022-07-31 08:07:46 +08:00 committed by GitHub
parent d1900e1854
commit c7e311c344
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 10 deletions

View file

@ -59,6 +59,12 @@ Requires [Node.js](https://nodejs.org/) `^16.13.0` + [PostgreSQL](https://postgr
node -e "$(printf "%s" "$(curl -fsSL https://raw.githubusercontent.com/logto-io/logto/HEAD/install.js)")"
```
## Language support
```ts
const languages = ['English', '简体中文', 'Türkçe', '한국어'];
```
## Bug report, feature request, feedback
- Our team takes security seriously, especially when it relates to identity. If you find any existing or potential security issues, please do not hesitate to email 🔒 [security@logto.io](mailto:security@logto.io).

View file

@ -14,7 +14,7 @@ export enum Language {
export const languageOptions = [
{ value: Language.English, title: 'English' },
{ value: Language.Chinese, title: '中文' },
{ value: Language.Turkish, title: 'Turkish' },
{ value: Language.Chinese, title: '简体中文' },
{ value: Language.Turkish, title: 'Türkçe' },
{ value: Language.Korean, title: '한국어' },
];

View file

@ -1,14 +1,11 @@
/* eslint-disable @typescript-eslint/consistent-indexed-object-style */
import { z } from 'zod';
/* Copied from i18next/index.d.ts */
export type Resource = Record<Language, ResourceLanguage>;
export interface ResourceLanguage {
[namespace: string]: ResourceKey;
}
export type ResourceLanguage = Record<string, ResourceKey>;
export type ResourceKey = string | { [key: string]: unknown };
export type ResourceKey = string | Record<string, unknown>;
export enum Language {
English = 'en',
@ -21,9 +18,7 @@ export const languageEnumGuard = z.nativeEnum(Language);
export const languageOptions = [
{ value: Language.English, title: 'English' },
{ value: Language.Chinese, title: '中文' },
{ value: Language.Chinese, title: '简体中文' },
{ value: Language.Turkish, title: 'Türkçe' },
{ value: Language.Korean, title: '한국어' },
];
/* eslint-enable @typescript-eslint/consistent-indexed-object-style */