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

@@ -72,7 +72,7 @@ export const renderWarningContent = ({
deployButton?: ReactNode;
}) => (
<div className={s['warning-content']}>
{/* TODO: 多个异常状态文案后续由接口返回, 目前只有discord存在异常状态走不到这里 */}
{/* TODO: Multiple abnormal status copies are subsequently returned by the interface. At present, only discord has abnormal status, so I can't go here. */}
{warningList.length > 1 ? (
<>
<div className={s['title-box']}>

View File

@@ -121,7 +121,7 @@ export const BotHeader: React.FC<BotHeaderProps> = props => {
)}
</title>
</Helmet>
{/** 1. 左侧bot信息区 */}
{/** 1. Left bot information area */}
<div className="flex items-center">
<BackButton onClickBack={goBackToBotList} />
<BotInfoCard
@@ -129,15 +129,15 @@ export const BotHeader: React.FC<BotHeaderProps> = props => {
editBotInfoFn={editBotInfoFn}
deployButton={props.deployButton}
/>
{/** 模式选择器 */}
{/** mode selector */}
{diffTask || IS_OPEN_SOURCE ? null : (
<ModeSelect optionList={props.modeOptionList} />
)}
</div>
{/* 2. 中间bot菜单区 - 已下线 */}
{/* 2. Middle bot menu area - offline */}
{/* 3. 右侧bot状态区 */}
{/* 3. Right bot state area */}
{props.addonAfter}
{updateBotModal}
</div>

View File

@@ -125,7 +125,7 @@ export const MoreMenuButton: FC = () => {
const hasMorePlatform = extendedConnectors?.some(item => !item.share_link);
// 不展示open条件 1.来自 explore的bot(已经没有 explore) 2. 未发布过平台的bot 3. 历史版本的bot(考虑revert后展示) 4.发布过的所有平台都没有分享链接
// Do not display open conditions 1. Bot from explore (no more explore) 2. Bot from unreleased platform 3. Bot of historical version (display after considering revert) 4. All released platforms do not share links
const hideOpenIn =
!extendedConnectors?.length ||
(version && historyVisible) ||
@@ -135,7 +135,7 @@ export const MoreMenuButton: FC = () => {
const [FLAGS] = useFlags();
//有编辑权限 && 有发布的业务线
//Have editing rights & & have published business lines
const showPublishManageMenu = !isReadOnly && hasPublish;
const { ready, inited } = useIsPublishRecordReady({
@@ -144,7 +144,7 @@ export const MoreMenuButton: FC = () => {
spaceId,
enable:
showPublishManageMenu &&
// 即将支持,敬请期待
// Support soon, so stay tuned.
FLAGS['bot.studio.publish_management'] &&
!IS_OPEN_SOURCE,
});
@@ -172,7 +172,7 @@ export const MoreMenuButton: FC = () => {
<Dropdown
render={
<Dropdown.Menu mode="menu">
{/* 即将支持,敬请期待 */}
{/* Support soon, so stay tuned. */}
{showPublishManageMenu &&
FLAGS['bot.studio.publish_management'] &&
!IS_OPEN_SOURCE
@@ -196,7 +196,7 @@ export const MoreMenuButton: FC = () => {
: null}
{hideOpenIn ? null : (
<>
{/* 即将支持,敬请期待 */}
{/* Support soon, so stay tuned. */}
{showPublishManageMenu &&
FLAGS['bot.studio.publish_management'] &&
!IS_OPEN_SOURCE ? (
@@ -208,7 +208,7 @@ export const MoreMenuButton: FC = () => {
connectors={extendedConnectors?.filter(
item =>
item.share_link &&
// 只读态仅显示状态正常的发布渠道
// Read-only status Only display normal release channels
(!isReadOnly ||
item.connector_status ===
ConnectorDynamicStatus.Normal),

View File

@@ -124,7 +124,7 @@ export const LinkDropItem = (props: {
</Space>
<Tooltip content={I18n.t('Copy_link')} position="right">
{/* flow 目前不支持粘贴分享链接,coming soon.. */}
{/* Flow currently does not support pasting and sharing links, coming soon.. */}
{mouseIn &&
linkInfo.share_link &&
linkInfo.id !== FLOW_PUBLISH_ID &&

View File

@@ -68,18 +68,18 @@ const BotEditorInitLayoutImpl: FC<
header,
customProvider,
}) => {
// 初次加载
// initial load
const [isFirstLoad, setIsFirstLoad] = useState(true);
const init = usePageRuntimeStore(state => state.init);
const userInfo = userStoreService.useUserInfo();
const modeSwitching = useBotPageStore(state => state.bot.modeSwitching);
const CustomProvider = customProvider || DefaultFragment;
// 因为clearStore会保留init值在切换bot时,init是true不会是初始值false
// Because clearStore will keep the init value, when switching the bot, init is true, not the initial value false.
useUpdateEffect(() => {
// init每次initStore都会被更新状态但这里只需要记录初次的loading所以需要对isFirstLoad判断
// init The initStore will be updated every time, but only the initial loading needs to be recorded here, so it is necessary to judge the isFirstLoad.
if (isFirstLoad && init) {
// 如果init完成并且是首次load表示初次请求完成isFirstLoad置为false
// If init completes and is loading for the first time, indicating that the initial request is complete, set isFirstLoad to false
setIsFirstLoad(false);
}
}, [init]);