0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-06 20:40:08 -05:00

feat: connector i18n (#171)

* feat: connector i18n

* fix: language key
This commit is contained in:
Wang Sijie 2022-01-17 10:58:45 +08:00 committed by GitHub
parent 492724a575
commit a77149bb8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 5 deletions

View file

@ -5,8 +5,14 @@ import { ConnectorMetadata } from '../types';
export const metadata: ConnectorMetadata = {
id: 'aliyun-dm',
type: ConnectorType.Email,
name: '阿里云邮件推送',
name: {
en: 'Aliyun Direct Mail',
zh_CN: '阿里云邮件推送',
},
logo: './logo.png',
description:
'邮件推送DirectMail是款简单高效的电子邮件群发服务构建在阿里云基础之上帮您快速、精准地实现事务邮件、通知邮件和批量邮件的发送。',
description: {
en: 'A simple and efficient email service to help you send transactional notifications and batch email.',
zh_CN:
'邮件推送DirectMail是款简单高效的电子邮件群发服务构建在阿里云基础之上帮您快速、精准地实现事务邮件、通知邮件和批量邮件的发送。',
},
};

View file

@ -1,11 +1,12 @@
import { Languages } from '@logto/phrases';
import { ConnectorType } from '@logto/schemas';
export interface ConnectorMetadata {
id: string;
type: ConnectorType;
name: string;
name: Record<Languages, string>;
logo: string;
description: string;
description: Record<Languages, string>;
}
// The name `Connector` is used for database, use `ConnectorInstance` to avoid confusing.

View file

@ -4,6 +4,7 @@ import { Normalize, Resource } from './types';
export type LogtoErrorCode = Normalize<typeof en.errors>;
export type LogtoErrorI18nKey = `errors:${LogtoErrorCode}`;
export type Languages = keyof Resource;
const resource: Resource = {
en,