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

@@ -52,8 +52,8 @@ vi.mock('@coze-arch/bot-tea', () => ({
},
ParamsTypeDefine: {},
PluginMockDataGenerateMode: {
MANUAL: 0, // 手动创建
RANDOM: 1, // 随机生成
MANUAL: 0, // create manually
RANDOM: 1, // random generation
LLM: 2,
},
}));
@@ -61,21 +61,21 @@ vi.mock('@coze-arch/bot-tea', () => ({
vi.mock('@coze-arch/bot-hooks', () => ({
SceneType: {
BOT__VIEW__WORKFLOW: 'botViewWorkflow',
/** bot 详情页查看 workflow或新建 workflow 但未发布,点击返回 */
/** View the workflow on the bot details page, or create a new workflow but not published, click Return */
WORKFLOW__BACK__BOT: 'workflowBackBot',
/** bot 详情页创建 workflow在 workflow 发布后返回 */
/** The bot details page creates a workflow and returns it after the workflow is published */
WORKFLOW_PUBLISHED__BACK__BOT: 'workflowPublishedBackBot',
/** bot 详情页进入 mock data 页面 */
/** Bot details page Enter the mock data page */
BOT__TO__PLUGIN_MOCK_DATA: 'botToPluginMockData',
/** workflow 详情页进入 mock data 页面 */
/** Workflow details page Enter the mock data page */
WORKFLOW__TO__PLUGIN_MOCK_DATA: 'workflowToPluginMockData',
/** mock set 页进入 mock data 页面 */
/** Mock set page Enter the mock data page */
PLUGIN_MOCK_SET__TO__PLUGIN_MOCK_DATA: 'pluginMockSetToPluginMockData',
/** bot 详情页进入 knowledge 页面 */
/** Bot details page Enter the knowledge page */
BOT__VIEW__KNOWLEDGE: 'botViewKnowledge',
/** knowledge 页面点击退出返回 bot 详情页(未点击添加) */
/** Knowledge page Click Exit to return to bot details page (not clicked Add) */
KNOWLEDGE__BACK__BOT: 'knowledgeBackBot',
/** knowledge 页面点击返回 bot 详情页,并添加到 bot */
/** Knowledge page Click to return to bot details page and add to bot */
KNOWLEDGE__ADD_TO__BOT: 'knowledgeAddToBot',
},
usePageJumpService: vi.fn().mockReturnValue({

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
// 引入我们的被测方法
// Introducing our test method
import { describe, expect, it, vi } from 'vitest';
@@ -23,39 +23,39 @@ import { getEnv } from '@/util/get-env';
describe('getEnv function', () => {
it('should return "cn-boe" when not in production', () => {
vi.stubGlobal('IS_PROD', undefined);
// 不设置IS_PROD默认为非生产环境
// Do not set IS_PROD, default to non-production environment
const env = getEnv();
expect(env).toBe('cn-boe');
});
it('should return "cn-release" when in production, not overseas, and is release version', () => {
vi.stubGlobal('IS_PROD', true); // 设置为生产环境
vi.stubGlobal('IS_OVERSEA', false); // 不是海外
vi.stubGlobal('IS_RELEASE_VERSION', true); // 是发布版本
vi.stubGlobal('IS_PROD', true); // Set to production environment
vi.stubGlobal('IS_OVERSEA', false); // Not overseas.
vi.stubGlobal('IS_RELEASE_VERSION', true); // Is the release version
const env = getEnv();
expect(env).toBe('cn-release');
});
it('should return "cn-inhouse" when in production, not overseas, and is not release version', () => {
vi.stubGlobal('IS_PROD', true); // 设置为生产环境
vi.stubGlobal('IS_OVERSEA', false); // 不是海外
vi.stubGlobal('IS_RELEASE_VERSION', false); // 不是发布版本
vi.stubGlobal('IS_PROD', true); // Set to production environment
vi.stubGlobal('IS_OVERSEA', false); // Not overseas.
vi.stubGlobal('IS_RELEASE_VERSION', false); // Not the release version
const env = getEnv();
expect(env).toBe('cn-inhouse');
});
it('should return "oversea-release" when in production, overseas, and is release version', () => {
vi.stubGlobal('IS_PROD', true); // 设置为生产环境
vi.stubGlobal('IS_OVERSEA', true); // 是海外
vi.stubGlobal('IS_RELEASE_VERSION', true); // 是发布版本
vi.stubGlobal('IS_PROD', true); // Set to production environment
vi.stubGlobal('IS_OVERSEA', true); // Is overseas
vi.stubGlobal('IS_RELEASE_VERSION', true); // Is the release version
const env = getEnv();
expect(env).toBe('oversea-release');
});
it('should return "oversea-inhouse" when in production, overseas, and is not release version', () => {
vi.stubGlobal('IS_PROD', true); // 设置为生产环境
vi.stubGlobal('IS_OVERSEA', true); // 是海外
vi.stubGlobal('IS_RELEASE_VERSION', false); // 不是发布版本
vi.stubGlobal('IS_PROD', true); // Set to production environment
vi.stubGlobal('IS_OVERSEA', true); // Is overseas
vi.stubGlobal('IS_RELEASE_VERSION', false); // Not the release version
const env = getEnv();
expect(env).toBe('oversea-inhouse');
});