0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

fix: correct error messages (#2656)

This commit is contained in:
Darcy Ye 2022-12-14 11:38:53 +08:00 committed by GitHub
parent d111e5d407
commit a134ea14b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 32 additions and 24 deletions

View file

@ -130,11 +130,11 @@ export default function connectorRoutes<T extends AuthedRouter>(router: T) {
assertThat(
connectorFactory.metadata.isStandard !== true || metadata?.target,
'connector.can_not_modify_target'
'connector.should_specify_target'
);
assertThat(
connectorFactory.metadata.isStandard === true || metadata === undefined,
'connector.cannot_change_metadata_for_non_standard_connector'
'connector.cannot_overwrite_metadata_for_non_standard_connector'
);
const { count } = await countConnectorByConnectorId(connectorId);
@ -215,7 +215,7 @@ export default function connectorRoutes<T extends AuthedRouter>(router: T) {
assertThat(
originalMetadata.isStandard === true || metadata === undefined,
'connector.cannot_change_metadata_for_non_standard_connector'
'connector.cannot_overwrite_metadata_for_non_standard_connector'
);
if (syncProfile) {

View file

@ -109,11 +109,12 @@ const errors = {
multiple_instances_not_supported:
'Can not create multiple instance with picked standard connector.',
invalid_type_for_syncing_profile: 'You can only sync user profile with social connectors.',
can_not_modify_target: 'The connector target can not be modified.',
can_not_modify_target: "The connector 'target' can not be modified.",
should_specify_target: "You should specify 'target'.",
multiple_target_with_same_platform:
'You can not have multiple social connectors that have same target and platform.',
cannot_change_metadata_for_non_standard_connector:
"This connector's `metadata` cannot be changed.",
cannot_overwrite_metadata_for_non_standard_connector:
"This connector's 'metadata' cannot be overwritten.",
},
passcode: {
phone_email_empty: 'Telefonnummer oder E-Mail darf nicht leer sein.',

View file

@ -108,11 +108,12 @@ const errors = {
multiple_instances_not_supported:
'Can not create multiple instance with picked standard connector.',
invalid_type_for_syncing_profile: 'You can only sync user profile with social connectors.',
can_not_modify_target: 'The connector target can not be modified.',
can_not_modify_target: "The connector 'target' can not be modified.",
should_specify_target: "You should specify 'target'.",
multiple_target_with_same_platform:
'You can not have multiple social connectors that have same target and platform.',
cannot_change_metadata_for_non_standard_connector:
"This connector's `metadata` cannot be changed.",
cannot_overwrite_metadata_for_non_standard_connector:
"This connector's 'metadata' cannot be overwritten.",
},
passcode: {
phone_email_empty: 'Both phone and email are empty.',

View file

@ -115,11 +115,12 @@ const errors = {
multiple_instances_not_supported:
'Can not create multiple instance with picked standard connector.', // UNTRANSLATED
invalid_type_for_syncing_profile: 'You can only sync user profile with social connectors.', // UNTRANSLATED
can_not_modify_target: 'The connector target can not be modified.', // UNTRANSLATED
can_not_modify_target: "The connector 'target' can not be modified.", // UNTRANSLATED
should_specify_target: "You should specify 'target'.", // UNTRANSLATED
multiple_target_with_same_platform:
'You can not have multiple social connectors that have same target and platform.', // UNTRANSLATED
cannot_change_metadata_for_non_standard_connector:
"This connector's `metadata` cannot be changed.", // UNTRANSLATED
cannot_overwrite_metadata_for_non_standard_connector:
"This connector's 'metadata' cannot be overwritten.", // UNTRANSLATED
},
passcode: {
phone_email_empty: "Le téléphone et l'email sont vides.",

View file

@ -107,11 +107,12 @@ const errors = {
multiple_instances_not_supported:
'Can not create multiple instance with picked standard connector.', // UNTRANSLATED
invalid_type_for_syncing_profile: 'You can only sync user profile with social connectors.', // UNTRANSLATED
can_not_modify_target: 'The connector target can not be modified.', // UNTRANSLATED
can_not_modify_target: "The connector 'target' can not be modified.", // UNTRANSLATED
should_specify_target: "You should specify 'target'.", // UNTRANSLATED
multiple_target_with_same_platform:
'You can not have multiple social connectors that have same target and platform.', // UNTRANSLATED
cannot_change_metadata_for_non_standard_connector:
"This connector's `metadata` cannot be changed.", // UNTRANSLATED
cannot_overwrite_metadata_for_non_standard_connector:
"This connector's 'metadata' cannot be overwritten.", // UNTRANSLATED
},
passcode: {
phone_email_empty: '휴대전화번호 그리고 이메일이 비어있어요.',

View file

@ -113,10 +113,11 @@ const errors = {
invalid_type_for_syncing_profile:
'Você só pode sincronizar o perfil do usuário com conectores sociais.',
can_not_modify_target: 'O destino do conector não pode ser modificado.',
should_specify_target: "You should specify 'target'.", // UNTRANSLATED
multiple_target_with_same_platform:
'Você não pode ter vários conectores sociais com o mesmo destino e plataforma.',
cannot_change_metadata_for_non_standard_connector:
"This connector's `metadata` cannot be changed.", // UNTRANSLATED
cannot_overwrite_metadata_for_non_standard_connector:
"This connector's 'metadata' cannot be overwritten.", // UNTRANSLATED
},
passcode: {
phone_email_empty: 'Telefone e e-mail estão vazios.',

View file

@ -110,11 +110,12 @@ const errors = {
multiple_instances_not_supported:
'Can not create multiple instance with picked standard connector.', // UNTRANSLATED
invalid_type_for_syncing_profile: 'You can only sync user profile with social connectors.', // UNTRANSLATED
can_not_modify_target: 'The connector target can not be modified.', // UNTRANSLATED
can_not_modify_target: "The connector 'target' can not be modified.", // UNTRANSLATED
should_specify_target: "You should specify 'target'.", // UNTRANSLATED
multiple_target_with_same_platform:
'You can not have multiple social connectors that have same target and platform.', // UNTRANSLATED
cannot_change_metadata_for_non_standard_connector:
"This connector's `metadata` cannot be changed.", // UNTRANSLATED
cannot_overwrite_metadata_for_non_standard_connector:
"This connector's 'metadata' cannot be overwritten.", // UNTRANSLATED
},
passcode: {
phone_email_empty: 'O campos telefone e email estão vazios.',

View file

@ -109,11 +109,12 @@ const errors = {
multiple_instances_not_supported:
'Can not create multiple instance with picked standard connector.', // UNTRANSLATED
invalid_type_for_syncing_profile: 'You can only sync user profile with social connectors.', // UNTRANSLATED
can_not_modify_target: 'The connector target can not be modified.', // UNTRANSLATED
can_not_modify_target: "The connector 'target' can not be modified.", // UNTRANSLATED
should_specify_target: "You should specify 'target'.", // UNTRANSLATED
multiple_target_with_same_platform:
'You can not have multiple social connectors that have same target and platform.', // UNTRANSLATED
cannot_change_metadata_for_non_standard_connector:
"This connector's `metadata` cannot be changed.", // UNTRANSLATED
cannot_overwrite_metadata_for_non_standard_connector:
"This connector's 'metadata' cannot be overwritten.", // UNTRANSLATED
},
passcode: {
phone_email_empty: 'Hem telefon hem de e-posta adresi yok.',

View file

@ -102,8 +102,9 @@ const errors = {
multiple_instances_not_supported: '你选择的连接器不支持创建多实例。',
invalid_type_for_syncing_profile: '只有社交连接器可以开启用户档案同步。',
can_not_modify_target: '不可修改连接器 target。',
should_specify_target: '你需要声明 target 的值。',
multiple_target_with_same_platform: '不能同时存在多个有相同 target 和平台类型的社交连接器。',
cannot_change_metadata_for_non_standard_connector: '不可配置该连接器的 metadata 参数。',
cannot_overwrite_metadata_for_non_standard_connector: '不可覆盖该连接器的 metadata 参数。',
},
passcode: {
phone_email_empty: '手机号与邮箱地址均为空',