From 79ec25273d1a926c22608c64640a86db1d3583fa Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 29 Dec 2025 16:59:43 +0800 Subject: [PATCH] bugfix --- wwwroot/app_panel.ui | 2 +- wwwroot/i18n/langs.dspy | 18 ++++++++++++++++++ wwwroot/i18n/language.ui | 26 ++++++++++++++++++++++++++ wwwroot/i18n/menu.ui | 29 +++++++++++++++++++++++++++++ wwwroot/top.ui | 6 ++++++ 5 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 wwwroot/i18n/langs.dspy create mode 100644 wwwroot/i18n/language.ui create mode 100644 wwwroot/i18n/menu.ui diff --git a/wwwroot/app_panel.ui b/wwwroot/app_panel.ui index bf8c667..6d3f4ca 100644 --- a/wwwroot/app_panel.ui +++ b/wwwroot/app_panel.ui @@ -17,7 +17,7 @@ "widgettype":"Title4", "options":{ "i18n":true, - "otext":"元境大模型应用平台", + "otext":"元境平台", "wrap":true, "halign":"left" } diff --git a/wwwroot/i18n/langs.dspy b/wwwroot/i18n/langs.dspy new file mode 100644 index 0000000..3e85efc --- /dev/null +++ b/wwwroot/i18n/langs.dspy @@ -0,0 +1,18 @@ +return [ + { + "value":"en", + "text":"English" + }, + { + "value":"zh", + "text":"简体中文" + }, + { + "value":"jp", + "text":"日本语" + }, + { + "value":"ko", + "text":"韩语" + } +] diff --git a/wwwroot/i18n/language.ui b/wwwroot/i18n/language.ui new file mode 100644 index 0000000..47695f8 --- /dev/null +++ b/wwwroot/i18n/language.ui @@ -0,0 +1,26 @@ +{ + "widgettype":"Text", + "options":{ + "tip":"change UI language", + "i18n":true, + "otext":"{{params_kw.lang}}", + "cwidth": 4, + "css":"clickable" + }, + "binds":[ + { + "wid":"self", + "event":"click", + "actiontype":"urlwidget", + "target":"Popup", + "popup_options":{ + "eventpos":true, + "cwidth": 11, + "dismiss_events":["command"] + }, + "options":{ + "url":"{{entire_url('menu.ui')}}" + } + } + ] +} diff --git a/wwwroot/i18n/menu.ui b/wwwroot/i18n/menu.ui new file mode 100644 index 0000000..879b596 --- /dev/null +++ b/wwwroot/i18n/menu.ui @@ -0,0 +1,29 @@ +{ + "widgettype":"Menu", + "options":{ + "cwidth":11, + "target":"app", + "items":[ + { + "name":"en", + "label":"en", + "script":"this.change_lang('en')" + }, + { + "name":"zh", + "label":"zh", + "script":"this.change_lang('zh')" + }, + { + "name":"jp", + "label":"jp", + "script":"this.change_lang('jp')" + }, + { + "name":"ko", + "label":"ko", + "script":"this.change_lang('ko')" + } + ] + } +} diff --git a/wwwroot/top.ui b/wwwroot/top.ui index 357e691..30bcdf4 100644 --- a/wwwroot/top.ui +++ b/wwwroot/top.ui @@ -13,6 +13,12 @@ "url":"{{entire_url('/app_panel.ui')}}" } }, + { + "widgettype":"urlwidget", + "options":{ + "url":"{{entire_url('i18n/languange.ui')}}" + } + }, { "widgettype":"Svg", "options":{