From cdd812f9358bc79d74f4f0206564f778597ce00b Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 28 May 2026 14:53:20 +0800 Subject: [PATCH] i18n: convert dashboard text fields to otext+i18n:true for translation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All Chinese text strings converted to use otext with i18n:true so bricks framework can look up translations. Template strings with {{...}} left as text (correct - dynamic content). Affected files: - index.ui: 数据概览, 快捷入口, 模型管理, 用户管理, 知识库, 异常记录, 用户消费排行, 用户调用排行, 供应商交易排行, 供应商调用排行, Top 3 模型 - stat_*.ui: 今日活跃用户, 在线用户, 记账异常, 本月新增用户, 今日消费金额, 今日调用笔数, 组织机构数, 用户总数 - today_amount.ui, today_usage.ui: 今日交易金额, 今日调用笔数 - accounting_errors.ui, concurrent_users.ui, total_users.ui - table_top_*.ui: 暂无数据 - top_users_amount.ui: 用户金额TOP5, 排名, 用户, 金额, 调用次数 --- wwwroot/accounting_errors.ui | 7 ++-- wwwroot/concurrent_users.ui | 7 ++-- wwwroot/index.ui | 57 ++++++++++++++++----------- wwwroot/stat_active_users.ui | 7 ++-- wwwroot/stat_concurrent.ui | 7 ++-- wwwroot/stat_errors.ui | 7 ++-- wwwroot/stat_new_users_month.ui | 7 ++-- wwwroot/stat_today_amount.ui | 7 ++-- wwwroot/stat_today_usage.ui | 7 ++-- wwwroot/stat_total_orgs.ui | 7 ++-- wwwroot/stat_total_users.ui | 7 ++-- wwwroot/table_top_providers_amount.ui | 4 +- wwwroot/table_top_providers_count.ui | 4 +- wwwroot/table_top_users_amount.ui | 4 +- wwwroot/table_top_users_count.ui | 4 +- wwwroot/today_amount.ui | 7 ++-- wwwroot/today_usage.ui | 7 ++-- wwwroot/top_users_amount.ui | 19 ++++++--- wwwroot/total_users.ui | 7 ++-- 19 files changed, 111 insertions(+), 72 deletions(-) diff --git a/wwwroot/accounting_errors.ui b/wwwroot/accounting_errors.ui index 0f8f788..4a10573 100644 --- a/wwwroot/accounting_errors.ui +++ b/wwwroot/accounting_errors.ui @@ -12,10 +12,11 @@ { "widgettype": "Text", "options": { - "text": "记账错误笔数", "fontSize": "14px", "color": "#888", - "marginBottom": "8px" + "marginBottom": "8px", + "otext": "记账错误笔数", + "i18n": true } }, { @@ -29,4 +30,4 @@ } } ] -} +} \ No newline at end of file diff --git a/wwwroot/concurrent_users.ui b/wwwroot/concurrent_users.ui index 34ffca2..9170115 100644 --- a/wwwroot/concurrent_users.ui +++ b/wwwroot/concurrent_users.ui @@ -12,10 +12,11 @@ { "widgettype": "Text", "options": { - "text": "当前并发用户", "fontSize": "14px", "color": "#888", - "marginBottom": "8px" + "marginBottom": "8px", + "otext": "当前并发用户", + "i18n": true } }, { @@ -29,4 +30,4 @@ } } ] -} +} \ No newline at end of file diff --git a/wwwroot/index.ui b/wwwroot/index.ui index 1ab7e7f..05fb2ec 100644 --- a/wwwroot/index.ui +++ b/wwwroot/index.ui @@ -17,9 +17,10 @@ { "widgettype": "Title2", "options": { - "text": "数据概览", "color": "#F1F5F9", - "fontWeight": "700" + "fontWeight": "700", + "otext": "数据概览", + "i18n": true } }, { @@ -148,9 +149,10 @@ { "widgettype": "Title4", "options": { - "text": "Top 3 模型(今日调用)", "color": "#F1F5F9", - "fontWeight": "600" + "fontWeight": "600", + "otext": "Top 3 模型(今日调用)", + "i18n": true } }, { @@ -203,10 +205,11 @@ { "widgettype": "Title4", "options": { - "text": "快捷入口", "color": "#F1F5F9", "fontWeight": "600", - "marginBottom": "16px" + "marginBottom": "16px", + "otext": "快捷入口", + "i18n": true } }, { @@ -253,11 +256,12 @@ { "widgettype": "Text", "options": { - "text": "模型管理", "color": "#FFFFFF", "fontWeight": "600", "fontSize": "13px", - "marginTop": "8px" + "marginTop": "8px", + "otext": "模型管理", + "i18n": true } } ] @@ -301,11 +305,12 @@ { "widgettype": "Text", "options": { - "text": "用户管理", "color": "#FFFFFF", "fontWeight": "600", "fontSize": "13px", - "marginTop": "8px" + "marginTop": "8px", + "otext": "用户管理", + "i18n": true } } ] @@ -349,10 +354,11 @@ { "widgettype": "Text", "options": { - "text": "知识库", "color": "#E2E8F0", "fontSize": "13px", - "marginTop": "8px" + "marginTop": "8px", + "otext": "知识库", + "i18n": true } } ] @@ -396,10 +402,11 @@ { "widgettype": "Text", "options": { - "text": "异常记录", "color": "#E2E8F0", "fontSize": "13px", - "marginTop": "8px" + "marginTop": "8px", + "otext": "异常记录", + "i18n": true } } ] @@ -426,10 +433,11 @@ { "widgettype": "Title4", "options": { - "text": "用户消费排行(Top 5)", "color": "#F1F5F9", "fontWeight": "600", - "marginBottom": "16px" + "marginBottom": "16px", + "otext": "用户消费排行(Top 5)", + "i18n": true } }, { @@ -456,10 +464,11 @@ { "widgettype": "Title4", "options": { - "text": "用户调用排行(Top 5)", "color": "#F1F5F9", "fontWeight": "600", - "marginBottom": "16px" + "marginBottom": "16px", + "otext": "用户调用排行(Top 5)", + "i18n": true } }, { @@ -493,10 +502,11 @@ { "widgettype": "Title4", "options": { - "text": "供应商交易排行(金额 Top 5)", "color": "#F1F5F9", "fontWeight": "600", - "marginBottom": "16px" + "marginBottom": "16px", + "otext": "供应商交易排行(金额 Top 5)", + "i18n": true } }, { @@ -522,10 +532,11 @@ { "widgettype": "Title4", "options": { - "text": "供应商调用排行(数量 Top 5)", "color": "#F1F5F9", "fontWeight": "600", - "marginBottom": "16px" + "marginBottom": "16px", + "otext": "供应商调用排行(数量 Top 5)", + "i18n": true } }, { @@ -541,4 +552,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/wwwroot/stat_active_users.ui b/wwwroot/stat_active_users.ui index 2bd56b7..8b0264b 100644 --- a/wwwroot/stat_active_users.ui +++ b/wwwroot/stat_active_users.ui @@ -42,11 +42,12 @@ { "widgettype": "Text", "options": { - "text": "今日活跃用户", "fontSize": "14px", "color": "#94A3B8", - "marginTop": "4px" + "marginTop": "4px", + "otext": "今日活跃用户", + "i18n": true } } ] -} +} \ No newline at end of file diff --git a/wwwroot/stat_concurrent.ui b/wwwroot/stat_concurrent.ui index e1fc525..76cfa0d 100644 --- a/wwwroot/stat_concurrent.ui +++ b/wwwroot/stat_concurrent.ui @@ -42,11 +42,12 @@ { "widgettype": "Text", "options": { - "text": "在线用户", "fontSize": "14px", "color": "#94A3B8", - "marginTop": "4px" + "marginTop": "4px", + "otext": "在线用户", + "i18n": true } } ] -} +} \ No newline at end of file diff --git a/wwwroot/stat_errors.ui b/wwwroot/stat_errors.ui index b25ef53..fcf6a71 100644 --- a/wwwroot/stat_errors.ui +++ b/wwwroot/stat_errors.ui @@ -42,11 +42,12 @@ { "widgettype": "Text", "options": { - "text": "记账异常", "fontSize": "14px", "color": "#94A3B8", - "marginTop": "4px" + "marginTop": "4px", + "otext": "记账异常", + "i18n": true } } ] -} +} \ No newline at end of file diff --git a/wwwroot/stat_new_users_month.ui b/wwwroot/stat_new_users_month.ui index d78847e..d64b797 100644 --- a/wwwroot/stat_new_users_month.ui +++ b/wwwroot/stat_new_users_month.ui @@ -42,11 +42,12 @@ { "widgettype": "Text", "options": { - "text": "本月新增用户", "fontSize": "14px", "color": "#94A3B8", - "marginTop": "4px" + "marginTop": "4px", + "otext": "本月新增用户", + "i18n": true } } ] -} +} \ No newline at end of file diff --git a/wwwroot/stat_today_amount.ui b/wwwroot/stat_today_amount.ui index 64b9ffb..95d42a2 100644 --- a/wwwroot/stat_today_amount.ui +++ b/wwwroot/stat_today_amount.ui @@ -42,11 +42,12 @@ { "widgettype": "Text", "options": { - "text": "今日消费金额", "fontSize": "14px", "color": "#94A3B8", - "marginTop": "4px" + "marginTop": "4px", + "otext": "今日消费金额", + "i18n": true } } ] -} +} \ No newline at end of file diff --git a/wwwroot/stat_today_usage.ui b/wwwroot/stat_today_usage.ui index 6b8b762..777a0b6 100644 --- a/wwwroot/stat_today_usage.ui +++ b/wwwroot/stat_today_usage.ui @@ -43,11 +43,12 @@ { "widgettype": "Text", "options": { - "text": "今日调用笔数", "fontSize": "14px", "color": "#94A3B8", - "marginTop": "4px" + "marginTop": "4px", + "otext": "今日调用笔数", + "i18n": true } } ] -} +} \ No newline at end of file diff --git a/wwwroot/stat_total_orgs.ui b/wwwroot/stat_total_orgs.ui index b71931c..410a756 100644 --- a/wwwroot/stat_total_orgs.ui +++ b/wwwroot/stat_total_orgs.ui @@ -42,11 +42,12 @@ { "widgettype": "Text", "options": { - "text": "组织机构数", "fontSize": "14px", "color": "#94A3B8", - "marginTop": "4px" + "marginTop": "4px", + "otext": "组织机构数", + "i18n": true } } ] -} +} \ No newline at end of file diff --git a/wwwroot/stat_total_users.ui b/wwwroot/stat_total_users.ui index 6c6aab3..ccb2d2b 100644 --- a/wwwroot/stat_total_users.ui +++ b/wwwroot/stat_total_users.ui @@ -42,11 +42,12 @@ { "widgettype": "Text", "options": { - "text": "用户总数", "fontSize": "14px", "color": "#94A3B8", - "marginTop": "4px" + "marginTop": "4px", + "otext": "用户总数", + "i18n": true } } ] -} +} \ No newline at end of file diff --git a/wwwroot/table_top_providers_amount.ui b/wwwroot/table_top_providers_amount.ui index d126c3a..03e7e78 100644 --- a/wwwroot/table_top_providers_amount.ui +++ b/wwwroot/table_top_providers_amount.ui @@ -65,7 +65,9 @@ { "widgettype": "Text", "options": { - "text": "暂无数据", + "otext": "暂无数据", + + "i18n": true, "color": "#64748B", "fontSize": "14px", "textAlign": "center", diff --git a/wwwroot/table_top_providers_count.ui b/wwwroot/table_top_providers_count.ui index 5654628..fffef9e 100644 --- a/wwwroot/table_top_providers_count.ui +++ b/wwwroot/table_top_providers_count.ui @@ -65,7 +65,9 @@ { "widgettype": "Text", "options": { - "text": "暂无数据", + "otext": "暂无数据", + + "i18n": true, "color": "#64748B", "fontSize": "14px", "textAlign": "center", diff --git a/wwwroot/table_top_users_amount.ui b/wwwroot/table_top_users_amount.ui index c53b1fe..5dcedd6 100644 --- a/wwwroot/table_top_users_amount.ui +++ b/wwwroot/table_top_users_amount.ui @@ -65,7 +65,9 @@ { "widgettype": "Text", "options": { - "text": "暂无数据", + "otext": "暂无数据", + + "i18n": true, "color": "#64748B", "fontSize": "14px", "textAlign": "center", diff --git a/wwwroot/table_top_users_count.ui b/wwwroot/table_top_users_count.ui index af0de85..d53c0b0 100644 --- a/wwwroot/table_top_users_count.ui +++ b/wwwroot/table_top_users_count.ui @@ -65,7 +65,9 @@ { "widgettype": "Text", "options": { - "text": "暂无数据", + "otext": "暂无数据", + + "i18n": true, "color": "#64748B", "fontSize": "14px", "textAlign": "center", diff --git a/wwwroot/today_amount.ui b/wwwroot/today_amount.ui index 1354537..60abf59 100644 --- a/wwwroot/today_amount.ui +++ b/wwwroot/today_amount.ui @@ -12,10 +12,11 @@ { "widgettype": "Text", "options": { - "text": "今日交易金额", "fontSize": "14px", "color": "#888", - "marginBottom": "8px" + "marginBottom": "8px", + "otext": "今日交易金额", + "i18n": true } }, { @@ -29,4 +30,4 @@ } } ] -} +} \ No newline at end of file diff --git a/wwwroot/today_usage.ui b/wwwroot/today_usage.ui index fa2eaf5..c9b1e4c 100644 --- a/wwwroot/today_usage.ui +++ b/wwwroot/today_usage.ui @@ -12,10 +12,11 @@ { "widgettype": "Text", "options": { - "text": "今日调用笔数", "fontSize": "14px", "color": "#888", - "marginBottom": "8px" + "marginBottom": "8px", + "otext": "今日调用笔数", + "i18n": true } }, { @@ -29,4 +30,4 @@ } } ] -} +} \ No newline at end of file diff --git a/wwwroot/top_users_amount.ui b/wwwroot/top_users_amount.ui index 226eb45..0fb4339 100644 --- a/wwwroot/top_users_amount.ui +++ b/wwwroot/top_users_amount.ui @@ -10,7 +10,9 @@ { "widgettype": "Text", "options": { - "text": "用户金额 TOP 5(今日)", + "otext": "用户金额 TOP 5(今日)", + + "i18n": true, "fontSize": "16px", "fontWeight": "bold", "color": "#333", @@ -27,10 +29,14 @@ "widgettype": "HBox", "options": {"bgcolor": "#f5f5f5", "padding": "8px 12px", "borderRadius": "4px"}, "subwidgets": [ - {"widgettype": "Text", "options": {"text": "排名", "fontSize": "12px", "color": "#888", "width": "50px"}}, - {"widgettype": "Text", "options": {"text": "用户", "fontSize": "12px", "color": "#888", "flex": "1"}}, - {"widgettype": "Text", "options": {"text": "金额", "fontSize": "12px", "color": "#888", "width": "100px", "textAlign": "right"}}, - {"widgettype": "Text", "options": {"text": "笔数", "fontSize": "12px", "color": "#888", "width": "60px", "textAlign": "right"}} + {"widgettype": "Text", "options": {"otext": "排名", +"i18n": true, "fontSize": "12px", "color": "#888", "width": "50px"}}, + {"widgettype": "Text", "options": {"otext": "用户", +"i18n": true, "fontSize": "12px", "color": "#888", "flex": "1"}}, + {"widgettype": "Text", "options": {"otext": "金额", +"i18n": true, "fontSize": "12px", "color": "#888", "width": "100px", "textAlign": "right"}}, + {"widgettype": "Text", "options": {"otext": "笔数", +"i18n": true, "fontSize": "12px", "color": "#888", "width": "60px", "textAlign": "right"}} ] }, {% for item in rows %} @@ -50,7 +56,8 @@ {% else %} { "widgettype": "Text", - "options": {"text": "暂无数据", "fontSize": "14px", "color": "#999", "textAlign": "center"} + "options": {"otext": "暂无数据", +"i18n": true, "fontSize": "14px", "color": "#999", "textAlign": "center"} } {% endif %} ] diff --git a/wwwroot/total_users.ui b/wwwroot/total_users.ui index 5d8c86e..942acfc 100644 --- a/wwwroot/total_users.ui +++ b/wwwroot/total_users.ui @@ -12,10 +12,11 @@ { "widgettype": "Text", "options": { - "text": "用户总数", "fontSize": "14px", "color": "#888", - "marginBottom": "8px" + "marginBottom": "8px", + "otext": "用户总数", + "i18n": true } }, { @@ -29,4 +30,4 @@ } } ] -} +} \ No newline at end of file