fix(i18n): localize pipeline processor type

This commit is contained in:
RockChinQ
2026-08-27 15:57:31 +08:00
parent 21ffaf9a14
commit 5e144ac7c8
9 changed files with 26 additions and 10 deletions
+1 -1
View File
@@ -515,7 +515,7 @@ const esES = {
agentType: 'Agent', agentType: 'Agent',
agentTypeDescription: agentTypeDescription:
'Usa un runner para procesar mensajes, miembros de grupo, amigos, retroalimentación y otros eventos de plataforma.', 'Usa un runner para procesar mensajes, miembros de grupo, amigos, retroalimentación y otros eventos de plataforma.',
pipelineType: 'Pipeline', pipelineType: 'Flujo de trabajo',
kindBadgeAgent: 'Agent', kindBadgeAgent: 'Agent',
kindBadgePipeline: 'Pipeline', kindBadgePipeline: 'Pipeline',
groupByKind: 'Agrupar por tipo', groupByKind: 'Agrupar por tipo',
+1 -1
View File
@@ -715,7 +715,7 @@ const jaJP = {
agentType: 'Agent', agentType: 'Agent',
agentTypeDescription: agentTypeDescription:
'Runner を使ってメッセージ、グループメンバー、友だち、フィードバックなどのプラットフォームイベントを処理します。自律的な判断、ツール利用、メッセージ以外のイベント対応が必要な場合に適しています。', 'Runner を使ってメッセージ、グループメンバー、友だち、フィードバックなどのプラットフォームイベントを処理します。自律的な判断、ツール利用、メッセージ以外のイベント対応が必要な場合に適しています。',
pipelineType: 'Pipeline', pipelineType: 'パイプライン',
kindBadgeAgent: 'Agent', kindBadgeAgent: 'Agent',
kindBadgePipeline: 'パイプライン', kindBadgePipeline: 'パイプライン',
groupByKind: 'タイプ別にグループ化', groupByKind: 'タイプ別にグループ化',
+1 -1
View File
@@ -512,7 +512,7 @@ const ruRU = {
agentType: 'Agent', agentType: 'Agent',
agentTypeDescription: agentTypeDescription:
'Используйте runner для обработки сообщений, участников групп, друзей, обратной связи и других событий платформы.', 'Используйте runner для обработки сообщений, участников групп, друзей, обратной связи и других событий платформы.',
pipelineType: 'Pipeline', pipelineType: 'Конвейер',
kindBadgeAgent: 'Agent', kindBadgeAgent: 'Agent',
kindBadgePipeline: 'Pipeline', kindBadgePipeline: 'Pipeline',
groupByKind: 'Группировать по типу', groupByKind: 'Группировать по типу',
+1 -1
View File
@@ -498,7 +498,7 @@ const thTH = {
agentType: 'Agent', agentType: 'Agent',
agentTypeDescription: agentTypeDescription:
'ใช้ runner เพื่อประมวลผลข้อความ สมาชิกกลุ่ม เพื่อน ฟีดแบ็ก และเหตุการณ์แพลตฟอร์มอื่นๆ', 'ใช้ runner เพื่อประมวลผลข้อความ สมาชิกกลุ่ม เพื่อน ฟีดแบ็ก และเหตุการณ์แพลตฟอร์มอื่นๆ',
pipelineType: 'Pipeline', pipelineType: 'ไปป์ไลน์',
kindBadgeAgent: 'Agent', kindBadgeAgent: 'Agent',
kindBadgePipeline: 'Pipeline', kindBadgePipeline: 'Pipeline',
groupByKind: 'จัดกลุ่มตามประเภท', groupByKind: 'จัดกลุ่มตามประเภท',
+1 -1
View File
@@ -508,7 +508,7 @@ const viVN = {
agentType: 'Agent', agentType: 'Agent',
agentTypeDescription: agentTypeDescription:
'Dùng runner để xử lý tin nhắn, thành viên nhóm, bạn bè, phản hồi và các sự kiện nền tảng khác.', 'Dùng runner để xử lý tin nhắn, thành viên nhóm, bạn bè, phản hồi và các sự kiện nền tảng khác.',
pipelineType: 'Pipeline', pipelineType: 'Quy trình',
kindBadgeAgent: 'Agent', kindBadgeAgent: 'Agent',
kindBadgePipeline: 'Pipeline', kindBadgePipeline: 'Pipeline',
groupByKind: 'Nhóm theo loại', groupByKind: 'Nhóm theo loại',
+1 -1
View File
@@ -672,7 +672,7 @@ const zhHans = {
agentType: 'Agent', agentType: 'Agent',
agentTypeDescription: agentTypeDescription:
'通过运行器处理消息、群成员、好友、反馈等平台事件。适合需要自主判断、调用工具或响应非消息事件的场景。', '通过运行器处理消息、群成员、好友、反馈等平台事件。适合需要自主判断、调用工具或响应非消息事件的场景。',
pipelineType: 'Pipeline', pipelineType: '流水线',
kindBadgeAgent: 'Agent', kindBadgeAgent: 'Agent',
kindBadgePipeline: '流水线', kindBadgePipeline: '流水线',
groupByKind: '按类型分组', groupByKind: '按类型分组',
+1 -1
View File
@@ -481,7 +481,7 @@ const zhHant = {
selectFromSidebar: '從側邊欄選擇一個 Agent 或 Pipeline', selectFromSidebar: '從側邊欄選擇一個 Agent 或 Pipeline',
agentType: 'Agent', agentType: 'Agent',
agentTypeDescription: '透過執行器處理訊息、群成員、好友、回饋等平台事件。', agentTypeDescription: '透過執行器處理訊息、群成員、好友、回饋等平台事件。',
pipelineType: 'Pipeline', pipelineType: '流程線',
kindBadgeAgent: 'Agent', kindBadgeAgent: 'Agent',
kindBadgePipeline: '流水線', kindBadgePipeline: '流水線',
groupByKind: '依類型分組', groupByKind: '依類型分組',
+14
View File
@@ -74,6 +74,20 @@ async function forceFormSubmit(page: Page, formSelector: string) {
} }
test.describe('frontend CRUD smoke flows', () => { test.describe('frontend CRUD smoke flows', () => {
test('localizes the pipeline processor type in Simplified Chinese', async ({
page,
}) => {
await installLangBotApiMocks(page, {
authenticated: true,
language: 'zh-Hans',
});
await page.goto('/home/agents?id=new');
await expect(
page.locator('[data-processor-kind="pipeline"]'),
).toContainText('流水线');
});
test('viewer keeps ordinary bot and pipeline monitoring access', async ({ test('viewer keeps ordinary bot and pipeline monitoring access', async ({
page, page,
}) => { }) => {
+5 -3
View File
@@ -1239,6 +1239,7 @@ export async function installLangBotApiMocks(
page: Page, page: Page,
options: { options: {
authenticated?: boolean; authenticated?: boolean;
language?: string;
monitoringData?: unknown; monitoringData?: unknown;
monitoringSessions?: unknown[]; monitoringSessions?: unknown[];
sessionAnalyses?: Record<string, unknown>; sessionAnalyses?: Record<string, unknown>;
@@ -1251,6 +1252,7 @@ export async function installLangBotApiMocks(
) { ) {
const { const {
authenticated = false, authenticated = false,
language = 'en-US',
monitoringData, monitoringData,
monitoringSessions, monitoringSessions,
sessionAnalyses, sessionAnalyses,
@@ -1278,8 +1280,8 @@ export async function installLangBotApiMocks(
}; };
await page.addInitScript( await page.addInitScript(
({ authenticated, storage }) => { ({ authenticated, language, storage }) => {
localStorage.setItem('langbot_language', 'en-US'); localStorage.setItem('langbot_language', language);
localStorage.setItem('extensions_group_by_type', 'false'); localStorage.setItem('extensions_group_by_type', 'false');
if (authenticated) { if (authenticated) {
@@ -1294,7 +1296,7 @@ export async function installLangBotApiMocks(
localStorage.setItem(key, String(value)); localStorage.setItem(key, String(value));
} }
}, },
{ authenticated, storage }, { authenticated, language, storage },
); );
await page.route('**/api/v1/**', (route) => handleBackendApi(route, state)); await page.route('**/api/v1/**', (route) => handleBackendApi(route, state));