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

@@ -22,7 +22,7 @@ import { I18n } from '@coze-arch/i18n';
import { UIModal } from '@coze-arch/bot-semi';
import { useResetLocationState } from '@coze-arch/bot-hooks';
// 三方授权失败callback至发布页需要显式阻塞弹窗
// Tripartite authorization failed, callback to the release page needs to explicitly block the pop-up window
export const useAuthFail = () => {
const { state } = useLocation();
const { authFailMessage = '', authStatus } = (state ??

View File

@@ -41,7 +41,7 @@ const DEFAULT_BOT_INFO: PublisherBotInfo = {
prompt: '',
};
// 获取plugin收费插件信息
// Get plugin charging plugin information
const getPricingRules: (
pluginApiDetailMap?: Record<string | number, PluginAPIDetal>,
) => Promise<PluginPricingRule[] | undefined> = async pluginApiDetailMap => {
@@ -58,7 +58,7 @@ const getPricingRules: (
return pricing_rules;
};
// 是否有plugin
// Is there a plugin?
const hasPluginApi: (
pluginApiDetailMap?: Record<string | number, PluginAPIDetal>,
) => boolean = pluginApiDetailMap =>
@@ -113,7 +113,7 @@ export const useGetPublisherInitInfo: () => {
bot_option_data,
} = botInfoResp?.data ?? {};
// 获取plugin扣费信息
// Get plugin deduction information
let pluginPricingRules: Array<PluginPricingRule> = [];
if (
hasPluginApi(bot_option_data?.plugin_api_detail_map) &&

View File

@@ -126,7 +126,7 @@ export const AgentPublishPage = () => {
const publishBtn = (
<UIButton
theme="solid"
//解决异步请求botInfo未返回时可以点击publish产生的错误
//Resolve the error caused by clicking publish when the asynchronous request botInfo is not returned
disabled={Boolean(publishDisabled) || !botInfo.name}
loading={publishLoading}
onClick={handlePublish}

View File

@@ -51,7 +51,7 @@ import { PublishResultArea } from './component/publish-result-area';
import styles from '../index.module.less';
interface PublishResultProps {
// 隐藏Banner
// Hidden Banner
hiddenBanner?: boolean;
publishResult?: PublishResultInfo;
}
@@ -212,7 +212,7 @@ export const PublishResult = ({
? `⚠️ ${I18n.t('publish_result_all_failed')}`
: `🎉 ${I18n.t('publish_success')}`}
</div>
{/* 开源版暂不支持该功能 */}
{/* The open-source version does not currently support this function */}
{IS_OVERSEA && !publishResult?.monetizeConfigSuccess ? (
<div className="mt-[12px] flex items-center gap-[8px] coz-fg-primary">
<IconCozInfoCircleFill className="coz-fg-hglt-yellow" />
@@ -221,7 +221,7 @@ export const PublishResult = ({
</span>
</div>
) : null}
{/* 开源版暂不支持该功能 */}
{/* The open-source version does not currently support this function */}
{FLAGS['bot.studio.publish_management'] && !IS_OPEN_SOURCE ? (
<div className="coz-fg-dim text-[12px]">
{I18n.t('release_management_detail1', {

View File

@@ -100,8 +100,8 @@ export const PublishConnectorAction: React.FC<ActionColumnProps> = ({
const action = (() => {
switch (record.bind_type) {
case BindType.KvBind: //仅绑定
case BindType.KvAuthBind: //绑定+授权,取消绑定后自动取消授权
case BindType.KvBind: //bind only
case BindType.KvAuthBind: //Bind + authorization, automatically cancel the authorization after unbinding
return (
<KvBindButton
record={record}
@@ -181,7 +181,7 @@ export const ConfigStatusColumn: React.FC<ActionColumnProps> = props => {
tagProps={{
color,
style: { margin: 0 },
// 覆盖原来的orange-tag
// Overwrite the original orange-tag.
className: styles['common-tag'],
}}
/>

View File

@@ -96,7 +96,7 @@ export const StoreBind: React.FC<StoreBindProps> = ({
setSourceConfig(true);
} else {
setSourceConfig(false);
// 兜底逻辑:如果出错,或不在白名单中,则自动更改为“私有配置”发布
// Fallback logic: if there is an error, or it is not in the whitelist, it is automatically changed to "private configuration" publishing
handleSelect('open_source', BotSubmitStatus.Private);
}
},
@@ -107,7 +107,7 @@ export const StoreBind: React.FC<StoreBindProps> = ({
async () => {
const res = await ProductApi.PublicGetProductCategoryList(
{
// 代表含义:无商品也返回类型,即为全量的类型
// Representative meaning: no goods also return the type, that is, the type of the full amount
need_empty_category: true,
entity_type: ProductEntityType.Bot,
},

View File

@@ -20,7 +20,7 @@ import { useEffect } from 'react';
import { AuthStatus } from '@coze-arch/idl/developer_api';
import { useResetLocationState } from '@coze-arch/bot-hooks';
// 三方授权成功,调用成功回调
// The three-party authorization is successful, and the callback is successful.
export const useAuthSuccess = (bindSuccess: (id: string) => void) => {
const { state } = useLocation();
const { oauth2, authStatus } = (state ?? history.state ?? {}) as Record<

View File

@@ -103,7 +103,7 @@ const getCheckboxProps = (record: PublishConnectorInfo, disabled: boolean) => {
return {
disabled: !!disableTip || disabled,
id: record.id,
// Offline状态没有tooltip
// Offline status No tooltip
children: disableTip ? (
<Tooltip content={disableTip}>
<span className={styles['disable-tooltip']} />
@@ -152,7 +152,7 @@ export const TableCollection = (props: PublishTableProps) => {
[dataSourceForChannel, connectorBrandInfoMap],
);
// 无全选按钮因此所有表格使用相同check配置
// There is no select all button, so all tables use the same check configuration
const baseConfigForChecker = {
hidden: true,
fixed: 'left' as const,
@@ -212,9 +212,9 @@ export const TableCollection = (props: PublishTableProps) => {
: [record.id, ...ids],
);
}
}, // 点击行选中
onMouseEnter: () => onMouseEnter(record), // 鼠标移入行
onMouseLeave: () => onMouseLeave(record), // 鼠标移出行
}, // Click on the line to select
onMouseEnter: () => onMouseEnter(record), // mouseover
onMouseLeave: () => onMouseLeave(record), // mouse movement
});
const tableCommonProps = {
className: classNames(styles['publish-table']),
@@ -285,7 +285,7 @@ function TableTittleExtra({
platforms: PublishConnectorInfo[];
botInfo: PublisherBotInfo;
}) {
// 付费墙
// paywall
const isAvailable = useBenefitAvailable({
scene: PremiumPaywallScene.API,
});

View File

@@ -24,7 +24,7 @@ import { I18n } from '@coze-arch/i18n';
import { Typography } from '@coze-arch/coze-design';
import { type PluginPricingRule } from '@coze-arch/bot-api/plugin_develop';
// 发布页提示
// release page tip
export const PluginPricingInfo: FC<{
pluginPricingRules?: Array<PluginPricingRule>;
}> = ({ pluginPricingRules }) => {