chore: replace all cn comments of fe to en version by volc api (#320)

This commit is contained in:
tecvan
2025-07-31 10:32:15 +08:00
committed by GitHub
parent 716ec0cba8
commit 71f6245a01
2960 changed files with 15545 additions and 15545 deletions

View File

@@ -15,7 +15,7 @@
*/
/**
* @file 开源版暂时不提供企业管理功能,本文件中导出的方法用于未来拓展使用。
* The @file open-source version does not provide enterprise management functions for the time being. The methods exported in this file are for future expansion.
*/
import { useCallback } from 'react';

View File

@@ -15,7 +15,7 @@
*/
/**
* @file 开源版暂时不提供企业管理功能,本文件中导出的方法用于未来拓展使用。
* The @file open-source version does not provide enterprise management functions for the time being. The methods exported in this file are for future expansion.
*/
import { type GetEnterpriseResponseData } from '@coze-arch/bot-api/pat_permission_api';
@@ -25,44 +25,44 @@ export interface CurrentEnterpriseInfoProps extends GetEnterpriseResponseData {
organization_id: string | undefined;
}
/**
* 获取当前企业信息。
* 如果当前企业为个人版则返回null。
* 否则,返回当前企业信息,包括企业信息和组织ID
* Acquire current corporate information.
* If the current enterprise is a personal edition, null is returned.
* Otherwise, return current enterprise information, including enterprise information and organization ID.
* @example
* const { organization_id, enterprise_id } = useCurrentEnterpriseInfo();
* @returns {(GetEnterpriseResponseData & { organization_id: string | undefined }) | null} 当前企业信息或null
* @Returns { (GetEnterpriseResponseData & {organization_id: string | undefined}) | null} current enterprise information or null
*/
export const useCurrentEnterpriseInfo: () => CurrentEnterpriseInfoProps | null =
() => null;
/**
* 获取当前企业ID
* 如果当前企业类型为个人版,则返回约定的字符串。
* 否则返回当前企业的ID。
* @returns {string} 当前企业ID
* Obtain the current enterprise ID.
* If the current enterprise type is Personal Edition, the agreed string is returned.
* Otherwise, return the ID of the current enterprise.
* @Returns {string} current enterprise ID
*/
export const useCurrentEnterpriseId = () =>
useEnterpriseStore(store => store.enterpriseId);
/**
* 检查当前企业是否为个人版。
* @returns {boolean} 如果当前企业为个人版则返回true否则返回false。
* Check whether the current enterprise is a personal version.
* @Returns {boolean} True if the current enterprise is a personal edition, false otherwise.
*/
export const useIsCurrentPersonalEnterprise = () => true;
/**
* 获取当前企业的角色列表。
* 如果当前企业类型为个人版,则返回空数组。
* 否则,返回当前企业的角色类型列表,如果列表不存在,则返回空数组。
* @returns {Array} 当前企业的角色列表
* Get a list of roles for the current enterprise.
* If the current enterprise type is Personal, an empty array is returned.
* Otherwise, a list of the current enterprise's role types is returned, or an empty array if the list does not exist.
* @Returns {Array} list of roles for the current enterprise
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const useCurrentEnterpriseRoles = (): any[] => [];
/** 是否是企业版 */
/** Is it the enterprise version? */
export const useIsEnterpriseLevel = () => false;
/** 是否是团队版 */
/** Is it the team version? */
export const useIsTeamLevel = () => false;
export const useIsCurrentEnterpriseInit = () =>

View File

@@ -15,14 +15,14 @@
*/
/**
* @file 开源版暂时不提供企业管理功能,本文件中导出的方法用于未来拓展使用。
* The @file open-source version does not provide enterprise management functions for the time being. The methods exported in this file are for future expansion.
*/
import { useEnterpriseStore } from '../stores/enterprise';
/**
* 获取企业列表的hook。
* 从企业store中获取企业列表并返回企业信息列表。
* @returns {Array} 企业信息列表
* Hook to get the business list.
* Get the business list from the business store and return the list of business information.
* @Returns {Array} Enterprise Information List
*/
export const useEnterpriseList = () => {
const list = useEnterpriseStore(store => store.enterpriseList);

View File

@@ -15,7 +15,7 @@
*/
/**
* @file 开源版暂时不提供企业管理功能,本文件中导出的方法用于未来拓展使用。
* The @file open-source version does not provide enterprise management functions for the time being. The methods exported in this file are for future expansion.
*/
export { PERSONAL_ENTERPRISE_ID } from './constants';
@@ -34,6 +34,6 @@ export {
CurrentEnterpriseInfoProps,
} from './hooks/use-current-enterprise-info';
// 工具方法
// tool method
export { switchEnterprise } from './utils/switch-enterprise';
export { isPersonalEnterprise } from './utils/personal';

View File

@@ -15,7 +15,7 @@
*/
/**
* @file 开源版暂时不提供企业管理功能,本文件中导出的方法用于未来拓展使用。
* The @file open-source version does not provide enterprise management functions for the time being. The methods exported in this file are for future expansion.
*/
/* eslint-disable @typescript-eslint/no-empty-function */
import { devtools } from 'zustand/middleware';
@@ -74,7 +74,7 @@ export const useEnterpriseStore = create<
setIsEnterpriseListInit: (_: boolean) => {},
setEnterpriseList: (_: ListEnterpriseResponseData) => {},
setIsEnterpriseExist: (_: boolean) => {},
// 获取企业信息,可连续调用,不存在异步竞争问题。
// Obtaining enterprise information can be continuously invoked without asynchronous competition.
fetchEnterprise: (_: string) => {},
}),
{

View File

@@ -15,11 +15,11 @@
*/
/**
* @file 开源版暂时不提供企业管理功能,本文件中导出的方法用于未来拓展使用。
* The @file open-source version does not provide enterprise management functions for the time being. The methods exported in this file are for future expansion.
*/
import { PERSONAL_ENTERPRISE_ID } from '../constants';
// 检查企业是否为个人版
// Check if the business is a personal version
export const isPersonalEnterprise = (enterpriseId?: string) =>
enterpriseId === PERSONAL_ENTERPRISE_ID;

View File

@@ -15,11 +15,11 @@
*/
/**
* @file 开源版暂时不提供企业管理功能,本文件中导出的方法用于未来拓展使用。
* The @file open-source version does not provide enterprise management functions for the time being. The methods exported in this file are for future expansion.
*/
/**
* 切换企业
* @param {string} enterpriseId - 企业ID
* Switch Enterprise
* @param {string} enterpriseId - Enterprise ID
*/
export const switchEnterprise = (_: string) => Promise.resolve();